CentOS直接修改文件 /etc/inittab 就好了
1 # Default runlevel. The runlevels used are: 2 # 0 - halt (Do NOT set initdefault to this) 3 # 1 - Single user mode 4 # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) 5 # 3 - Full multiuser mode 6 # 4 - unused 7 # 5 - X11 8 # 6 - reboot (Do NOT set initdefault to this) 9 # 10 id:3:initdefault: #修改处就在这里
ubuntu 的默认运行级别文件是 /etc/init/rc-sysinit.conf