phu*_*ehe 5 man documentation shell-builtin
打字man alias给我
无需手动输入别名
同样的事情也适用于export和eval。起初我认为它只发生在 shell 内置命令中,但man echo给了我手册页。
除了谷歌搜索,有没有办法查看这些命令的文档?如果没有,有没有办法“安装”那些丢失的手册页?
您可能有手册页,echo因为大多数系统都有一个echo二进制文件 in /bin,尽管大多数 shell 无论如何都提供了内置文件;您正在看到该二进制文件的手册页。您缺少的所有其他命令的手册页位于 POSIX 程序员手册(手册部分 1P)中。如何安装它取决于你的发行版;在 Gentoo 上,它们在sys-apps/man-pages-posix包中
通过检查当前 shell 的手册页可以轻松找到内置命令:
在 bash 的手册页中,您会发现:
Run Code Online (Sandbox Code Playgroud)alias [-p] [name[=value] ...] Alias with no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output. When arguments are supplied, an alias is defined for each name whose value is given. A trailing space in value causes the next word to be checked for alias substitution when the alias is expanded. For each name in the argument list for which no value is supplied, the name and value of the alias is printed. Alias returns true unless a name is given for which no alias has been defined.
如有疑问,请which alias在报告内置时运行,或者在 中找不到它$PATH,很有可能它是内置的,因此请检查相应的手册页。