一、安裝中文版man
官方下載地址:https://code.google.com/archive/p/manpages-zh/
GITHUB項目地址:https://github.com/man-pages-zh/manpages-zh
安裝方法一
1、Debian / Ubuntu安裝
sudo apt update sudo apt install manpages-zh
2、Arch Linux:
pacman -Syu pacman -S man-pages-zh_cn man-pages-zh_tw
3、Red Hat / CentOS:
yum update yum install man-pages-zh-CN
4、Fedora:
dnf update dnf install man-pages-zh-CN
安裝方法二
源碼網址 https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN/
1、獲取安裝包
[root@localhost opt]# wget https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN/manpages-zh-1.5.1.tar.gz/13275fd039de8788b15151c896150bc4/manpages-zh-1.5.1.tar.gz
2、解壓並安裝
[root@localhost opt]# tar xf manpages-zh-1.5.1.tar.gz
[root@localhost opt]# cd manpages-zh-1.5.1/
[root@localhost manpages-zh-1.5.1]# ./configure --disable-zhtw --prefix=/usr/local/zhman
[root@localhost manpages-zh-1.5.1]# make && make install
3、 為了不覆蓋man,我們新建cman命令作為中文查詢
[root@localhost man1]# cd ~
[root@localhost ~]# echo "alias cman='man -M /usr/local/zhman/share/man/zh_CN' " >>.bash_profile
[root@localhost ~]# source .bash_profile
4.使用我們新建的中文cman查詢命令
[root@localhost ~]# cman ls
二、
默認語言修改成中文
vim /etc/locale.conf
#打開這個配置文件
LANG="zh_CN.UTF-8" LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN" SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16"