Apr 5 2009

How to find out if a Linux command has an alias

Here’s a nifty Linux trick to find out if a command has an alias set. If you want to find out if the command ls has an alias set use the following command:

type -all ls
ls is aliased to `ls –color=tty’
ls is /bin/ls

You can see in the output that ls has one alias in ls –color=tty.