Is there a way to echo an alias? [duplicate]

Solution 1:

Instead of using grep, you can just type alias aliasname to see what an alias is set to.

For example, alias ls will return ls='ls --color=auto'.

Also take a look at the type and whence commands, which return more detailed information about utilities, including executable files in your path, shell built-ins, aliases, and shell functions.

Solution 2:

It is as simple as typing

alias

on command line. This will list ALL aliases so if you know specifics you can grep that like so ..

alias|grep rm 

to find commands that use rm where you can substitute rm for anything alias would show you to find that specific alias.