編輯/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:3:initdefault:
找到這行程式碼:id:3:initdefault :
它定義Linux進入系統後執行的init動作級別,共有以下6個級別:
級別0,掛起、關機模式;
級別1,單一使用者模式;
等級2,多使用者模式,但沒有網路功能;
等級3,全功能的單一使用者模式;
等級4,沒用到;
等級5,X11模式,也就是圖形化介面模式;
等級6,重起模式。
將原來的“3”修改成“5”,然後reboot重新啟動系統即可。
推薦教學:linux教學
#以上是linux怎麼在開機時進入圖形介面的詳細內容。更多資訊請關注PHP中文網其他相關文章!