Clear all Linux / UNIX bash shell aliases

by Vivek Gite on July 12, 2007 · 2 comments

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

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 2 comments… read them below or add one }

1 vinod kumar July 26, 2007

Where to check common error in logs

Reply

2 vinod July 27, 2007

How to find and install a new hardware

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 14 + 10 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: