Removing Aliases

Use unalias to remove an alias. Give unalias as a command using the alias to remove as an argument. The alias will be removed for the rest of the shell session. One can also re-alias in the same shell as usual.

Example…
Remove an alias for ls
$ unalias ls <Enter>

If the alias is set in one’s .bashrc or .bash_profile the above will remove the alias but only for the current shell session. To remove the alias from all future shell sessions edit said file by removing the line where the alias is defined.

This entry was posted in BSD, Bash, GNU/Linux, UNIX and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>