/siː-diː/

noun — “the magical command that teleports you around the filesystem.”

cd stands for “change directory” and is a fundamental command in UNIX, Linux, macOS, and Windows command-line interfaces. It allows users to navigate the file system by moving from the current working directory to another location, either by specifying a relative path or an absolute path. cd is often used alongside pwd, ls, and scripting operations to streamline workflows, file management, and automation.

Using cd correctly is crucial because many file operations depend on the current directory. Relative paths navigate based on your current location, while absolute paths provide a full route from the root directory. Additionally, shorthand notations like cd ~ to go home or cd .. to move up a level make navigating fast and efficient.

In practice, using cd might include:

// Move to the home directory
cd ~

# Navigate up one directory level
cd ..

// Change to an absolute path
cd /usr/local/bin

// Use relative paths
cd projects/my_app

// Combine with scripts
cd "$(pwd)/backup" && tar -czf backup.tar.gz *

cd is like hopping into a teleportation booth that instantly drops you exactly where you need to be in your digital city.

See pwd, ls, File System, Terminal, CLI.