1、Linux的命令可以分為內部命令和外部命令:
內置命令在系統啟動時就調入內存,是常駐內存的,所以執行效率高。
而外部命令是系統的軟件功能,用戶需要時才從硬盤中讀入內存。
2、type - Display information about command type
#查看當前系統的命令是否為內置命令和外部命令。
3、BASH_BUILTINS
alias, bg, bind, break, builtin, caller, cd, command, compgen, complete, compopt, continue, declare, dirs, disown, echo,enable, eval, exec, exit, export, false, fc, fg, getopts, hash, help,history, jobs, kill, let, local, logout, mapfile, popd, printf, pushd,pwd, read, readonly, return, set, shift, shopt, source, suspend, test,times, trap, true, type, typeset, ulimit, umask, unalias, unset, wait
#Linux中所有的內置命令。
4、內置命令和外部命令的總結
在RHEL6中我們說which只能在PATH變量中搜索命令的絕對路徑,內置命令是內置在bash中的,所以我們找不到命令的絕對路徑,
But,在RHEL7中好像優化了這么一個特點,內置命令在PAHT環境中能找出命令的絕對路徑