Have you ever read cds manpage? If you havent, then you should if you dont even know what cd or cd - does. The manpage is of POSIX Programmers Manual, so the content is not only for the Bash, but for every POSIX-compliant shell.

1   cd brings you(r) home

It means literally, like, seriously bringing you home or bringing your home to you.

/path/somewhere $ cd
~ $

I believe many people have discovered this on their own like me. You just happen to run cd without giving any argument, then you wowd for finding out this quick way to get back to home.

I remember once I was talking to someone, who didnt even know about this. Its more amazed for me than for him, I wondered how on Earth this guy had been doing in order to get back to home.

2   cd - for last directory

I dont use this argument - often, but when I need it, itd save a lot of typing time especially you keep switching between two directory.

~ $ cd /path/to/somewhere/deep
/path/to/somewhere/deep $ # do somegthing
/path/to/somewhere/deep $ cd /path/to/other/place/way/way/deep
/path/to/other/place/way/way/deep $ # do something
/path/to/other/place/way/way/deep $ cd -
/path/to/somewhere/deep $ # now we are back
/path/to/somewhere/deep $ cd -
/path/to/other/place/way/way/deep $ # we are back to the other

Note

If you actually have a - directory, use cd ./- to get into it.

3   CDPATH is directory search path

Before I read the manpage, I had never thought of it, even I seemed to have heard of it or seen it. Its like PATH, but only for searching directories when using cd.

~ $ mkdir foobar
~ $ CDPATH=$HOME
~ $ cd /
/ $ cd foobar
/home/login/foobar $ # bang!

You can enter the ~/foobar from anywhere, just by typing cd foobar. Its like you can run foobar from anywhere if its executable and its searchable via PATH.

It can also be auto-completed via bash-completion. On Gentoo, run eselect bashcomp enable base to enable it.

Although I find this could be useful, but I prefer more specific way to change directory, like my own g script for quick directory switch.

4   cd !$ comes in handy

This relies on Bashs History Expansion, so this is not for every shell. But its very useful when the last argument is a directory from previous command, and you need to get into for further actions. !$ is your best friend.

~ $ mkdir long/long/directory
~ $ cd !$
~/long/long/directory $