ubuntu系统问题及解决方案

ubuntu系统问题及解决方案:


问题1、Ubuntu系统设置无法打开


描述:安装ubuntu-14.04.2版本,出现无法打开系统设置,重启计算机无法解决。

方案: 在root权限下,重新安装Ubuntu-desktop,指令:apt-get install ubuntu-desktop

或者 在用户权限下,使用 sudo apt-get install ubuntu-desktop


问题2、如何修改主机名


描述:在安装系统时使用了默认的主机名,导致命令行显示主机名太长,给输入指令带来不便。

方案: 1、临时修改主机名,指令: hostname  XXX

说明:XXX代表新主机名,可以用任何合法字符串来表示。采用这种方式,新主机名并不保存在系统中,重启系统后主机名将恢复为原主机名。

2、用久修改主机名,这是需要修改hostname文件,因为主机名存放在该文件中,指令:gedit /etc/hostname 或 vim /etc/hostname,编辑后保存即可。

注:不同版本的Linux,主机名存放路径不同。

Ubuntu:/etc/hostname

RedHat、Fedora:/etc/sysconfig/network


问题3、如何修改win7与ubuntu双系统的启动顺序


描述:先安装win7再安装Ubuntu,在默认启动的是ubuntu,想默认启动win7

方案:需要修改/etc/default/grub文件,指令: sudo gedit /etc/default/grub或sudo vim /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=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_DEFAULT的值由0改为4,即GRUB_DEFAULT=4

注:我的Windows (loader) (on /dev/sda1)在启动菜单里面排在第5,因此把这个“0”,改成“4”。若排在第N,就改成N-1。

 GRUB_TIMEOUT=10 表示等待10秒选择启动项,这个时间可以根据自己的喜好更改。

在修改后,保存文件。

然后,运行sudo update-grub(必须,否则无效)

最后,重启系统即可完成永久更改。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值