3.1 Processes, Services, and Packages
You can now move around, inspect, edit, and change permissions. Next, treat Linux as a running system: which programs are running? Is a service healthy? How is software installed?
Processes: running programs
Common commands:
ps aux
top
htop
pgrep -a nginx
kill -TERM 1234
kill -9 1234ps gives a snapshot, top watches resources continuously, and pgrep finds processes by name. kill does not delete files; it sends signals to processes. Usually try TERM politely first and save KILL for last.
Package management
Different distribution families use different package managers:
| Distribution family | Common package manager |
|---|---|
| Debian / Ubuntu | apt |
| Fedora / Rocky / RHEL | dnf or yum |
| Arch | pacman |
| Alpine | apk |
Common flow:
sudo apt update
sudo apt install nginx
sudo apt remove nginxupdate refreshes the package index. It does not upgrade every program. install installs software. On real servers, installing a service is usually only the first step; you still need to start it, inspect status, read logs, and confirm its port.
systemd services
Many Linux servers use systemd to manage long-running services:
systemctl status nginx
sudo systemctl start nginx
sudo systemctl stop nginx
sudo systemctl restart nginx
sudo systemctl enable nginx
journalctl -u nginx -n 50start runs a service now. enable makes it start automatically at boot. status shows current state, and journalctl shows service logs.
The next section continues with the surrounding skills: confirming that a network endpoint really responds, packaging files, passing configuration through environment variables, and keeping jobs running in the background or on a schedule.