Ubuntu增加命令行登录界面开机选项

有时候复制一些资料,修改配置文件等工作,不需要进入图形界面,如何在Ubuntu开始菜单增加一个命令界面呢?

一、修改grub.cfg属性

grub.cfg默认为只读的,我们要修改它,必须加上写属性。

sudo chmod +w /boot/grub/grub.cfg

三、修改grub.cfg

sudo vim /boot/grub/grub.cfg

打开文件之后,发现第一个菜单项: menuentry ‘Ubuntu,Linux 2.6.32-22-generic-pae’ –class ubuntu –class gnu-linux –class gnu –class os {recordfailinsmod ext2set root='(hd0,7)’search –no-floppy –fs-uuid –set 7dde7e5c-249c-4128-b148-8ebae100cc7alinux /boot/vmlinuz-2.6.32-22-generic-pae root=UUID=7dde7e5c-249c-4128-b148-8ebae100cc7a ro quiet splashinitrd /boot/initrd.img-2.6.32-22-generic-pae}

我们把他复制一份,之后修改一下: menuentry ‘Ubuntu,Linux 2.6.32-22-generic-pae(commmand mode)’ –class ubuntu –class gnu-linux –class gnu –class os {recordfailinsmod ext2set root='(hd0,7)’search –no-floppy –fs-uuid –set 7dde7e5c-249c-4128-b148-8ebae100cc7alinux /boot/vmlinuz-2.6.32-22-generic-pae root=UUID=7dde7e5c-249c-4128-b148-8ebae100cc7a ro textinitrd /boot/initrd.img-2.6.32-22-generic-pae}

注(修改两处): 1、在菜单项里写入command mode ,这个作为标识,随意写!如“text mode”2、把quiet splash删除,,加上text

四、其他 保存重新开机就会发现多了这么一个项目。我们如果想在命令行模式进入图形界面怎么办?还用重新启动计算机吗?当然是不用的。1、开启图形界面/etc/init.d/gdm start2、关闭图形界面/etc/init.d/gdm stop

离开睁眼闭眼看见的城市,逃离身边的纷纷扰扰,

Ubuntu增加命令行登录界面开机选项

相关文章:

你感兴趣的文章:

标签云: