修改 ubuntu 默认启动项

来源:互联网 发布:iphone6s不能更新软件 编辑:程序博客网 时间:2024/05/20 23:58

      安装Ubuntu和Windows双系统后,每次启动都要按下箭头才能进入Windows,如果一疏忽,又得重启一次,颇为麻烦。有没有什么办法让系统启动时自动进入Windows呢?最近在网上搜索了一篇,在这里转载给大家分享一下(原文网址:http://jingyan.baidu.com/article/afd8f4de58959134e386e969.html)


      打开Ubuntu系统后,打开中断,输入如下命令:

sudo gedit /etc/default/grub

      显示如下

      # If you change this file, run 'update-grub' afterwards to update
      # /boot/grub/grub.cfg.
      # For full documentation of the options in this file, see:
      #   info -f grub -n 'Simple configuration'

      GRUB_DEFAULT=0
      #GRUB_HIDDEN_TIMEOUT=0
      GRUB_HIDDEN_TIMEOUT_QUIET=true
      GRUB_TIMEOUT=10
      GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
      GRUB_CMDLINE_LINUX="locale=zh_CN"

      

      GRUB_DEFAULT代表的就是启动项的顺序,从数字0开始,依次代表如下启动项(这是在我的电脑上,不同的ubuntu版本和windows系统可能会有一些不同):

      Ubuntu
      Advanced options for Ubuntu
      Memory test (memtest86+)
      Memory test (memtest86+, serial console 115200)
      Windows 8 (loader) (on /dev/sda1)

      

      windows排第四位(注意,顺序是从0开始计的),所以,把GRUB_DEFAULT的值修改为4,然后别忘了运行命令:

sudo update-grub

      好了,重启电脑,默认启动的系统就换到windows了。


0 0
原创粉丝点击