when i start ubuntu i get the command line, even if I run commands like

sudo service lightdm restart


sudo systemctl start lightdm

how can i return to have the desktop at startup?

  • What is the outout of systemctl get-default?
    – Ravexina
    Apr 3 '17 at 17:57
  • 'graphical.target' Apr 3 '17 at 18:01
  • Do you test sudo systemctl enable lightdm command ? I guess that works for you Apr 3 '17 at 18:40

Run these commands to install a desktop environment:

sudo apt-get update  
sudo apt-get install ubuntu-desktop

At first step use this command:

sudo systemctl enable lightdm

And reboot.

If it not works for you try to make lightdm your default disply manager:

echo "/usr/sbin/lightdm" | sudo tee /etc/X11/default-display-manager > /dev/null

And reboot.

And if it's not work for you as the final step try this command:

sudo dpkg-reconfigure lightdm

I hope that works for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.