How can I tell what command an alias stands for?
20,250
Solution 1
You can use the alias
command.
$ alias ll
ll='ls --color=auto -Flh'
Solution 2
You can find a list of aliases on the system with the following command
type -a ll
ll is aliased to `ls -alF'
As a side note, you can see a list of all aliases on the system with
compgen -a
Solution 3
Typing in the command also lists all the aliases in the shell
alias
Solution 4
From the manual page for command
:
If either the '-V' or '-v' option is supplied, a description of command is printed.
So, command -v ll
might produce this output: alias ll='ls -l'
.
Related videos on Youtube
Author by
Tony Anderson
Automation Engineer Deving all of the Ops in Lehi, Utah. Primarily focused in: Puppet Chef Docker #SOreadytohelp
Updated on September 18, 2022Comments
-
Tony Anderson over 1 year
ll
is a common alias in many Linux distros.
How can I tell what it aliases to?I've tried checking my
.bashrc
, but I am not able tell whatll
is equivalent to. -
ILMostro_7 almost 11 yearsyou can also type
which ll
to find out -
Admin almost 11 yearsAlso, if you're sure it's an alias,
alias ll
will tell you. -
Tony Anderson almost 11 yearswhich ll returns nothing on my ubuntu machine. alias ll does show what I'm looking for, thanks!
-
Hauke Laging almost 11 years@EvanTeitelman Please make that an answer. I just wanted to but that would feel strange with you having said just that as a comment.
-
Admin almost 11 years@HaukeLaging: Thanks, I have posted that as an answer.
-
Elder Geek over 7 yearsOne might go so far as to say " a description or the location of the command is printed" as evidenced by
command -v dd
which produces/bin/dd