Learning path

The Linux command line for Windows admins

Enough Bash to find your way around a Linux server, read its logs and check its disks, with three tested scripts to take away.

Beginner · About 2 and a half hours · 16 steps

Sooner or later every Windows admin is handed a Linux box. This path covers what you need on that first day: moving around, reading files and logs, and checking disk and memory. The lab exercises tick themselves off as you solve them.

If you know PowerShell, the ideas carry over. The big difference is that Bash pipes pass text, not objects.

  1. Shell Lab · Bash · Getting startedWhere am I?

  2. Shell Lab · Bash · Navigating and listingList your folder

  3. Shell Lab · Bash · Navigating and listingLong listing

    The long listing shows permissions, owners and sizes: most of what you need to know about a file.

  4. Shell Lab · Bash · Navigating and listingRead a file

  5. Shell Lab · Bash · Navigating and listingMove into a folder

  6. Cheat sheetThe Bash cheat sheet

    Keep it open for the rest of the path.

  7. Shell Lab · Bash · Reading and filtering textFind matching lines

    grep is the tool you will use most on a Linux server.

  8. Shell Lab · Bash · Reading and filtering textFirst few lines

  9. Shell Lab · Bash · Counting and summarisingTally by value

  10. Shell Lab · Bash · System resourcesDisk space

  11. Shell Lab · Bash · System resourcesMemory in use

  12. Shell Lab · Bash · System logsErrors only

    journalctl is where a modern Linux system keeps its logs.

  13. ScriptRead a real script: summarise failed SSH logins

    Who is knocking on the door, and how often.

  14. Shell Lab · Bash · ScriptingLoop over files

    A for loop over files is the start of every Bash script.