HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

cd — Change the current working directory. More information: <https://www.gnu.org/software/bash/manual/ba

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecurrentdirectorycdcommandclichangeworking

Problem

How to use the cd command: Change the current working directory. More information: <https://www.gnu.org/software/bash/manual/bash.html#index-cd>.

Solution

cd — Change the current working directory. More information: <https://www.gnu.org/software/bash/manual/bash.html#index-cd>.

Go to the specified directory:
cd {{path/to/directory}}


Go up to the parent of the current directory:
cd ..


Go to the home directory of the current user:
cd


Go to the home directory of the specified user:
cd ~{{username}}


Go to the previously chosen directory:
cd -


Go to the root directory:
cd /

Code Snippets

Go to the specified directory

cd {{path/to/directory}}

Go up to the parent of the current directory

cd ..

Go to the home directory of the current user

cd

Go to the home directory of the specified user

cd ~{{username}}

Go to the previously chosen directory

cd -

Context

tldr-pages: common/cd

Revisions (0)

No revisions yet.