Command (Unix)

Unix shell builtin

command

Operating system| Unix and Unix-like
Type| Command

`command` is a shell command for executing a command without invoking a function or alias that has the same name.[1] 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.[2]

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.

## Examples

[edit]

In the following, the `ls` command is run directly instead of invoking a function or alias with the same name.

$ command ls

## See also

[edit]

* List of POSIX commands

## References

[edit]

1. ^ "command - manned.org". POSIX Programmer's Manual. Retrieved 13 February 2025.
2. ^ "command(1p)". Linux manual page. Retrieved 13 February 2025.

## External links

[edit]

* `command` – Shell and Utilities Reference, The Single UNIX Specification, Version 5 from The Open Group

* v
* t
* e

Unix command-line interface programs and shell builtins

File system|

* cat
* chattr
* chmod
* chown
* chgrp
* cksum
* cmp
* cp
* dd
* du
* df
* file
* fuser
* ln
* ls
* mkdir
* mv
* pax
* pwd
* rm
* rmdir
* split
* tee
* touch
* type
* umask

Processes|

* at
* bg
* crontab
* fg
* kill
* nice
* ps
* time

User environment|

* env
* exit
* logname
* mesg
* talk
* tput
* uname
* who
* write

Text processing|

* awk
* basename
* comm
* csplit
* cut
* diff
* dirname
* ed
* ex
* fold
* head
* iconv
* join
* m4
* more
* nl
* paste
* patch
* printf
* read
* sed
* sort
* strings
* tail
* tr
* troff
* uniq
* vi
* wc
* xargs

Shell builtins|

* alias
* cd
* echo
* test
* unset
* wait

Searching|

* find
* grep

Documentation|

* man

Software development|

* ar
* ctags
* lex
* make
* nm
* strip
* yacc

Miscellaneous|

* bc
* cal
* expr
* lp
* od
* sleep
* true and false

* Categories
* Standard Unix programs
* Unix SUS2008 utilities
* List

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template