man
- 使用方法
man [参数] 命令
# 查看man 命令本身
man man
输出内容样例:
NAME
man - an interface to the on-line reference manuals
SYNOPSIS
man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-m system[,...]] [-M path] [-S list]
[-e extension] [-i|-I] [--regex|--wildcard] [--names-only] [-a] [-u] [--no-subpages] [-P pager] [-r prompt] [-7]
[-E encoding] [--no-hyphenation] [--no-justification] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z]
[[section] page[.section] ...] ...
man -k [apropos options] regexp ...
man -K [-w|-W] [-S list] [-i|-I] [--regex] [section] term ...
man -f [whatis options] page ...
man -l [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-P pager] [-r prompt] [-7] [-E
encoding] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z] file ...
man -w|-W [-C file] [-d] [-D] page ...
man -c [-C file] [-d] [-D] page ...
man [-?V]
-
切换中文版本
因为man提供的原版本为英文版,对英文不好的人员不太友好,下面我通过以ubuntu为例子做修改。其他版本的Linux可以自行去查阅相关方法;
- 下载中文版本
apt-get install manpages-zh
-
修改配置文件
etc/manpath.config
将系统中原来配置文件中的的
/usr/share/man
替换为/usr/share/man/zh_CN
# 打开配置文件 vim /etc/manpath.config # 路径替换 :1,$s#/usr/share/man#/usr/share/man/zh_CN#g
- 结果
名称 man - 在线参考手册的接口 概述 man [-C 文件] [-d] [-D] [--warnings[=警告]] [-R 编码] [-L 区域] [-m 系统[,...]] [-M 路径] [-S 列表] [-e 扩展] [-i|-I] [--regex|--wildcard] [--names-only] [-a] [-u] [--no-subpages] [-P 分页程序] [-r 提示] [-7] [-E 编码] [--no-hyphenation] [--no-justification] [-p 字符串] [-t] [-T[设备]] [-H[浏览器]] [-X[dpi]] [-Z] [[章节] 页[.章 节] ...] ... man -k [apropos 选项] 正则表达式 ... man -K [-w|-W] [-S list] [-i|-I] [--regex] [章节] 词语 ... man -f [whatis 选项] 页 ... man -l [-C 文件] [-d] [-D] [--warnings[=警告]] [-R 编码] [-L 区域] [-P 分页程序] [-r 提示] [-7] [-E 编码] [-p 字 符串] [-t] [-T[设备]] [-H[浏览器]] [-X[dpi]] [-Z] 文件 ... man -w|-W [-C 文件] [-d] [-D] 页 ... man -c [-C 文件] [-d] [-D] 页 ... man [-?V]
help
-
使用方法
命令 --help
作用于外部命令;
ls --help
help 命令
作用于内部命令;
help cd
内外部命令可以通过
type 命令
的方式查看;type cd cd is a shell builtin type ls ls is aliased to `ls --color=auto'
根据以上结果可以知道
cd
是内部命令,ls
就是外部命令了.
info
- 使用方式
info 命令
info是更为详细的命令解释,不怎么常用。
分享是最好的学习!