查看shell命令是否是shell内建命令,可使用type来判断:
$ type cd
cd is a shell builtin
$ type ping
ping is /bin/ping
sh
shell命令解释器
trap
指定在接收到信号后将要采取的动作
let
简单的计算器
seq
以指定增量从首数开始打印数字到尾数
tput
通过terminfo数据库对终端会话进行初始化和操作
apropos
在 whatis 数据库中查找字符串
set
显示或设置shell特性及shell变量
command
调用并执行指定的命令
dris
显示和清空目录堆栈中的内容
fc
修改历史命令并执行
bind
显示或设置键盘按键与其相关的功能
readonly
定义只读shell变量或函数
read
从键盘读取变量值
bg
用于将作业放到后台运行
ulimit
控制shell程序的资源
enable
启动或关闭shell内建命令
declare
声明或显示shell变量
wait
等待进程执行完后返回
builtin
执行shell内部命令
shopt
显示和设置shell操作选项
exit
退出当前的shell
jobs
显示Linux中的任务列表及任务状态
help
显示帮助信息
history
用于显示历史命令
logout
退出当前登录的Shell
export
设置或显示系统环境变量
exec
调用并执行指定的命令
env
显示系统中已存在的环境变量
unset
删除指定的shell变量或函数
kill
删除执行中的程序或工作
unalias
删除由alias设置的别名
type
显示指定命令的类型
fg
将后台作业放到前台终端运行
alias
用来设置指令的别名
echo
输出指定的字符串或者变量
转自:https://www.cnblogs.com/merlindu/p/6752592.html
所有内建命令
[root@localhost tmp]# help
GNU bash, version 4.1.2(1)-release (x86_64-unknown-linux-gnu)
These shell commands are defined internally. Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.
A star (*) next to a name means that the command is disabled.
job_spec [&] history [-c] [-d offset] [n] or history -anrw [filename] o>
(( expression )) if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS>
. filename [arguments] jobs [-lnprs] [jobspec ...] or jobs -x command [args]
: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ...>
[ arg... ] let arg [arg ...]
[[ expression ]] local [option] name[=value] ...
alias [-p] [name[=value] ... ] logout [n]
bg [job_spec ...] mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C>
bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u nam> popd [-n] [+N | -N]
break [n] printf [-v var] format [arguments]
builtin [shell-builtin [arg ...]] pushd [-n] [+N | -N | dir]
caller [expr] pwd [-LP]
case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [->
cd [-L|-P] [dir] readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [>
command [-pVv] command [arg ...] readonly [-af] [name[=value] ...] or readonly -p
compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpa> return [n]
complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action> select NAME [in WORDS ... ;] do COMMANDS; done
compopt [-o|+o option] [-DE] [name ...] set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
continue [n] shift [n]
coproc [NAME] command [redirections] shopt [-pqsu] [-o] [optname ...]
declare [-aAfFilrtux] [-p] [name[=value] ...] source filename [arguments]
dirs [-clpv] [+N] [-N] suspend [-f]
disown [-h] [-ar] [jobspec ...] test [expr]
echo [-neE] [arg ...] time [-p] pipeline
enable [-a] [-dnps] [-f filename] [name ...] times
eval [arg ...] trap [-lp] [[arg] signal_spec ...]
exec [-cl] [-a name] [command [arguments ...]] [redirection> true
exit [n] type [-afptP] name [name ...]
export [-fn] [name[=value] ...] or export -p typeset [-aAfFilrtux] [-p] name[=value] ...
false ulimit [-SHacdefilmnpqrstuvx] [limit]
fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [com> umask [-p] [-S] [mode]
fg [job_spec] unalias [-a] name [name ...]
for NAME [in WORDS ... ] ; do COMMANDS; done unset [-f] [-v] [name ...]
for (( exp1; exp2; exp3 )); do COMMANDS; done until COMMANDS; do COMMANDS; done
function name { COMMANDS ; } or name () { COMMANDS ; } variables - Names and meanings of some shell variables
getopts optstring name [arg] wait [id]
hash [-lr] [-p pathname] [-dt] [name ...] while COMMANDS; do COMMANDS; done
help [-dms] [pattern ...] { COMMANDS ; }