9.3.32 unalias command (removes alias definitions)
Syntax
unalias [-a]name [name...]
Description
This command removes specified alias definitions. To do so, specify in name the name of the alias you want to remove. You can specify multiple names whose aliases are to be removed, using the space as the delimiter. If you specify in name an alias name that is not defined, or if you execute the command without any options or arguments, the command terminates with an error and returns 1 as the return code.
Arguments
- -a
Specifies that all alias definitions are to be removed.
- name
Specifies the name for an alias definition to be removed.
Return codes
Return code |
Meaning |
---|---|
0 |
Normal termination |
1 |
Error termination (such as that a name specified in name does not have a defined alias) |
Notes
Even if the command syntax of this regular built-in command is invalid, it does not exit the shell that is executing the command.
Example
Remove the alias defined for functions.
unalias functions