如何让Ubuntu下如何默认字符界面启动是一件很让人头疼的事,因为更改init没有用(Ubuntu用upstart),而且Runlevel也很坑。
这是用init的Runlevel
0 - Halt
1 - Single
2 - Multi-user mode with text based console login capability.
3 - Similar to runlevel 2 except that networking services are started.
4 - Undefined
5 - Boots the system into a networked, multi-user state with X Window System capability(GUI)
6 - Reboot
一般来说我们想的都是这样(书上大多也这么教),但是…
注意到Ubuntu(Debian系列)的Runlevel级别定义如下:
0 - Halt
1 - Single
2 - Full multi-user with display manager (GUI)
3 - Full multi-user with display manager (GUI)
4 - Full multi-user with display manager (GUI)
5 - Full multi-user with display manager (GUI)
6 - Reboot
我们可以发现2~5级是没有任何区别的,你怎么改都进不了多用户模式(字符界面)。
具体问题具体分析,解决方法如下:
首先设置grub: