Menu
Basic Linux Command
  • Home
  • Guide
  • Linux Distribution
  • Basic Linux 101
Basic Linux Command

Disable Linux builtin command using enable command.

Posted on April 12, 2019May 10, 2019

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.

[[email protected] ~]# enable -a

…

enable pwd

…

[[email protected] ~]#

2.  Use the which command to check the same pwd command also available on your Linux system (not builtin command).

[[email protected] ~]# which pwd

/bin/pwd

[[email protected] ~]#

3.  Execute Linux builtin command.  the example below we execute the pwd command to display help file.

[[email protected] ~]# pwd –help

-bash: pwd: –: invalid option

pwd: usage: pwd [-LP]

[[email protected] ~]#

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.

[[email protected] ~]# enable -n pwd

[[email protected] ~]#

5.  To show disable builtin command, execute enable command with -n option, as show on example below.

[[email protected] ~]# enable -n

enable -n pwd

[[email protected] ~]#

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.

[[email protected] ~]# 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 [email protected]

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/>

[[email protected] ~]#

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Enter Captcha Here : *

Reload Image

Recent Posts

Mageia 6.1 Is Now Available For Download

Ubuntu Minimal_ Installation Guide

The 7 best Linux distributions of 2019

Disable Linux builtin command using enable command.

Step by step How to use Linux_ the beginning

©2021 Basic Linux Command | Powered by SuperbThemes & WordPress