Lecture 15: Linux Administration
Outline
Users, Groups, Passwords
- Users and groups provide access control
- Users have access to their own home directories, …
- Groups can provide common access settings to multiple users
- e.g.
sudo is a group on Debian systems that provides administrative permissions
- Create users with
useradd
- Change passwords with
passwd
- View users in a group with
getent group <group-name>
- Add and remove users from a group using
usermod
Packages
- Linux applications
- Generally installed via terminal
- Different distros use different package managers
- Debian:
apt (dpkg)
apt update
apt install <package>
apt remove <package>
- Fedora/RHEL:
dnf (rpm)
dnf install <package>
dnf remove <package>
Processes and Init System
- Operating systems treat each running application as a process
- Every process has a Process ID (PID) and a parent
init has PID=1 and is started by kernel
init brings up user services (e.g. Graphical User Interface, WiFi, …)
- Processes can be killed (
pkill, kill, killall)
systemd – suite for managing processes
- We can ask
systemd to start processes at startup
- View startup data with
systemd-analyze
- Operates like a task scheduler for applications
- Used on a majority of Linux distros (some use OpenRC instead, I’m sure there are others as well)
- Controlled with
systemctl
Recording