Linux, terminal and Git

Stage 4 · Lesson 5 of 8

Foreground, background and jobs

Permissions, processes and packages

The shell can run a program in the , where it holds your terminal until it ends, or in the background, where you can keep typing. These are called jobs. Add & to the end of a command to start it in the background.

Press Ctrl+Z to pause the program in front of you. Then type bg to let it carry on in the background, or fg to bring it back to the front. jobs lists them.

Background jobs still stop when you close the terminal, unless you use nohup or a tool such as , covered in the server stage. This is handy for running a while you keep working.

Common trapstarting several dev servers in the background, forgetting them, and then fighting " already in use".

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

Practise

Keep handy

Also worth your time

  • See the users, permissions and process management branches of the Linux map

Mark this stage as not done?