MEPX
Chapter 7 of 10All chapters

Chapter 7 of 10

Processes

Seeing and stopping running programs.

Looking

ps lists processes and top or htop shows them live with their CPU and memory use. Every process has an id, which is how you refer to it.

  • kill asks a process to stop; kill -9 forces it and gives it no chance to tidy up.
  • An ampersand at the end of a command runs it in the background.

Staying alive

Closing the terminal usually ends what it started. nohup, tmux or a systemd service keep long jobs running after you disconnect.