I was wondering about tools that are built into the bash
shell. For example, type pwd
tells me that pwd
is built into the shell.
whereis pwd
/bin/pwd /usr/include/pwd.h /usr/share/man/man1/pwd.1.gz
aptitude search pwd
does not (seem to) give anything on the pwd I use. (I'm on a Debian system.)
-- Is there any way to find out what stuff are built in? Besides brute force with type
, that is.
-- Is the pwd
in the bin
folder (above) the same pwd
that is built in? Is it loaded into the shell at initiation? Or is it executed from that folder by the shell? If so, in what way is it built-in?
-- Why are stuff built in in the first place? Are they especially tweaked to fit the shell, or is it just so that they can be invoked internally so they don't require a new process? I managed to catch a pwd
with pwd &
and ps
. Is this a circumvention or are they separate processes?
-- Feel free to tell me anything else on the topic :)