启动或关闭 shell 内建指令。
enable [-n][-all][内建指令]
若要执行的文件名称与shell内建指令相同,可用enable -n来关闭shell内建指令。若不加-n参数,enable可重新启动关闭的指令。
-n 关闭指定的shell内建指令。 -all 显示shell所有关闭与启动的指令。
显示目前 shell 所有内建指令的状态:
$ enable -all …… 看到内建指令目前已经关闭 enable -n break ……
以下将 cd 指令关闭后,再重新启动:
$ enable -n cd $ cd /root bash:cd:command not found $ enable -n enable -n cd $ enable cd