One*_*ude 8 command-line command
所以我知道有一些man页面可以在互联网不可用时或当您需要高级用途时获取文档,但是如果我处于离线状态并且我什至不知道我需要什么工具来完成这项工作怎么办?是否有一个命令可以让我查看每个程序/命令和简短描述?
一般来说:不,有些程序没有文档。
但是,apropos可能正是您所需要的。
例如apropos ssh将列出与 ssh 相关的手册页,在我的例子中:
authorized_keys (5) - OpenSSH SSH daemon
git-shell (1) - Restricted login shell for Git-only SSH access
rlogin (1) - OpenSSH SSH client (remote login program)
rsh (1) - OpenSSH SSH client (remote login program)
slogin (1) - OpenSSH SSH client (remote login program)
ssh (1) - OpenSSH SSH client (remote login program)
ssh-add (1) - adds private key identities to the authentication agent
ssh-agent (1) - authentication agent
ssh-argv0 (1) - replaces the old ssh command-name as hostname handling
ssh-copy-id (1) - use locally available keys to authorise logins on a remote machine
ssh-keygen (1) - authentication key generation, management and conversion
ssh-keyscan (1) - gather ssh public keys
ssh-keysign (8) - ssh helper program for host-based authentication
ssh-pkcs11-helper (8) - ssh-agent helper program for PKCS#11 support
ssh_config (5) - OpenSSH SSH client configuration files
sshd (8) - OpenSSH SSH daemon
sshd_config (5) - OpenSSH SSH daemon configuration file
XAllocClassHint (3) - allocate class hints structure and set or read a window's WM_CLASS property
XClassHint (3) - allocate class hints structure and set or read a window's WM_CLASS property
XGetClassHint (3) - allocate class hints structure and set or read a window's WM_CLASS property
XSetClassHint (3) - allocate class hints structure and set or read a window's WM_CLASS property
XtIsShell (3) - obtain and verify a widget's class
Run Code Online (Sandbox Code Playgroud)
你可以看到一些网页出现超过一次,原因是rsh slogin与ssh具有相同的手册页。还有(像往常一样)误报。
您可以使用内置的 bash(1)compgen
compgen -c将列出您可以运行的所有命令。compgen -a将列出您可以运行的所有别名。compgen -b将列出您可以运行的所有内置程序。compgen -k将列出您可以运行的所有关键字。compgen -A function将列出您可以运行的所有功能。compgen -A function -abck将一次性列出以上所有内容。上面的命令根据用户的权限集列出了用户的所有可用命令。我禁用了网络并测试了上面的命令,即使禁用它它也能工作。然而,对于简短的描述,据我所知,一旦你得到命令,你就可以查看手册页。
可用于查看命令描述的其他一些命令是:
apropos
whatis
less
groff
Run Code Online (Sandbox Code Playgroud)
参考