What a process is
A process is a running instance of a program. It has a process ID, a parent process, memory, open files, environment variables, permissions, and scheduling state.
Programs are files on disk. Processes are live execution. Running /usr/bin/ssh creates an ssh process. Running it twice creates two processes.
Parent and child processes
Processes form a tree. Your terminal starts a shell. The shell starts commands as child processes. Services may start worker children. When a parent exits, children are reparented or stopped depending on how they were launched.
Seeing the tree helps explain why closing a terminal can stop programs launched from it, and why services should be managed by systemd rather than started manually in a random shell.
Foreground and background jobs
A foreground job owns the terminal until it exits, pauses, or is interrupted. A background job continues while the shell accepts more commands. Shell job control is useful for interactive work but is not a service manager.
long-command &
jobs
fg %1Process states and signals
Processes may be running, sleeping, stopped, zombie, or waiting on I/O. A process consuming no CPU may still be alive because it is waiting for disk, network, timers, or input.
Signals are messages sent to processes. SIGTERM asks a process to exit. SIGKILL forces immediate termination. SIGHUP often asks daemons to reload configuration, depending on the program.
| Signal | Meaning | Use carefully because |
|---|---|---|
| SIGTERM | Request clean termination | The process may need time to shut down |
| SIGKILL | Force termination | No cleanup is possible |
| SIGHUP | Hangup or reload request | Behavior is program-specific |
| SIGSTOP | Pause process | It cannot be caught by the process |
systemd, services, and daemons
A daemon is a background process that provides a service, such as SSH, printing, logging, DNS caching, a database, or a web server. systemd is the init system and service manager used by many distributions.
systemd units describe how services start, stop, restart, depend on other units, log output, and participate in boot. A service can be active now without being enabled at boot, and enabled at boot without currently running.
Enabling, disabling, starting, and stopping
start and stop affect the current boot. enable and disable affect future boot behavior. restart stops and starts a service. reload asks a service to reread configuration without a full restart if it supports that operation.
systemctl status sshsudo systemctl enable --now sshjournalctl -u ssh --since todayBoot-to-login flow
After the kernel starts the first user-space process, systemd brings up targets and services. On a server, the path may end with a text login or SSH service. On a desktop, it continues through a display manager and desktop session.
When troubleshooting startup, ask which phase failed: kernel boot, systemd unit startup, login manager, desktop session, or a user shell configuration file.