How Do I Change Directories in Linux Command Line?

How Do I Change Directories in Linux Command Line?
Contents

How do I change directories in Linux?

To change to a directory specified by a path name, type cd followed by a space and the path name (e.g., cd /usr/local/lib) and then press [Enter]. To confirm that you’ve switched to the directory you wanted, type pwd and press [Enter]. You’ll see the path name of the current directory.

What does cd do in Linux?

The cd command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.