I have tried to install kodi by typing
sudo apt-get install open-elec but it says there is no such thing.
How do I install it by terminal?
You can also just deploy the preconfigured openElec Card
Use OSMC it's based on Kodi and it's pretty https://osmc.tv/