Disable Linux builtin command using enable command
Disable Linux builtin command using enable command.
The step by step Linux command example below show how to disable Linux builtin command using the enable command. By disabling the Linux builtin command, it allow you to execute command that using same name as Linux builtin command to be execute without specifying the full pathname to the binary file of that command. The step by step command example below use pwd command as an example to show the output when we use the pwd command from Linux built command and after that we disable the Linux builtin command in this case pwd command and then execute the pwd command from the disk command (not builtin command).
Disable builtin command.
1. To show list of builtin command that you can use on your Linux system, execute enable -a command.
[root@fedora11 ~]# enable -a
...
enable pwd
...
[root@fedora11 ~]#
2. Use the which command to check the same pwd command also available on your Linux system (not builtin command).
[root@fedora11 ~]# which pwd
/bin/pwd
[root@fedora11 ~]#
3. Execute Linux builtin command. the example below we execute the pwd command to display help file.
[root@fedora11 ~]# pwd --help
-bash: pwd: --: invalid option
pwd: usage: pwd [-LP]
[root@fedora11 ~]#
4. Now disable Linux builtin command, in this example we disable pwd command the builtin one :-), use the enable command with -n option and then the builtin command name that we want to disable.

[root@fedora11 ~]# enable -n pwd
[root@fedora11 ~]#
5. To show disable builtin command, execute enable command with -n option, as show on example below.
[root@fedora11 ~]# enable -n
enable -n pwd
[root@fedora11 ~]#
6. To verify and and to prove that we already disable Linux builtin command, try execute pwd command again .... this time we expect output from the pwd command is different because we execute the disk command.
[root@fedora11 ~]# pwd --help
Usage: pwd [OPTION]...
Print the full filename of the current working directory.
-L, --logical use PWD from environment, even if it contains symlinks
-P, --physical avoid all symlinks
--help display this help and exit
--version output version information and exit
NOTE: your shell may have its own version of pwd, which usually supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.
Report pwd bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report pwd translation bugs to <http://translationproject.org/team/>
[root@fedora11 ~]#
Keywords: disable linux builtin command, disable builtin command, disable linux command, linux disable command, show disable command, show disable builtin command
- Add new comment
- 584 reads
- Tell your friends

Recent comments
17 weeks 36 min ago
21 weeks 2 days ago
21 weeks 2 days ago
24 weeks 6 days ago
24 weeks 6 days ago
30 weeks 15 hours ago
30 weeks 19 hours ago
30 weeks 1 day ago