# Absolute & Relative Paths — Linux

Source: https://www.geekswithgeeks.com/en/linux/linux-paths

> Two ways to point at the same file.

## Absolute vs relative

An **absolute path** starts at `/` and always points to the same place, e.g. `/home/alice/notes.txt`. A **relative path** is resolved from your current directory, e.g. `notes.txt` or `../notes.txt`.

## Shortcuts: ~, ., ..

`~` is your home directory, `.` is the current directory, `..` is the parent.

```bash
cd ~/Documents      # go to ~/Documents
cd ..                # go up one level
cd -                 # go to previous directory
```

**Quiz:** Which path is absolute?

- [ ] reports/2026.csv
- [x] /var/log/syslog
- [ ] ../config

*Answer:* /var/log/syslog. Only paths starting with `/` are absolute; the others depend on the current directory.
