LinuxCommandLibrary

unalias

Remove shell command aliases

TLDR

Remove alias
$ unalias [name]
copy
Remove all aliases
$ unalias -a
copy
Remove multiple
$ unalias [name1] [name2]
copy

SYNOPSIS

unalias [-a] name ...

DESCRIPTION

unalias is a shell builtin that removes previously defined command aliases. It can remove specific aliases by name or all aliases at once with the -a flag.
The removal only affects the current shell session. Aliases defined in shell startup files like ~/.bashrc will be restored when a new shell is started. This makes unalias useful for temporarily bypassing an alias to test the underlying command's behavior or for debugging shell configuration issues.

PARAMETERS

-a

Remove all aliases.
name
Alias to remove.

CAVEATS

Shell builtin. Not persistent. Current session only.

HISTORY

unalias is a standard shell builtin for removing command aliases defined with the alias command.

SEE ALSO

alias(1), type(1), which(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard