Published: 2024-11-12

Prevent Alias Expansion

If you’ve set up an alias for a bash command that overrides another, you can prevent alias expansion by prefixing the command with a backslash.

For example, if you’ve aliased bat to cat, you can use \cat to run the original cat command.

Alternatively, you can use command cat which while more verbose works on functions in addition to aliases.