Linux for DevOps: What to Learn and What to Skip

By Branko Petric - Updated - About 4 weeks at 10 hours a week

The short answer

For DevOps, you need enough Linux to run and repair a server from the command line. That means logging in over SSH, managing users and permissions, running services with systemd, and finding out why something failed. You can skip kernel tuning and distro-hopping. Plan on about 4 weeks at 10 hours a week.

Why Linux comes first

Almost everything later on this roadmap runs on Linux. Docker containers use Linux features. Kubernetes nodes and most cloud servers usually run it too. When any of those break, you end up at a Linux command line, reading logs.

It also gives you fast feedback. You type a command and see what happens. That makes it a better first step than a large tool like Kubernetes, where one error can have many causes.

What to learn, in order

  1. Move around in the terminal. Learn ls, cd, cat, less, grep, and pipes (|, which send one command's output into another). Every later step uses these.
  2. Connect with SSH. SSH is how you log in to a remote server. Set up a key pair, because many servers turn off password login.
  3. Users and permissions. Learn chmod, chown and sudo. Permission errors are among the most common failures you will meet.
  4. Processes. Learn ps, top and kill, so you can see what is running and stop it.
  5. Services with systemd. systemd is the program that starts and watches services on most Linux servers. Learn systemctl and how to write a small unit file (the config file for a service).
  6. Logs. Learn journalctl and /var/log. Most troubleshooting starts here.
  7. Disk and memory. Learn df, du and free. A full disk is a classic cause of outages.
  8. Packages. Learn apt on Ubuntu, so you can install and update software.

What to skip for now

  • Kernel tuning and compiling your own kernel.
  • Deep disk topics such as LVM (a way to manage disks) beyond knowing that it exists.
  • Linux certifications such as RHCSA.
  • Trying lots of distros or customizing your desktop.

None of these will help you pass the test on this page. Some may matter later on the job.

Common mistakes

  • Using chmod 777 to make an error go away. It gives everyone full access to the file. Find out which user needs access, then give access only to that user.
  • Restarting before reading the logs. A restart can hide the cause. Read the logs first, so you know what you are fixing.
  • Only watching videos. You do not learn this by watching. Type every command on a machine you can break.

Your project

Create a virtual machine. Set up a user, SSH, and one service. Write down each step as a runbook (a list of steps someone else could follow). Then delete the machine and rebuild it from your notes, twice. Keep the runbook, because you will put it in Git at step 3.

You are done when

You can do all of this with no notes. If you already can, skip this step.

  • On a fresh virtual machine, you create a user who logs in with an SSH key, not a password.
  • You set file permissions so only that user can read a file, and you can explain the numbers in chmod 640.
  • You install a package, run it as a service with systemd, and make it start after a reboot.
  • You break that service on purpose, then find the reason in journalctl -u <service>.
  • A disk fills up, and you find what is using the space with df -h and du. You do the same for memory with free -h and top.

Learn it and test it

Free guides

Practice scenarios

Common questions

How much Linux do I need for DevOps?

Enough to pass the test on this page: run a service, fix it when it breaks, and find what is using the disk or memory. You do not need to be a Linux administrator before moving on. You will keep learning Linux at every later step.

Which Linux distro should I use to learn DevOps?

Use Ubuntu Server LTS (LTS means long-term support, so it gets updates for years). It is easy to find help for, and the skills carry over to other distros. The main thing that changes between distros is the package manager. Do not spend time comparing distros at this stage.

Can I learn Linux for DevOps on Windows or a Mac?

Yes. On Windows, WSL runs Linux inside Windows. On either system, you can use a virtual machine (a computer simulated inside your computer). A virtual machine is better for this step, because you can break it and rebuild it without any risk to your own computer.

Practice defending your decisions

DevOps Ledger is a scenario-based DevOps and SRE interview practice platform: you pick a real production incident, defend your decision in a chat against a senior-engineer AI that pushes back, and get scored against an answer key written before you started.

One payment. 12 months of access. No subscription, nothing renews.

Get full access - $19