Temporarily Ignore a Shell Alias by Using a Backslash
If you've aliased a command with extra flags, once in a while it might be useful to run the raw command. Here's 5 ways to do that.
Quick Jump:
For example, chances are you have a color flag added to your ls
command in
the form of an alias. You can check by running type ls
. You can run the raw
non-aliased version by running \ls -la
. This works to bypass any alias, not
just ls
.
# Demo Video
Commands
5 different ways to bypass running an alias:
# My preferred way of doing it.
\ls -la
'ls' -la
"ls" -la
/bin/ls -la
command ls -la
Timestamps
- 0:07 – Using a fairly standard ls alias with color support
- 0:38 – Using a backslash, quotes or the full path to bypass a Shell alias
- 1:45 – Applying this to the diff command if you have a custom alias
- 3:19 – Which aliases do you skip once in a while?
Reference Links
How often do you do this in your day to day? Let me know below.