Bash – Run a Command Shadowed by an Alias

aliasbashshell

Let's say I have the following alias in bash – alias ls='ls --color=auto' – and I want to call ordinary ls without options. Is the only way to do that is to unalias, do the command and then alias again? Or there is some nifty trick or workaround?

Best Answer

You can also prefix a back slash to disable the alias: \ls

Edit: Other ways of doing the same include:

Use "command": command ls as per Mikel.

Use the full path: /bin/ls as per uther.

Quote the command: "ls" or 'ls' as per Mikel comment.

You can remove the alias temporarily for that terminal session with unalias command_name.

Related Question