To list all the aliases defined in the system, open a terminal and type alias
. It lists each alias
and the command aliased to it.
As for removing an alias
permanently, you can do this by opening your .bashrc
file (in your home folder) with any text editor and and removing (or commenting out, by placing a #
in front of them) the lines corresponding to the alias you want to remove. For the removal to take effect, you will need to close the terminal and open a new one or open a new bash shell by typing bash
.
If, however, you want to remove the alias temporarily, you just do unalias test1
and this will remove the alias for test1
. Remember, if you do it like this, alias test1
will be there again the next time you open a terminal if it is defined inside your .bashrc
.