使用的是Ubuntu 9.10發行版,找了好半天中文輸入法,發現目前最好/最新的是ibus(前身是鼎鼎大名的scim-python,對于我這個linux小白來說,并不是鼎鼎大名的...),嚴格來說它不是一個輸入法,而是一個輸入法框架,9.10自帶的ibus里有N多國家的輸入法(基于ibus框架)。ubuntu9.10里面ibus自帶的中文PinYin輸入法好像一開始不能用...(拿不準...),必須去Preferences里面的IBus Preferences里面的Input Method中自己添加“漢語-PinYin”輸入法,如果開始沒有,需要安裝ibus-pinyin,見下面的第4步。
在網上找了點資料,在ibus已經加入到Ubuntu的源了,如果需要,使用下面的命令進行安裝:
- sudo apt-get update 更新軟件包列表
- sudo apt-get install ibus 安裝ibus框架
- sudo apt-get install ibus ibus-table 安裝某些輸入法引擎基礎,如果僅僅想使用拼音輸入法,可以跳過此步,拼音輸入法不需要依賴ibus-table。某些輸入法,如五筆,依賴ibus-table。
- sudo apt-get install ibus ibus-pinyin 安裝拼音輸入法引擎,發現很好用啊,哈哈
由于安裝和卸載軟件是使用的必須前提,所以這里對apt命令進行一些總結。在總結之前,還得對ubuntu的軟件源的地址進行說明,為了達到好的下載源的速度,最好選一個最快的軟件源,目前來說http://ubuntu.srt.cn是最快的,ubuntu自己提供了檢測的功能,可以自動檢測(choose a download server -> select best server)。
關于apt-get命令的詳細而簡單的說明,是《AptGetHowTo》。注意,使用apt-get命令必須要用root權限。這里,摘抄了最常用的命令....如下
Installation commands
apt-get install <package_name>
This command installs a new package.
apt-get build-dep <package_name>
This command searches the repositories and installs the build dependencies for <package_name>. If the package is not in the repositories it will return an error.
aptitude install <package_name>
Aptitude is a [http://en.wikipedia.org/wiki/Ncurses Ncurses] viewer of packages installed or available. Aptitude can be used from the command line in a similar way to apt-get. See man aptitude for more information.
- APT and aptitude will accept multiple package names as a space delimited list. For example:
apt-get install <package1_name> <package2_name> <package3_nam
Search commands
apt-cache search <search_term>
This command will find packages that include <search_term>.
dpkg -l *<search_term>*
This will find packages whose names contain <search_term>. Similar to apt-cache search, but also shows whether a package is installed on your system by marking it with ii (installed) and un (not installed).
apt-cache show <package_name>
This command shows the description of package <package_name> and other relevant information including version, size, dependencies and conflicts.
Typical usage example
I want to feel the wind in my hair, I want the adrenaline of speed. So lets install a racing game. But what racing games are available?
apt-cache search racing game
It gives me a lot of answers. I see a game named "torcs". Lets get some more information on this game.
apt-cache show torcs
Hmmm... it seems interesting. But is this game not already installed on my computer? And what is the available version? Is it from Universe or main?
apt-cache policy torcs
Ok, so now, let's install it!
apt-get install torcs
What is the command I must type in the console to launch this game? In this example, it's straightforward ("torcs"), but that's not always the case. One way of finding the name of the binary is to look at what files the package has installed in "/usr/bin". For games, the binary will be in "/usr/games". For administrative programs, it's in "/usr/sbin".
dpkg -L torcs | grep /usr/games/
The first part of the command display all files installed by the package "torcs" (try it). With the second part, we ask to only display lines containing "/usr/games/".
Hmmm, that game is cool. Maybe there are some extra tracks?
apt-cache search torcs
But I'm running out of space. I will delete the apt cache!
apt-get clean
Oh no, my mother asked me to remove all games from this computer. But I want to keep the configuration files so I can simply re-install it later.
apt-get remove torcs
If I want to also remove config files :
apt-get purge torcs
文章來源:
http://localhost/wp2/?p=180