The shell is a user-level ๐Ÿ’ผ Process that reads in commands to execute; this is the terminal we use to run stuff. The shell keeps track of jobsโ€”commands started interactivelyโ€”that can either be in the foreground or background. Each job is associated with a process group.

Session

A session is a collection of process groups either attached to a terminal or not attached to any terminal (daemonโ€™s). Within a session, there are foreground and background processes.

Foreground jobs read from terminal input stdin and also receive signals from the keyboard. Background jobs canโ€™t read stdin and will receive a signal if it tries to do so. Both types of jobs can write to stdout.