To temporarily disable an alias in the Bash shell, you can use the unalias
command followed by the name of the alias you want to disable. For example, if you have an alias named ls
that is set to ls --color=auto
, you can temporarily disable it with the following command:
unalias ls
This will remove the alias for the ls
command, so that the next time you type ls
, it will execute the system version of the ls
command rather than the alias.
To re-enable the alias, you can simply define it again using the alias
command. For example:
alias ls='ls --color=auto'
This will restore the alias for the ls
command.
Keep in mind that disabling an alias is only temporary. If you want to permanently disable an alias, you can either remove it from your ~/.bashrc
file or comment it out using a #
symbol at the beginning of the line.