Directories

Directory traversal is an important skill. It’ll feel slower than clicking through folders in a GUI at first. Just grit your teeth.

# Show your current path (parent working directory)
pwd

List

# List directories contents
ls

# List with details
ls -l

# List with details and hidden files
ls -la

Change directory

Note: Pressing TAB will autocomplete directory and file names as you type. Use it!

# Change to path
cd path/to/directory

# Traverse upward
cd ..

# Traverse upward twice (and so on)
cd ../..

# Change to last path accessed
cd -

# Change to home directory for current user
cd ~