Module 06 of 12

Processes & Job Control

Lessons

About This Module

Every command you run becomes a process: a running program with its own ID, owner and share of the CPU and memory. Most of the time they start, do their job and disappear. But sometimes a program freezes, eats all the memory, or needs to keep running long after you've closed your laptop. This module gives you the tools to see what is running and take control of it.

It starts with viewing processes using ps, top and the friendlier htop. Then it covers signals: what kill really does, and why you should try a polite SIGTERM before a forceful kill -9. Next comes job control, using &, Ctrl+Z, jobs, bg, fg and nohup to juggle tasks in one terminal. The module finishes with tmux, which keeps whole terminal sessions alive on a server even after you disconnect.

Open a second terminal to experiment in as you watch the lessons in order, then continue on to Shell Environment & Config.

Lessons

4 videos
01

Linux Processes: top & htop

Tech With Tim explains what Linux processes are and how to view and stop them. He covers top, installing and using htop, the kill and killall commands, and ps.

02

Linux Signals and the kill Command

What Linux signals are, how processes respond to them, and how to use the kill command to send the right signal to a process, not just to end it.

03

Background Jobs: jobs, fg, bg and nohup

Running a script in the background with &, listing jobs, moving them between background and foreground with bg and fg, stopping them with kill, and using nohup so a job keeps running after you log out.

04

Basic tmux Tutorial & Cheatsheet

A straight-to-the-point introduction to tmux, a terminal multiplexer that gives you several command prompts in one window and keeps sessions running when you detach.