← Back to Home
⌨️

Linux Basics

Learn the essential terminal commands you'll use every single day as a DevOps engineer.

12 min read📚DevOps Fundamentals

Welcome to your first real Linux lesson. From here on you’ll work inside the terminal — just like professional DevOps, Cloud, and Site Reliability Engineers. Don’t worry if it feels new; every expert once typed their very first command.


🎯 Learning Objectives

By the end of this lesson you will be able to:


What is the Terminal?

Unlike Windows, where many tasks are done by clicking icons, Linux administrators spend much of their day in the terminal — typing commands that talk directly to the operating system. Learning the terminal is the single most important Linux skill.


Your First Commands

Print working directory — where am I?

bash — 80×24
student@devops:~$pwd

pwd stands for Print Working Directory. It tells you exactly where you are.

List files:

bash
ls        # list files
ls -l     # long format (permissions, size, date)
ls -la    # include hidden files

Change directory:

bash
cd Documents   # move into a folder
cd ..          # go back one level
cd             # return to your home directory

Creating and Removing Things

bash
mkdir linux-practice   # create a folder
cd linux-practice      # enter it
touch notes.txt        # create an empty file
ls                     # verify it exists
rm notes.txt           # remove the file
cd ..                  # leave the folder
rmdir linux-practice   # remove the (empty) folder

⚠ rm has no undo

There is no Recycle Bin on the Linux command line. rm deletes immediately and permanently. Double-check the path before you press Enter — especially with rm -r.


Relative vs Absolute Paths

Professional engineers use both every day.


Real DevOps Example

When you log into a fresh AWS EC2 server, the first three commands most engineers type are:

bash — 80×24
student@devops:~$pwd && ls -la && cd /var/log

These three commands alone are used thousands of times throughout a DevOps career.


🧪 Hands-on Lab

📝

Navigate and Manage Files

Complete the following, in order:

  1. Create a folder named practice
  2. Inside it, create a file named day1.txt
  3. Navigate into the folder and display your location
  4. List all files
  5. Delete the file, then delete the folder

💡 DevOps Tip

Don’t try to memorize commands. Use them repeatedly. Within a week your fingers will remember them automatically.


⚠ Common Beginner Mistakes

⚠ Watch Out For These


🧠 Knowledge Check

Knowledge Check

Which command shows your current location?

Knowledge Check

Which command creates a new directory?


💼 Interview Preparation

Interview Q&A

What is the difference between an absolute path and a relative path?


Summary

You’ve officially started using Linux from the command line. pwd, ls, cd, mkdir, touch, and rm are the foundation of everything you’ll do in DevOps.

Up Next

Linux Filesystem

You've mastered this lesson. Continue your journey to becoming a DevOps Engineer.

Start Next Lesson