Home >Operation and Maintenance >Linux Operation and Maintenance >A brief analysis of the command method to disable/enable the GUI when the Ubuntu desktop starts

A brief analysis of the command method to disable/enable the GUI when the Ubuntu desktop starts

藏色散人
藏色散人forward
2022-11-03 16:48:542354browse

This article will introduce to you how to disable or enable the GUI at startup in Ubuntu 20.04 Focal Fossa Linux Desktop. I hope it will be helpful to friends in need.

A brief analysis of the command method to disable/enable the GUI when the Ubuntu desktop starts

In this tutorial, you will learn:

  • How to disable the GUI on startup

  • How to enable the GUI on boot

  • How to launch the GUI from the command line

How to disable the GUI on boot in Ubuntu 20.04 step-by-step instructions

The following command will disable the GUI on boot, so on reboot the system will boot to a multi-user target:

$ sudo systemctl set-default multi-user

Reboot or log out of the current session to exit the GUI:

$ gnome-session-quit

How to enable the GUI at startup

Given that you have installed the GUI on your Ubuntu 20.04 server/desktop, you can enable the GUI to be launched at system startup by executing the following command:

$ sudo systemctl set-default graphical

Manually start the GUI from the command line

For the GNOME GUI of the default display manager to install GDM, you can start the GUI from the command line by executing the following command:

$ sudo systemctl start gdm3

Recommended learning: "Linux Video tutorial

The above is the detailed content of A brief analysis of the command method to disable/enable the GUI when the Ubuntu desktop starts. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:awaimai.com. If there is any infringement, please contact admin@php.cn delete