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
    That could mean that cd is not implemented as a seperate executable. Try man sh, and then search for a description of the cd command under the Builtins section. – sawdust Sep 28 at 1:20
  • 1
    Possible duplicate of `/usr/bin/cd` is not working in mac terminal – JakeGould Sep 28 at 1:27
  • 2
    That's not a very good duplicate of this question. Maybe it's not even a good enough duplicate of this question. – karel Sep 28 at 7:17
5

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.