Ubuntu Linux 15.10 - I just noticed that there is no man page for cd
This seems a bit strange.
I tried:
man cd
at the cmd line and I get back
No manual entry for cd
I was trying to find documentation on
cd -
which is super-handy for flipping between the last dir and the current dir
and cd --
which seems to be an alias for
cd ~
Am I missing something very obvious here, or should the man page be present?
cd
is not a command, it's built into your shell. This is necessary because your current working directory is controlled by thePWD
environment variable named after thepwd
or "print working directory" command.The environment variables of a parent process cannot be changed by a child process. So if your shell ran
/bin/cd
which changedPWD
it would only affect/bin/cd
and anything it ran. It would not change the shell'sPWD
.Some systems, like OS X and CentOS, map the
cd
man page tobuiltin
which lists all the shell built ins and lets you know you should look at your shell's man page.You can check what shell you have with
echo $SHELL
, it's probablybash
.