修改Linux命令行界面的分辨率

修改命令行界面无非就是修改配置文件,有两个配置文件是一样的,menu.lst和/grub.conf,这两个文件修改那个都行,grub.conf是menu.lst的链接 ,menu.lst位于/boot/grub/menu.lst,munu.lst相当于是/boot/grub/grub.conf在windows下 的快捷方式,在此不多做解释,


方法如下:

1:vi /root/grub/menu.lst 或者vi /root/grub/grub.conf 会看到如下内容:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
gfxmenu (hd0,0)/message
title RedFlag (2.6.22.6-1)
root (hd0,0)
kernel /vmlinuz-2.6.22.6-1 ro root=LABEL=/ vga=788 splash=silent
initrd /initrd-2.6.22.6-1.img

vga=788这个就是修改分辨率的,可以参考下表随意更改适合自己电脑的分辨率。


2:有的如上两个配置文件中没有vga这个变量,文件如下:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_mitchell-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-431.5.1.el6.i686)
         root (hd0,0)
         kernel /vmlinuz-2.6.32-431.5.1.el6.i686 ro root=/dev/mapper/vg_mitchell-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_mitchell/lv_swap crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_mitchell/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet vga=365
         initrd /initramfs-2.6.32-431.5.1.el6.i686.img
title CentOS (2.6.32-358.el6.i686)
         root (hd0,0)
         kernel /vmlinuz-2.6.32-358.el6.i686 ro root=/dev/mapper/vg_mitchell-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_mitchell/lv_swap crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_mitchell/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
         initrd /initramfs-2.6.32-358.el6.i686.img

这种情况下只需要在kernel一行中,比如 rhgb前面加上vga=xxx就行了




你可能感兴趣的:(linux)