Linux启动关闭图形界面

xiaoxiao2021-02-28  21

我们知道Vmware启动linux系统的时候,默认是按照第五种方式来打开的,也就是图形界面的形式,但是这种方式很吃内存,所以为了节省给多的内存和没有必要的时间,我们去设置在启动的时候换一种方式,也就是动用是第三种。

命令:sudo vi /etc/inittab

[hadoop@hadoop01 /]$ sudo vi /etc/inittab # inittab is only used by upstart for the default runlevel. # # ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # System initialization is started by /etc/init/rcS.conf # # Individual runlevels are started by /etc/init/rc.conf # # Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf # # Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf, # with configuration in /etc/sysconfig/init. # # For information on how to write upstart event handlers, or how # upstart works, see init(5), init(8), and initctl(8). # # Default runlevel. The runlevels used are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:5:initdefault:上面3的意思就是  全用户模式,5是系统默认的,也就是图形界面的形式。

# Default runlevel. The runlevels used are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:3:initdefault: 上面的id:5:initdefault: 已经变成id:3:initdefault:

重启系统就可以了。

转载请注明原文地址: https://www.6miu.com/read-1099992.html

最新回复(0)