由於從事開發,安裝一個詞典是頗有必要,文中介紹安裝openyoudao和stardic兩個軟件的方法php
一.openyoudao的安裝linux
由於是由window轉來學ubuntu的,因此老是想安裝和window下的同名軟件,這個openyoudao和就是有道的linux版本吧,曾在按照網上的安裝教程老是顯示我找不到那個源,通過重重實驗後終於找到了合適的安裝方法。ubuntu
1.先添加源網絡
使用add-apt-repository 命令
:spa
sudo add-apt-repository ppa:justzx2011/openyoudao
這種方法不推薦,由於我在安裝過程出現一些問題。 .net
或者在終端輸入命令:code
sudo gedit /etc/apt/sources.list
在/etc/apt/sources.list尾部添加以下內容:blog
deb http://ppa.launchpad.net/justzx2011/openyoudao/ubuntu precise main deb-src http://ppa.launchpad.net/justzx2011/openyoudao/ubuntu precise main
這是推薦的方法。教程
2.更新源ci
在終端中輸入:
sudo apt-get update
3.安裝openyoudao
終端輸入:
sudo apt-get install openyoudao
openyoudao安裝成功,打開軟件會出現以下界面
此後是雙擊你要查詢的單詞就能夠了,不過有個缺點就是不能本身輸入要查詢的單詞
二.安裝stardict
在終端輸入命令:
sudo apt-get install stardict
安裝完stardict後開啓網絡詞典就能夠查詢單詞了,這個詞典有趣的地方是當你輸入linux指令時會出現對這個指令的解釋,效果和在終端輸入man+指令同樣。
咱們能夠爲stardict安裝一些本地詞典,這樣在斷網的時候咱們也能夠查單詞,步驟以下:
咱們能夠訪問Ubuntu星際譯王的中文詞典下載頁面 http://stardict.sourceforge.net/Dictionaries_zh_CN.php,下載詞典文件
,而後咱們能夠在終端嘔吐經過命令來將詞典文件解壓縮到/usr/share/stardict/dic/目錄中,命令以下:
cd /home/wen/下載 sudo tar -jxv -f stardict-kdic-computer-gb-2.4.2.tar.bz2 -C /usr/share/stardic/dic
最後咱們打開stardict右下角的詞典管理中添加你的詞庫