Reinstalling Ubuntu via Terminal
Solution 1:
Reinstall Ubuntu Operating System
You can install programs/applications via Terminal, but in neither case an operating system. The Terminal is good and you can do a lot of things with it, but this time you will need more than only the Terminal to reinstall Ubuntu.
Please read the following community wiki to find out what you need:
- How To Reinstall Ubuntu
Reinstall Ubuntu desktop system
If you are referring only to the Ubuntu desktop system package, then you can use the following command to reinstall it:
sudo apt-get install --reinstall ubuntu-desktop
Solution 2:
Trying to recover from a failed update between Ubuntu 14.04 and 16.04. The update was locked, the only to get out of it was to reboot the computer, and after reboot, I was presented with the terminal prompt and it would not launch Ubuntu desktop.
I followed your suggestion :
sudo apt-get install --reinstall ubuntu-desktop
It did not work, system told me to do :
sudo dpkg --configure -a" first.
Which I did.
A new :
sudo apt-get install --reinstall ubuntu-desktop
failed and suggested to do :
sudo apt-get -f install
Back to a
sudo apt-get install --reinstall ubuntu-desktop
This one terminated. I shutdown the computer. During Shutdown I noticed it was displaying Ubuntu countdown. Good sign. I restarted again the computer, and it start to load as usual and launch Ubuntu desktop Unity. Success. Thanks for the tips !