Command (Unix)
Unix shell builtin
command is a shell command for executing a command without invoking a function or alias that has the same name. The command line arguments consist of an inner command line to executed. If the first argument is the name of a function or alias as well as the name of a command, then normally the function or alias takes precedence, but when passed as an argument to command the inner command is invoked instead of the function.
The command is available on Unix and Unix-like operating systems. It is specified in the POSIX standard and is often implemented in Unix shells as a shell builtin function or alias.
01Examples
In the following, the ls command is run directly instead of invoking a function or alias with the same name.
$ command lsSources and credits
This article is adapted from the Wikipedia article “Command (Unix)”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.