Course Content
🗓️ Day 1 – Getting Started with Linux
• Understand what Linux is and why it’s essential for DevOps and AI. • Learn basic terminal commands: pwd, ls, cd. • Explore the filesystem hierarchy and directory structure. • Practice moving around the shell confidently.
0/6
🗓️ Day 2 – Working with Files and Directories
• Create, view, and edit files using touch, cat, nano. • Organize directories with mkdir, rmdir, cp, mv. • Understand absolute vs. relative paths. • Hands‑on: build a mini project folder structure.
0/6
🗓️ Day 3 – Permissions and Ownership
• Learn how Linux manages read, write, and execute permissions. • Commands: chmod, chown, chgrp. • Understand user roles (root, user, group). • Practice fixing permission errors and securing files.
0/6
🗓️ Day 4 – Processes and Services
• Understand what processes are and how to monitor them. • Commands: ps, top, kill, systemctl. • Learn how services start, stop, and restart. • Hands‑on: manage a simple service like nginx or ssh.
0/6
🗓️ Day 5 – Networking and Remote Access
• Basics of IP addresses, ports, and protocols. • Commands: ping, ip, ssh, scp. • Learn secure remote connections and file transfers. • Practice connecting to a remote server.
0/6
🗓️ Day 6 – Shell Scripting Essentials
• Introduction to shell scripting and variables. • Write simple scripts using echo, loops, and conditionals. • Learn how to make scripts executable. • Hands‑on: automate a daily task (e.g., backup or log cleanup).
0/6
Introduction to the Linux Terminal

Day 1: Absolute vs. Relative Paths

Note: We briefly introduced this concept in the previous section when learning cd, but because this is the #1 concept that trips up beginners, we are going to dive a bit deeper into the exact mechanics of how paths work.

When you are navigating the terminal, you are constantly giving the shell directions. If you tell the shell to delete a file, copy a folder, or move to a new directory, you have to tell it exactly where that item is.

There are only two ways to give the shell directions: Absolute Paths and Relative Paths.

Understanding the difference between the two is the difference between writing a command that works perfectly and getting a frustrating No such file or directory error.

The Analogy: Mailing Addresses vs. Street Directions

  • An Absolute Path is like a full mailing address: 123 Main Street, Springfield, IL 62701. No matter where you are in the world, if you hand that address to a postman, they know exactly how to find the house.

  • A Relative Path is like giving a friend street directions: “Go out the front door, take a left, and it’s the second house on the right.” These directions are completely useless unless your friend is already standing in your living room.

1. The Absolute Path

An absolute path traces the location of a file or folder all the way from the absolute top of the server—the Root directory (/).

The Rule: An absolute path always begins with a forward slash (/).

Example: /home/student/docs If you type cd /home/student/docs, the shell goes to the Root (/), looks for the home folder, looks inside that for student, and finally looks inside that for docs. It does not matter if your current location is deep inside /var/log/nginx or sitting in /etc; this command will teleport you to the exact same place every time.

2. The Relative Path

A relative path gives directions starting from your Current Working Directory (wherever pwd says you are standing right now).

The Rule: A relative path never begins with a forward slash.

Example 1: Moving Forward (docs) If you type cd docs, the shell looks at the room you are currently standing in. If there is a folder named docs right in front of you, it steps inside. If there isn’t, the command fails.

Example 2: Moving Backward (../docs) Remember the “double dot” (..) shortcut from the last lesson? It means “go up one level.” Imagine your current location is /home/student/pictures. If you type cd ../docs, you are giving the shell a two-step relative direction:

  1. .. means “step backward out of the pictures folder into the student folder.”

  2. /docs means “now look for a folder named docs here and step into it.” Your final location will be /home/student/docs.

When to Use Which?

Both paths are correct, but efficient engineers know when to use each:

Use Relative Paths for Speed (Daily Operations): If you are already working inside the /home/student/ directory and you want to enter the docs folder, typing the absolute path (cd /home/student/docs) is a waste of keystrokes. Just type the relative path (cd docs). Use relative paths when you are already in the “neighborhood” of your target.

Use Absolute Paths for Safety (Automation & Scripts): If you are jumping across the server (e.g., from /var/log to /etc), an absolute path is much easier than typing cd ../../etc. More importantly, when you start writing automated scripts on Day 6, you must use Absolute paths. A script runs blindly; it doesn’t know where the user was standing when they executed it. If your script says rm -rf docs (a relative command to delete a folder), it might accidentally delete the wrong docs folder depending on where it is run. If it says rm -rf /home/student/docs, it is completely bulletproof.