Bash Shell Ignore Aliases and Functions When Running A Command

Bash Shell Ignore Aliases and Functions When Running A Command

To run a command in the Bash shell and ignore any aliases or functions that might be defined, you can use the "command" builtin.

The "command" builtin allows you to run a command as if it were not an alias or function, bypassing any shell functions or alias definitions that might be in place.

Here's the general syntax of the "command" builtin:

command [-pVv] command [arg ...]
So‮w:ecru‬ww.lautturi.com

To ignore aliases and functions when running a command, you can use the "-p" option. For example:

command -p ls

This will run the "ls" command as if it were not an alias or function, using the built-in version of the command rather than any alias or function definition.

Note: The "command" builtin is a useful tool for running commands in the Bash shell and ignoring any aliases or functions that might be defined. It is particularly useful when you want to run a command that has the same name as an alias or function, and you want to bypass the alias or function definition. However, you should be careful when using the "command" builtin, as it can sometimes lead to unexpected behavior if the command you are running behaves differently than the built-in version of the command.

Created Time:2017-10-27 14:56:35  Author:lautturi