Skip to content
TURNKEYGNU / LINUX
AppsDocumentationForumBlogScreenshotsGitHubTurnKey Hub
文English
EnglishDeutschEspañol日本語Portuguêsहिंदी中文
Home/Blog/CDPATH

From the project

CDPATH

By Liraz SiriOctober 4, 20151 min read
tips

I used bash for a decade or so before I discovered this little highly useful gem a few years back. Nowadays I can't remember what I used to do without it.

From the bash manual page:

CDPATH

The search path for the cd command.  This is  a  colon-separated
list of directories in which the shell looks for destination
directories specified by the cd command.

A sample value is ".:~:/usr".

I've added the following to my .bashrc:

CDPATH=.:/turnkey:/turnkey/projects:/turnkey/appliances

Now this works:

cd tklbam # takes me to /turnkey/projects/tklbam
cd core   # takes me to /turnkey/appliances/core
cd notes  # takes me to /turnkey/notes

For best results, turn on bash auto completion:

apt-get install bash-completion

Keep exploring

Find your next server

Find ready-to-run apps for the job you need to do.

Explore the app library
TURNKEYGNU / LINUX

Secure self-hosting without starting from scratch

Explore TurnKey
AboutDocumentationForumFAQBlogGitHub
Free and open sourceSecure by defaultReady to deploy