A first look at processes and services
You learn from the very beginning how to see running programs, close a frozen one, send work to the background and tell whether a service is running.
Level 101 · 13 lessons · 12 practice labs
Lessons
What a process is
- A process: a running program and its ID
- Looking at what's running with ps
- Reading the top and htop screens
- The process tree: who started whom (pstree)
- Short task: find the three processes using the most CPU
Managing processes
- Stopping a program politely and forcing it to close
- Background and foreground: &, Ctrl-Z and fg
- A job that survives logout: nohup
- Short task: close an unresponsive program without losing data
Services
- What a service is: a program always running in the background
- Reading systemctl status output
- Starting, stopping and enabling at boot
- Capstone: on a slowing machine, find the guilty process and the stopped service
Practice labs
- Count running processes and pick out your own: Find the total number of running processes and how many belong to your own user.
- Find a process's parent: Find the PID of a given program and the name of the parent that started it.
- Tell apart several copies of one program: Of three copies of the same script, determine which has run longest and from which terminal it was started.
- Close a stuck program gracefully: Try to close an unresponsive program with the gentle signal first, force it only if needed and explain the difference.
- Send a long job to the background and bring it back: Suspend a long-running command, resume it in the background, see it in the job list and bring it to the foreground again.
- Read the cause of slowness from top: On a slow machine sort the top screen by CPU and by memory to find the process responsible and close it.
- Check whether a service is running: Query the status of three services and submit the name of the one not running.
- Start a service and make it start at boot: Start a stopped service, enable it at boot and show from the output that the two states are separate things.
- Find the error message of a service that will not start: Read the logs of a service that stops right after starting, fix the typo and get it running.
- Find the process holding a file open: Find the process keeping a directory busy so it cannot be removed or unmounted and submit its name.
- Learn who started a process and when: Extract the owner, start time and full command of a process that began running at night.
- Investigate whether an unfamiliar process is harmless: For an unfamiliar process in the list find which package owns its file and which service started it, and write a short assessment.
About this course
You learn from the very beginning how to see running programs, close a frozen one, send work to the background and tell whether a service is running.
What you will learn
- What a process is
- Managing processes
- Services
Prerequisites
No prior knowledge is needed; the course starts from zero.
Lab environment
Lessons run in your own Kali Linux terminal that opens in the browser. Nothing to install; the lab starts clean in every lesson.
Frequently asked questions
- Is this course right for my level?
- The course is at beginner level; every term is explained where it first appears.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.