内置命令提供了每个 shell 的大部分功能。你使用的任何 shell 都有一些内置命令,但是如何获取这些内置命令的信息可能因 shell 而异。例如,对于 zsh,你可以使用 man zshbuiltins 命令获得其内置命令的描述。
$ man zshbuiltins
ZSHBUILTINS(1)GeneralCommandsManual ZSHBUILTINS(1)
NAME
zshbuiltins - zsh built-in commands
SHELL BUILTIN COMMANDS
Some shell builtin commands take options as described in individual en‐
tries; these are often referred to in the list below as`flags' to avoid
confusion with shell options, which may also have an effect on the behav‐
iour of builtin commands. In this introductory section, `option' always
has the meaning of an option to a command that should be familiar to most
command line users.
…
在这个冗长的手册页中,你将找到一个内置命令列表,其中包含有用的描述,如下摘录中所示:
bg [ job ...]
job ...&
Put each specified job in the background,or the current job if
none is specified.
bindkey
See the section `Zle Builtins' in zshzle(1).
break [ n ]
Exit from an enclosing for, while, until, select or repeat loop.
If an arithmetic expression n is specified, then break n levels
instead of just one.
最后Linux 内置命令对于每个 shell 都很重要,它的操作类似特定于 shell 的命令一样。如果你经常使用不同的 shell,并注意到你经常使用的某些命令似乎不存在或者不能按预期工作,那么它可能是你使用的其他 shell 之一中的内置命令。
via:networkworld
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx