I was reading an article on various Linux commands that can show location of programs in the search path, including
which
, type
, and whereis
. The article says that type
is a built-in bash command, and when I run type type
it indeed outputs "type is a shell builtin". However, when I run which type
, instead of not output anything (which is the behavior in [this](https://askubuntu.com/questions/446580/why-does-type-which-say-that-which-is-hashed) AskUbuntu post), it outputs "/usr/bin/type". Is this different output of which
caused by different distros since I uses Fedora instead of Ubuntu? In addition, why would there be a separate program called /usr/bin/type
on my system, and what is the difference between it and the built-in bash command? In addition, I also noticed that there is a /usr/bin/cd
program on my system while cd
is also a built-in bash command. I also know the difference between the bash built-in time
command and the /usr/bin/time
program, but it seems that /usr/bin/type
and built-in type command do almost the same thing on my system.
Asked by dfsbbl
(1 rep)
Dec 21, 2021, 09:38 PM
Last activity: Jan 15, 2024, 06:36 AM
Last activity: Jan 15, 2024, 06:36 AM