Linux導入中文man手冊

首先先下載中文版的man手冊包
下載地址:中文man手冊
或者使用wget命令導入到Linux裏面

[root@localhost ~]# wget https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN/manpages-zh-1.5.2.tar.bz2/cab232c7bb49b214c2f7ee44f7f35900/manpages-zh-1.5.2.tar.bz2
//需要先安裝wget

下載好後確認一下
在這裏插入圖片描述
編譯安裝

[root@localhost ~]# tar jxf manpages-zh-1.5.2.tar.bz2 
[root@localhost ~]# cd manpages-zh-1.5.2/
[root@localhost manpages-zh-1.5.2]# ./configure --disable-zhtw  
//默認安裝--disable-zhtw   
[root@localhost manpages-zh-1.5.2]# make && make install  //編譯安裝

編輯.bash_profile文件

[root@localhost ~]# cd manpages-zh-1.5.2/
[root@localhost manpages-zh-1.5.2]# cd
[root@localhost ~]# vim .bash_profile 
//任意位置插入下面內容
alias cman='man -M /usr/local/share/man/zh_CN'
[root@localhost ~]# source .bash_profile //刷新bash_profile文件生效

測試

[root@localhost ~]# man ls   //默認的不變還是英文的
[root@localhost ~]# cman ls  //中文的
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章