Most docs will mention iproute2. You can use that for googling.
Most docs will mention iproute2. You can use that for googling.
Of course in the specific case of "ip", both are going to return quite a haystack to search through...
> $ which ip
> /sbin/ip
> $ dpkg -S /sbin/ip
> iproute2: /sbin/ip
I use cope to colorize my output, which makes 'which' useless to me for most common commands, but 'whereis' still works.
Edit for examples:
$ which ip
/usr/share/perl5/vendor_perl/auto/share/dist/Cope/ip
$ whereis ip
ip: /usr/bin/ip /usr/share/perl5/vendor_perl/auto/share/dist/Cope/ip /usr/share/man/man7/ip.7.gz /usr/share/man/man8/ip.8.gzThanks for this! After 14+ years of using Linux almost daily, I had never heard of this command. I learned something new today, so now it's time to go home!
command -V
Which knows about aliases and functions as well: $ command -V ip
ip is /sbin/ip
$ command -V ll
ll is aliased to `ls -AlF --color=auto'
$ command -V command_not_found_handle
command_not_found_handle is a function
command_not_found_handle ()
{
if [ -x /usr/lib/command-not-found ]; then
/usr/lib/command-not-found -- "$1";
return $?;
else
if [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/share/command-not-found/command-not-found -- "$1";
return $?;
else
printf "%s: command not found\n" "$1" 1>&2;
return 127;
fi;
fi
}That being said while docs specifically written about the tool will probably mention it random forum posts, tutorials or even stackoverflow questions may not.