Clear all Linux / UNIX bash shell aliases

by on July 12, 2007 · 3 comments· LAST UPDATED July 12, 2007

in , ,

Q. How do I clear all UNIX bash shell aliases get cleared in one command. I’ve 20 aliases sometime I just need to delete them in a current session. How do I get rid of all of them?

A. You need to use unalias command/

unalias command syntax

unalias name

To remove alias called foo, enter
$ unalias foo

alias command with no arguments or with the -p option prints the list of aliases:
$ alias
Output:

alias ll='ls -lh'
alias ls='ls --color=auto'
alias vi='vim '
alias c='clear'
alias d="/usr/local/bin/chkdomain $@"

Clear all Linux / UNIX bash shell aliases

It will remove NAMEs from the list of defined aliases. If the -a option is given, then remove all alias definitions.
$ unalias -a

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 3 comments… read them below or add one }

1 vinod kumar July 26, 2007 at 6:46 am

Where to check common error in logs

Reply

2 vinod July 27, 2007 at 10:04 am

How to find and install a new hardware

Reply

3 CMREDDY September 28, 2012 at 7:08 am

how i can fixed the alias commands on a terminal..

Reply

Leave a Comment

Tagged as: , , , ,

Previous Faq:

Next Faq: