After the restart step of upgrading Ubuntu to 18.04, tty is opening instead ubuntu-desktop. And when I enter my login name and password, I am still in the tty. This is happening again in every restart. How can I start the graphical desktop as normal?
Try logging in to your default desktop environment from the tty virtual console.
Open a text-only virtual console by using the keyboard shortcut Ctrl+Alt+F3.
login:prompt type your username and press Enter.
Password:prompt type your user password and press Enter.
Now you are logged in to a virtual console, and you can run terminal commands from the console.
Run the following command:
sudo systemctl start graphical.target
If that doesn't work, switch the login display manager from gdm3 to lightdm.
sudo apt install lightdm sudo dpkg-reconfigure lightdm sudo reboot
sudo dpkg-reconfigure lightdm will open up a new window allowing you to select lightdm as the default login display manager. Use the arrow keys to select lightdm and press the Tab key to put the focus on <OK> and press Enter. Then reboot by running this command:
If that doesn't work either see if you can at least switch to text mode (for troubleshooting purposes) with no GUI stuff like the X server running.
sudo systemctl start multi-user.target