1.在http://sourceforge.net/projects/yodao-free/files/python-dict/下载Download pyton-dict.1.0.1.zip (1.4 kB)
2.将zip包进行解压 得到一个1个python程序 dict.py,将该程序拷贝到: cp dict.py /usr/bin 目录下。
3这时输入命令:python /usr/bin/dict.py hello ,终端就会显示hello的中文翻译。
4改造一下,输入命令: sudo vim ~/.bashrc ,在.bashrc文件末尾加上:alias youdao='python /usr/bin/dict.py'。
5.执行source .bashrc 命令 ,让刚添加的youdao命令马上生效,这时在终端输入:youdao hello ,就会显示hello的中文翻译。