虚拟机中linux 9如何进入命令行,开机直接进入了主界面

如题所述

1、桌面空白处右键--打开终端
2、输入vi /etc/inittab 进入启动模式修改文件
3、在键盘上键入字母“I”进入VI编辑模式(一定要用root用户登录)
4、最后一行 id:5:xxxxxxx 把5改成3
5、按esc键退出编辑模式,打开键盘大写锁定键后连按2次Z键保存 或者按住shift键不松在连按2次Z键也可以保存
6、reboot 重启系统
命令行模式下直接输入 start x可以直接切换到图形界面
自己手打的 给我分吧
温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-06-28

请在 root 用户下修改 /etc/inittab 文件,将文本中最后一行的内容变更为:id:3:initdefault: 即可。

# vim /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:

第2个回答  2011-09-22
有快捷键ctrl + alt +f1
或者在终端输入 init 3就可以了
第3个回答  2011-09-23
CTRL ALT SHIFT F1

本回答被提问者采纳
相似回答