linux使用|Ubuntu使用问题备忘录

linux下挂载ISO镜像文件
mount -o loop -t iso9660 file.iso /mnt/test

重启到windows系统时间不准
The computer clock becomes wrong everytime I dual boot to Windows. How do I solve this?
Everytime I dual boot to my Windows partition, my computer clock become X hours ahead/behind my local time. How do I solve that problem with Ubuntu?

  • Edit the file /etc/default/rcS. in there is a setting for time ("UTC=").
  • Set it to no ("UTC=no")
从XP下硬盘安装ubuntu 9.10,重启无菜单选项进入XP
【linux使用|Ubuntu使用问题备忘录】sudo update-grub
Ubuntu 9.10下安装无线网卡驱动
笔记本型号: lenovo 昭阳E43L
网卡型号: Broadcom BCM4312 802.11b/g
1. 从http://www.broadcom.com/support/802.11/linux_sta.php下载802.11 Linux STA driver;
2. 按照readme.txt的指导编译并加载驱动;
3. 为了启动时能够自动加载无线网卡驱动,编辑/etc/modules文件,添加一行wl, /etc/modules文件按如下:
lp
wl
出现A problem occurred when checking for the updates.
此时ibus输入法也无法打开。
原因是为了编译一个程序,把/usr/bin/python链接到了python2.4,而Ubuntu 9.10很多组件需要用到python2.6,将链接修改回原来值,指向python2.6,重启系统,问题解决。

cat命令新建文件
cat << EOF > filename
> #!/bin/bash
> echo "hello world"
> EOF 回车
该方法也适用于脚本

firefox中处理ed2k下载
网上提供的方法都是在firfeox中运行about:config,打开配置页。右键点击配置列表,创建“布尔”项 network.protocol-handler.external.ed2k,值为 true,然后再创建一个“字符串”项 network.protocol-handler.app.ed2k,值为 /usr/bin/ed2k。


但这种方法在ubuntu 9.10 + firefox 3.5下无效。最后找到的解决方法是:
sudo apt-get install amule-gnome-support

rhythmbox乱码解决方法
sudo apt-get install python-mutagen

mid3iconv -e GBK *.mp3

zip压缩包中文文件名乱码解决方法
ubuntu 9.10下unzip没有-O参数了,后找到一段python代码,解决问题:

#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import zipfileprint "Processing File " + sys.argv[1]file=zipfile.ZipFile(sys.argv[1],"r"); for name in file.namelist(): utf8name=name.decode('gbk') print "Extracting " + utf8name pathname = os.path.dirname(utf8name) if not os.path.exists(pathname) and pathname!= "": os.makedirs(pathname) data = https://www.it610.com/article/file.read(name) if not os.path.exists(utf8name): fo = open(utf8name,"w") fo.write(data) fo.close file.close()

ubuntu 10.04下安装联想昭阳E46L无线网卡驱动
sudo apt-get install bcmwl-kernel-source
重启即可

    推荐阅读