刚开始使用ubuntu,常遇到一些问题,每次都满网络的找解决办法,做个记录,方便下次使用。
1 sudo apt-get install xxx 装软件的时候发现网速慢
可能是源不对,换个源就好了。
2 如果安装的是英文版,则默认没有中文输入法,
需要先安装语言包,然后配置一下ibus(ibus一般默认就装好了),把中文输入法加上就好了。
3 不能无线上网,
ubuntu对reaktek的无线网卡支持不好,可以到realtek的官网下载驱动。
4 触摸板无法禁用
安装touchpad就可以设置了。
5 小红点+触摸板中键无法滚动网页
安装pointingdevice即可。
6 用触摸板无法左右移动网页
桌面/System/Assistive Technologies/Mouse Accessibility/Touch Pad/Enable Horizontal scrolling
7 无法通过图形界面改网关,一点Apply又自动改回来了。
修改 /etc/network/interfaces,我在公司的机器配置如下:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.15.67
netmask 255.255.248.0
gateway 192.168.10.6
然后重启网络即可 sudo /etc/init.d/networking restart
8 昨天上有线网络好好的,今天突然就不行了,任务栏的wired networks 状态是 device not managed
修改/etc/NetworkManager/nm-system-setting.conf
managed=false改为manged=true
重启电脑
此时应该可以看到Auto eth0, ifupdown(eth0), ech0三个有线连接,挨个试试,确认ip设置正确,应该就可以了。
9 昨天触摸板好好的,今天就没反应了,可能是因为昨天装了几个软件导致的。
解决办法:
新建/etc/modprobe.d/touchpad.conf文件,
文件中写如下内容:
options psmouse proto=imps
保存,重启计算机。
10 磁盘空间不够用了。
有办法扩大root.disk的大小,不过有风险,另外有上限,好像是30G,我通过wubi安装ubuntu的时候好像已经选了最大的值了。
所以我选择再加一个virtual disk。
https://wiki.ubuntu.com/WubiGuide#How do I increase my swap space?
这个文章说了怎么add a virtual disk:
The following will increase your swap to 2 GB. Replace count= with the number of kilobytes you want for your swap file.
sudo su swapoff -a cd /host/ubuntu/disks/ mv swap.disk swap.disk.bak dd if=/dev/zero of=swap.disk bs=1024 count=2097152 mkswap swap.disk swapon -a free -m
The final free statement will verify that your new swap file has the correct space. If everything worked, issue the following command and you are done. If it didn't work, then remove swap.disk and move swap.disk.bak back to swap.disk and try again.
rm swap.disk.bak
记得保存Terminal中的log,后面会用到。
我重启之后,系统会检查磁盘,很慢的。启动之后却找不到新添加的extra磁盘。
原来还要改/etc/fstab文件,原来文件主要内容如下:
# <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 /host/ubuntu/disks/root.disk / ext4 loop,errors=remount-ro 0 1 /host/ubuntu/disks/swap.disk none swap loop,sw 0 0
# <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 /host/ubuntu/disks/root.disk / ext4 loop,errors=remount-ro 0 1 /host/ubuntu/disks/swap.disk none swap loop,sw 0 0