Debian启动时直接进入字符界面

装完debian后的default runlevel是2,改成3之后(大部分这样说),reboot后还是进入了图形窗口界面。

正确的方法应该是这样的: 第一步:先把/etc/inittab里的The default runlevel改成3,因为以前其他版本的linux的3 runlevel就可以从字符界面启动。我们也把default runlevel改成3。

第二步:cd到/etc/rc3.d目录,因为当系统以runlevel=3启动时,会到/etc/rc3.d这个目录里执行里面的脚本。

有个README文件,内容如下: The scripts in this directory are executed each time the system enters this runlevel. The scripts are all symbolic links whose targets are located in /etc/init.d/ . To disable a service in this runlevel, rename its script in this directory so that the new name begins with a 'K' and a two-digit number, where the number is the difference between the two-digit number following the 'S' in its current name, and 100. To re-enable the service, rename the script back to its original name beginning with 'S'.   

说得很清楚:这个目录下的脚本会在系统启动时执行(当runlevel=3时),如果想要某个脚本不执行,就重命名一下,重命名是有方法的:新的文件名是以“K”开头的(注意大小写),后面紧跟两位数字,这两位数字不能是原文件名中“S”后面的两位数字,当然也不能是100(都三位数了)。OK,看懂README后,就把S19gdm3重命名为K99gdm3 #mv S19gdm3 K99gdm3 完成,reboot,直接进入字符界面了:) 要想从字符界面进入图形界面,运行startx即可,当然,你得有这个权限。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值