command
Quick Reference
Command Name:
command
Category:
shell builtins
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
- 1
Command execution
Execute commands with specific behavior
- 2
Shell scripting
Control command execution in shell scripts
- 3
Builtin verification
Check if a command is a shell builtin
- 4
Function bypass
Bypass shell functions to execute original commands
Syntax
command [-pVv] command [arg ...]
Options
Option | Description |
---|---|
-p |
Use a default value for PATH that is guaranteed to find all standard utilities |
-v |
Print a description of the command (the path to the command) |
-V |
Print a more verbose description of the command |
Examples
How to Use These Examples
The examples below show common ways to use the command
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
command ls
command -v ls
command -v non_existent_command >/dev/null 2>&1 && echo "Exists" || echo "Does not exist"
command -V ls