Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

KaliRange / Foundations

Linux

One course from your first command to running and protecting systems. Terminal, administration, networking and hardening, operations.

52 lessons · about 40 hours · every command tested

How to use the lab files

The zip keeps the files of each lesson apart, and the lessons work in one flat folder. After you unzip it, sh kr-lab.sh LESSON FOLDER builds that folder as it stands after a lesson, for example sh kr-lab.sh 1-basics/00-set-up-your-lab ~/krlab/linux-basics.

You will build

Build a troubleshooting kit that collects evidence

You need

A computer with Linux, macOS, or Windows with WSL. No GPU, no cloud account and no paid tool.

Next course

Python for security work

Part 1

Basics

Start in the terminal. Files, text, pipes, editors, archives and permissions, with a task in every lesson. 13 lessons.

  1. 00Set up your Linux labPrepare a Linux shell that runs every lesson of the courseSet-up15 min
  2. 01Find your way in the file systemMove between folders and say where you are40 min
  3. 02Edit and repeat commands with keys, history and TabEdit a command line with keys, and drop a dangerous line safely35 min
  4. 03Use variables, write a script and make aliasesUse variables, quotes and wildcards in a command40 min
  5. 04Read and search text in logsCreate files, and read them in full, in part and as they grow45 min
  6. 05Pick fields and calculate with awkPrint chosen fields of each line30 min
  7. 06Join commands with pipes, redirects and teeSend the output and the errors of a command to files, and read a file as input40 min
  8. 07Edit files in the terminalOpen, change, save and close a file with nano45 min
  9. 08Find files and read their detailsFind files by name, type, size and age with find55 min
  10. 09Pack and unpack archives with tarPack a folder into an archive, list it and unpack it, also into another folder40 min
  11. 10Control who can read, write and runRead the owner, group and permission bits of a file and a directory55 min
  12. 11Build a script that triages a login logTurn a pipe of text tools into a script that takes a file nameBuild40 min
  13. 12Handle a case archive from a colleagueCheck, list and extract an archive from outside without riskTest70 min

Part 2

System administration

Look after a system. Users, services, packages, disks, load and scheduled work. 15 lessons.

  1. 00Set up a practice system where you are the administratorChoose a Linux system that you may change and breakSet-up30 min
  2. 01Identify the system you look afterName the distribution, its version and the kernel of a Linux system30 min
  3. 02Find out why a server is slowRead the load average, memory, CPU, disk and network numbers and say what each means40 min
  4. 03Find what fills a disk and free the spaceRead df for space and for inodes, and say which file system is full40 min
  5. 04Add a disk and mount itRead the block devices of a system and the file systems on them60 min
  6. 05Find, stop and prioritise processesList processes, read their parent and state, and stop one with a signal50 min
  7. 06Add and control accounts and groupsAdd, change, lock and remove accounts and groups, and read the files that hold them40 min
  8. 07Give limited rights with sudo rules and ACLsRun a command as another user and write a sudo rule that a checker accepts35 min
  9. 08Run, write and repair a systemd serviceList services and start, stop, restart, enable and disable one50 min
  10. 09Install, update and verify software safelyInstall, update, inspect and remove packages with apt, and say which package owns a file45 min
  11. 10Build a program from source and control what the shell runsBuild a small program from source and install it into a folder of your ownBuild35 min
  12. 11Write a safe shell scriptWrite a script that takes arguments, makes decisions and returns an exit code35 min
  13. 12Run a script on a scheduleWrite a cron line for a given time and install it without losing your other jobs30 min
  14. 13Build audit.sh to check your own machineWrite a read-only script that reports users, risky files, open ports, failed services and failed loginsBuild55 min
  15. 14Investigate a break-in on a serverFind the attack in a log, a user list, a key file, a disk report, a process list and the schedulesTest60 min

Part 3

Networking and hardening

Connect a system and protect it. Firewall, SSH, GnuPG, chroot, a web stack and the kernel. 12 lessons.

  1. 00Set up your networking and hardening labGet the practice system of the course ready, with two terminalsSet-up20 min
  2. 01Inspect the network from the shellRead the interfaces, addresses, routes and listening ports of your machine40 min
  3. 02Configure addresses, routes and namesAdd and remove an address, bring an interface up and down, and change routes45 min
  4. 03Filter traffic with a firewallWrite nftables rules that drop by default and allow by port and source50 min
  5. 04Run and harden an SSH serverInstall an SSH server, connect to it and log in with a key instead of a password55 min
  6. 05Copy files safely with scpCopy a file and a folder to and from a server with scp35 min
  7. 06Sign and encrypt files with GnuPGCreate a key pair, export a public key and import the key of another person45 min
  8. 07Isolate a program with chrootBuild a small directory tree and run a shell inside it with chroot45 min
  9. 08Install and harden a web stackInstall Linux, Apache, MariaDB and PHP and check that each part runs50 min
  10. 09Inspect, tune and build the kernelRead the kernel version, its parameters and its modules55 min
  11. 10Build a hardening check that proves your settingsWrite a script that compares the settings of a server with the rules of this partBuild45 min
  12. 11Scenario test - take over a small serverFind the weak points of a server that you take overTest75 min

Part 4

Operations and troubleshooting

Run systems in production. Boot, containers, Git, infrastructure as code and troubleshooting. 12 lessons.

  1. 00Set up your operations labGet the practice system ready for boot, container, Git and troubleshooting lessonsSet-up30 min
  2. 01Follow the boot process from power-on to loginName the stages of a boot and the files and tools that belong to each stage55 min
  3. 02Run software in containersPull an image, run a container from it and read its logs, stop it and remove it50 min
  4. 03Run several containers as one serviceRun two containers in one pod that share a network and a volume45 min
  5. 04Track changes with GitRecord, compare and undo changes in a Git repository, and work on a branch55 min
  6. 05Describe a system as codeRead and write YAML and JSON and validate a file before you use it60 min
  7. 06Troubleshoot the network layer by layerWork through a network fault in a fixed order, one change at a time, and write down what you see55 min
  8. 07Troubleshoot CPU and memory problemsFind a runaway process and a zombie and say how each one is dealt with55 min
  9. 08Troubleshoot a storage problem in the right orderTell a full disk, a lack of inodes, a deleted file that is still open, a wrong owner and a read-only mount apart50 min
  10. 09Troubleshoot logins, permissions, sudo and servicesFind why an account cannot log in, why a file cannot be read and why a sudo rule does not work55 min
  11. 10Build a troubleshooting kit that collects evidenceWrite a read-only script that collects the same evidence from any machine into a dated folderBuild50 min
  12. 11Scenario test - take over a server that is broken in five waysCollect evidence first, and find five faults of different kinds with the method of this partTest80 min

More practice

Labs and workbooks on the same skills, from the practice library. Do the lessons first.

Work roles

Work roles this course supports

The course helps you to prepare for these roles of the NICE Workforce Framework for Cybersecurity (NIST SP 800-181 Rev. 1). No single course covers a whole role, and KaliRange is not a certification body.

Role names and codes are NIST's (Components 2.2.0, 2026-04-28); the choice of roles is our own reading of the role descriptions. The NICE Framework at NIST has the full description of each role.