How to start GUI from command line?

If you tried the command startx, but the error command not found was returned, then to install a graphical desktop, in case it is not installed, you would type this:

sudo apt-get install ubuntu-desktop

Try to use startx in your tty , if it does not work on one terminal try Ctrl+Alt+F1 to F6 in order to switch a new tty


I have had the same problem. The solution is to install X.org and the Ubuntu Desktop. Also, don't forget the build-essential packages:

sudo apt-get install ubuntu-desktop

You might have to install X.org separately, but also take advantage of this command line because (for my situation) Ubuntu kept trying to use my display port.