1
I was just playing around with the whatis
command. For some reason, whenever I run whatis cd
, I get cd: nothing appropriate.
What does this mean? Why is this? It seems there is no man
entry for cd
either. Why is that?
1
I was just playing around with the whatis
command. For some reason, whenever I run whatis cd
, I get cd: nothing appropriate.
What does this mean? Why is this? It seems there is no man
entry for cd
either. Why is that?
4
cd
is a builtin shell command:
$ type cd cd is a shell builtin
The documentation for cd
can be found with:
man builtins
Run it then press /
and search for "cd".
In Bash you can also open a help page with:
help cd
0
whatis
displays one line of information from the man page of the command (the one you find in the NAME
section).
nothing appropriate
is displayed when no man page is found for that command.
cd
has no man page of its own because it is not an executable but a built-in of your shell (like shopt
or alias
for instance)(*), hence the result you get.
(*) To make the matter a bit more complex there are plain commands such as echo
and printf
that are overridden by like-named (and usually upward compatible) shell built-ins, so these built-ins appear to have their own man
page, but the man page is really for the executable (which could have slightly different parameters).
1That could mean that
cd
is not implemented as a seperate executable. Tryman sh
, and then search for a description of thecd
command under the Builtins section. – sawdust – 2019-09-28T01:20:13.0031
Possible duplicate of `/usr/bin/cd` is not working in mac terminal
– JakeGould – 2019-09-28T01:27:06.0532That's not a very good duplicate of this question. Maybe it's not even a good enough duplicate of this question. – karel – 2019-09-28T07:17:49.800