≡ Menu

Clear all Linux / UNIX bash shell aliases

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

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 3 comments… add one }

  • vinod kumar July 26, 2007, 6:46 am

    Where to check common error in logs

  • vinod July 27, 2007, 10:04 am

    How to find and install a new hardware

  • CMREDDY September 28, 2012, 7:08 am

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

Leave a Comment