Home  >  Article  >  System Tutorial  >  What are some ways to disable the graphical interface of a CentOS distribution?

What are some ways to disable the graphical interface of a CentOS distribution?

PHPz
PHPzforward
2024-01-03 09:18:02483browse

Many friends who use Linux at home use virtual machines to build Linux. The resources that can be allocated to virtual machines are limited. If some services are not turned off, the system will be stuck. Among these services, the graphical interface is the first service to be shut down. Below I list the methods for turning off the graphical interface in three distributions that I have used.

1.CentOS 5, 6 series. Open the /etc/inittab file and change the line id:5:initdefault to id:3:initdefault:. Restart the system and it will take effect. If you want it to take effect immediately, you can enter "init 3" on the command line;

2.CentOS7 series. ln -svf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target, restart the system to take effect.

3.Ubuntu 15 series. Open the /etc/X11/default-display-manager file and enter false under the line #/usr/sbin/lightdm. Then save and exit, and restart the system to take effect.

The above is the detailed content of What are some ways to disable the graphical interface of a CentOS distribution?. For more information, please follow other related articles on the PHP Chinese website!

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