UNIT 10: Security & Maintenance
Linux is secure by design, but only if you keep the gates locked. In this unit, we build the castle walls.
1. The Firewall (UFW)
By default, Linux accepts connections from everyone. We must turn on the Uncomplicated Firewall (UFW).
sudo ufw allow ssh # Allows you to connect remotely
sudo ufw deny 23 # Blocks Telnet (insecure port)
2. Time Machine (Backups)
There is no "System Restore" point in Linux. You make your own using TAR (Tape Archive).
The command to "Zip" a folder is famous for being hard to remember:
- c: Create
- z: Zip (Compress)
- v: Verbose (Show me what you're doing)
- f: File (Output name)
3. System Maintenance
Linux does not get slower over time like Windows, but it accumulates "trash" files. Clean them up:
sudo apt clean # Clears the download cache
⚠️ BEST PRACTICES
1. Least Privilege: Never log in as 'Root'. Log in as a user and use `sudo`.
2. Updates: Run `apt update` weekly.
3. Scripts: NEVER run a script from the internet without reading it first (e.g. `curl | bash`).
MISSION:
1. Enable the firewall.
2. Create a backup of /secret_lab named lab_backup.tar.gz.