Learn Docker With My Newest Course

Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →

Temporarily Ignore a Shell Alias by Using a Backslash

blog/cards/temporarily-ignore-a-shell-alias-by-using-a-backlash.jpg

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: Demo Video

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?

How often do you do this in your day to day? Let me know below.

Never Miss a Tip, Trick or Tutorial

Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per month (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.



Comments