IntroToLinux

7. Essential Navigation Commands

Lab 2.1: Basic Navigation (5 minutes)

# Check current directory
pwd

# Go to home directory (all equivalent)
cd
cd ~
cd $HOME

# Go to root directory
cd /

# Go back to home directory
cd ~

# List current directory contents
ls

# List with details
ls -l

# List including hidden files
ls -la

Sample Terminal Session:

user@localhost:~$ pwd
/home/user
user@localhost:~$ cd
user@localhost:~$ pwd
/home/user
user@localhost:~$ cd /
user@localhost:~$ pwd
/
user@localhost:~$ cd ~
user@localhost:~$ pwd
/home/user

Next: → Essential File Commands
Previous: ← File System Permissions
Lesson Home: ↑ Lesson 2: The Shell
Course Home: ⌂ Introduction to Linux