DEV Community

Aisalkyn Aidarova
Aisalkyn Aidarova

Posted on

Linux Lab 1 – Build Your Own Linux Server

Objective

Become comfortable managing a Linux server without looking up commands.

Tasks

  1. Connect to the server using SSH.

  2. Check:

   whoami
   hostname
   pwd
   uname -a
Enter fullscreen mode Exit fullscreen mode
  1. Create the following structure:
   /company
       /dev
       /qa
       /prod
       /backup
Enter fullscreen mode Exit fullscreen mode
  1. Create users:
  • developer
  • tester
  • devops
  1. Create groups:
  • developers
  • testers
  • admins
  1. Add each user to the proper group.

  2. Verify everything.

What they learn

  • Linux hierarchy
  • Users
  • Groups
  • Ownership

Linux Lab 2 – Permissions Challenge

Students receive this situation:

"The developer cannot deploy because Permission denied appears."

They must solve it.

Tasks

Create

mkdir /application
touch app.log
Enter fullscreen mode Exit fullscreen mode

Give wrong permissions.

Students must investigate.

Commands allowed

ls -l
chmod
chown
chgrp
id
groups
Enter fullscreen mode Exit fullscreen mode

Questions

  • Why did Permission denied happen?
  • Which permission is missing?
  • Difference between owner, group, others?

Linux Lab 3 – File System Investigation

Students must answer

Where are these stored?

  • Users
  • Passwords
  • Groups
  • Services
  • Logs
  • Nginx config
  • SSH config
  • DNS configuration

Commands

cat /etc/passwd
cat /etc/group
cat /etc/hosts
cat /etc/resolv.conf
Enter fullscreen mode Exit fullscreen mode

Find

/etc

/var

/home

/usr

/opt

/tmp

/proc

/dev
Enter fullscreen mode Exit fullscreen mode

Goal

Understand the Linux directory structure.


Linux Lab 4 – Searching Like a DevOps Engineer

Find

A file named

production.log
Enter fullscreen mode Exit fullscreen mode

Find all

*.conf
Enter fullscreen mode Exit fullscreen mode

Find all files larger than 100 MB.

Find all files modified today.

Find every occurrence of

database
Enter fullscreen mode Exit fullscreen mode

Commands

find
locate
grep
which
whereis
Enter fullscreen mode Exit fullscreen mode

Linux Lab 5 – Package Management

Install

nginx
git
tree
curl
wget
htop
Enter fullscreen mode Exit fullscreen mode

Verify installation.

Remove one package.

Reinstall it.

Questions

  • What is apt?
  • What is a repository?
  • Why update before installing?

Linux Lab 6 – Processes

Run

sleep 500
Enter fullscreen mode Exit fullscreen mode

Open another terminal.

Find it.

Kill it.

Start nginx.

Stop nginx.

Restart nginx.

Check status.

Commands

ps
top
htop
kill
killall
systemctl
journalctl
Enter fullscreen mode Exit fullscreen mode

Questions

  • Difference between process and service?
  • Why doesn't killing a process always stop a service permanently?

Linux Lab 7 – Storage

Students investigate

df -h
du -sh /*
lsblk
mount
Enter fullscreen mode Exit fullscreen mode

Questions

Which disk is mounted?

How much free space remains?

Which folder consumes the most space?


Linux Lab 8 – Logs

Students must investigate

Someone attempted to log in but failed.
Enter fullscreen mode Exit fullscreen mode

Find

SSH logs

System logs

Kernel logs

Nginx logs

Commands

journalctl

tail

less

grep
Enter fullscreen mode Exit fullscreen mode

Questions

Why are logs critical in DevOps?


Linux Lab 9 – CPU & Memory

Run

yes > /dev/null
Enter fullscreen mode Exit fullscreen mode

Investigate

top
Enter fullscreen mode Exit fullscreen mode

Kill it.

Run memory test

stress-ng --vm 2 --vm-bytes 512M
Enter fullscreen mode Exit fullscreen mode

Investigate

free -h

vmstat
Enter fullscreen mode Exit fullscreen mode

Questions

What happens when CPU reaches 100%?

What happens when RAM is exhausted?


Linux Lab 10 – Services

Students manage

  • nginx
  • ssh
  • cron

Commands

systemctl start

systemctl stop

systemctl restart

systemctl reload

systemctl enable

systemctl disable

systemctl status
Enter fullscreen mode Exit fullscreen mode

Questions

Difference between

Start

Restart

Reload

Enable

Disable


Linux Lab 11 – Bash

Write scripts

Example

#!/bin/bash

echo "Today's date:"
date

echo "Current user:"
whoami

echo "Current directory:"
pwd
Enter fullscreen mode Exit fullscreen mode

Second script

Backup

cp -r /company /backup
Enter fullscreen mode Exit fullscreen mode

Third

mkdir project{1..10}
Enter fullscreen mode Exit fullscreen mode

Linux Lab 12 – Troubleshooting Challenge (Best One)

Do not tell students what is wrong.

Break the server before class:

  • Stop nginx.
  • Delete the website.
  • Fill the disk to 95%.
  • Change permissions.
  • Stop SSH.
  • Remove a user from the sudo group.
  • Kill a process.
  • Rename a configuration file.

Then give them only this ticket:

Incident #1045

Users report that the website is unavailable. The developer cannot deploy new code. The server is running slowly. Investigate and restore the server.

They can use any Linux commands they've learned, but they must document:

  • What symptoms they observed.
  • Which commands they used.
  • The root cause.
  • The fix they applied.
  • How they verified the issue was resolved.

This mirrors real DevOps work much better than following a list of commands. In production, engineers are rarely told what is broken—they have to investigate, identify the root cause, and restore the service. This kind of lab builds both Linux confidence and troubleshooting skills, which are exactly what employers look for in junior DevOps engineers.

Top comments (0)