Navigation

The cd command

Changes folder. It is the command you will use most in your whole terminal life.

Syntax

cd [ruta]

Copy-ready examples

$ cd DocumentosEnter a relative folder
$ cd ..Go up one level
$ cd ~Return to your home folder

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Names with spaces need quotes: cd "My things".

Related commands

FAQ

What is .. to cd?

The parent folder: cd .. goes up one level.

Can I go back to the previous folder?

With cd - you return to the last folder you were in.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course