---
title: "Linux Server Administration"
description: "Essential terms every Linux system administrator and DevOps engineer should know."
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/glossary/post/linux-server-administration
---

# Linux Server Administration

This glossary covers essential Linux server administration concepts, from system architecture and user management to networking, storage, process management, performance tuning, and security hardening.

## Terms

### Kernel (System Architecture)

The core component of the Linux operating system that manages hardware resources, process scheduling, memory, and system calls, acting as a bridge between hardware and user-space applications.

**Example:** The Linux kernel allocating CPU time between running processes and handling a disk I/O interrupt.

```
uname -r
```

### Shell (System Architecture)

A command-line interpreter that provides an interface between the user and the kernel, accepting commands, executing programs, and scripting automation tasks.

**Example:** Using Bash to write a script that automates log rotation and sends an alert email.

```
echo $SHELL
```

### Bash (Bourne Again SHell) (System Architecture)

The most widely used Unix shell and scripting language on Linux systems, supporting variables, loops, conditionals, and functions for automation.

**Example:** Writing a Bash script to back up a directory and compress it with a timestamp.

```
```bash
#!/bin/bash
tar -czf backup-$(date +%F).tar.gz /var/www
```
```

### Terminal / TTY (System Architecture)

A text-based interface through which users interact with the shell and operating system, either physically on the server or virtually over a network connection.

**Example:** Opening a TTY session on a headless server by connecting via SSH.

```
tty
```

### Root User (Users & Permissions)

The superuser account in Linux with UID 0 that has unrestricted access to all commands, files, and system resources. Should be used sparingly for security reasons.

**Example:** Logging in as root to install a system package or modify a protected configuration file.

```
sudo su -
```

### sudo (Users & Permissions)

A command that allows permitted users to execute commands as the root user or another user, as configured in the /etc/sudoers file, without logging in as root.

**Example:** Running apt update as root via sudo without switching to the root account.

```
sudo apt update
```

### User Management (Users & Permissions)

The administration of user accounts on a Linux system, including creating, modifying, disabling, and deleting users and managing their group memberships.

**Example:** Creating a new system user for a web application with no login shell.

```
useradd -m -s /bin/bash -G sudo john
```

### Group (Users & Permissions)

A collection of user accounts that share the same access permissions to files and resources, simplifying permission management across multiple users.

**Example:** Adding a developer user to the docker group to allow running Docker commands without sudo.

```
usermod -aG docker john
```

### File Permissions (Users & Permissions)

A set of rules in Linux that control who can read, write, or execute a file or directory, defined for three classes   owner, group, and others.

**Example:** Making a shell script executable by its owner while keeping it read-only for others.

```
chmod 750 deploy.sh
```

### chmod (Users & Permissions)

A Linux command used to change the read, write, and execute permissions of files and directories for the owner, group, and others.

**Example:** Granting full permissions to the owner and read-only to everyone else on a config file.

```
chmod 644 /etc/app/config.yaml
```

### chown (Users & Permissions)

A Linux command used to change the ownership of a file or directory, assigning a new owner user and optionally a new group.

**Example:** Transferring ownership of a web root directory to the www-data user and group.

```
chown -R www-data:www-data /var/www/html
```

### /etc/passwd (Users & Permissions)

A plain text file that stores essential information about each user account on the system, including username, UID, GID, home directory, and default shell.

**Example:** Inspecting /etc/passwd to verify the home directory and shell assigned to a new user.

```
cat /etc/passwd | grep john
```

### SSH (Secure Shell) (Networking)

A cryptographic network protocol for securely logging into and executing commands on remote servers over an unsecured network, replacing older protocols like Telnet.

**Example:** Connecting to a remote AWS EC2 instance using an SSH key pair.

```
ssh -i ~/.ssh/my-key.pem ubuntu@192.168.1.10
```

### SSH Key Pair (Networking)

A pair of cryptographic keys   a private key kept locally and a public key placed on the remote server   used to authenticate SSH connections without a password.

**Example:** Generating an Ed25519 SSH key pair and copying the public key to a remote server.

```
ssh-keygen -t ed25519 -C "admin@example.com"
```

### sshd_config (Networking)

The main configuration file for the OpenSSH server daemon, controlling options such as permitted authentication methods, port, and allowed users.

**Example:** Disabling root login and password authentication in sshd_config to harden a server.

```
```
PermitRootLogin no
PasswordAuthentication no
Port 2222
```
```

### Firewall (Networking)

A security system that monitors and controls incoming and outgoing network traffic based on predetermined rules, protecting the server from unauthorized access.

**Example:** Allowing only port 22 and 443 through the firewall and blocking all other inbound traffic.

```
ufw allow 22/tcp && ufw allow 443/tcp && ufw enable
```

### ufw (Uncomplicated Firewall) (Networking)

A user-friendly frontend for managing iptables firewall rules on Ubuntu and Debian-based systems, designed to simplify firewall configuration.

**Example:** Enabling ufw and allowing HTTP, HTTPS, and SSH traffic on a new server.

```
ufw allow OpenSSH && ufw allow "Nginx Full" && ufw enable
```

### iptables (Networking)

A powerful Linux command-line utility for configuring kernel-level packet filtering rules that control network traffic flowing through the system.

**Example:** Blocking all incoming traffic from a specific IP address using an iptables DROP rule.

```
iptables -A INPUT -s 203.0.113.5 -j DROP
```

### netstat / ss (Networking)

Command-line tools for displaying network connections, routing tables, and interface statistics. ss is the modern replacement for the deprecated netstat.

**Example:** Listing all processes listening on TCP ports to verify which services are running.

```
ss -tlnp
```

### DNS (Domain Name System) (Networking)

A hierarchical system that translates human-readable domain names into IP addresses, enabling servers and clients to locate each other on a network.

**Example:** Using dig to resolve a domain name and inspect its DNS records from the command line.

```
dig example.com A
```

### /etc/hosts (Networking)

A local file that maps hostnames to IP addresses, taking precedence over DNS resolution and useful for custom hostname overrides or blocking domains.

**Example:** Adding a local mapping so that myapp.local resolves to 127.0.0.1 during development.

```
echo '127.0.0.1 myapp.local' >> /etc/hosts
```

### Process (Process Management)

An instance of a running program on a Linux system, each identified by a unique Process ID (PID) and managed by the kernel for CPU and memory allocation.

**Example:** Listing all running processes on a server to identify which ones are consuming the most CPU.

```
ps aux --sort=-%cpu | head -20
```

### PID (Process ID) (Process Management)

A unique numerical identifier assigned by the kernel to every running process, used to reference and manage processes with commands like kill and nice.

**Example:** Finding the PID of a running Nginx process to send it a reload signal.

```
pidof nginx
```

### systemd (Process Management)

The standard init system and service manager for most modern Linux distributions, responsible for bootstrapping the system and managing services, sockets, and timers.

**Example:** Using systemctl to start, stop, enable, and check the status of system services.

```
systemctl status nginx
```

### systemctl (Process Management)

The primary command-line tool for interacting with systemd, used to manage services   starting, stopping, enabling, disabling, and reloading them.

**Example:** Enabling the Nginx service to start automatically on boot and starting it immediately.

```
systemctl enable --now nginx
```

### journalctl (Process Management)

A command-line tool for querying and viewing logs collected by the systemd journal, supporting filtering by service, time range, priority, and more.

**Example:** Following live logs for the SSH daemon to monitor login attempts in real time.

```
journalctl -u sshd -f
```

### kill / killall (Process Management)

Commands used to send signals to processes, most commonly SIGTERM (graceful stop) or SIGKILL (force stop), to terminate or control running processes.

**Example:** Forcefully terminating a frozen process by sending SIGKILL using its PID.

```
kill -9 1234
```

### top / htop (Process Management)

Interactive command-line utilities that display real-time information about running processes, CPU usage, memory consumption, and system load.

**Example:** Using htop to identify a rogue process consuming 100% CPU on a production server.

```
htop
```

### cron (Process Management)

A time-based job scheduler in Linux that runs commands or scripts automatically at specified intervals, configured through crontab files.

**Example:** Scheduling a database backup script to run every day at 3:00 AM.

```
```
# m h dom mon dow command
0 3 * * * /opt/scripts/backup.sh
```
```

### crontab (Process Management)

The configuration file and command used to define and manage cron jobs for a specific user, with each line specifying a schedule and command to run.

**Example:** Editing the crontab for the current user to add a new scheduled task.

```
crontab -e
```

### Package Manager (Software Management)

A tool that automates the installation, upgrade, configuration, and removal of software packages on a Linux system, resolving dependencies automatically.

**Example:** Using apt to install, update, and remove packages on an Ubuntu server.

```
apt install curl git vim -y
```

### apt / apt-get (Software Management)

The package management tools for Debian-based Linux distributions like Ubuntu, used to install, update, upgrade, and remove software packages from repositories.

**Example:** Updating the package index and upgrading all installed packages on an Ubuntu server.

```
apt update && apt upgrade -y
```

### yum / dnf (Software Management)

Package managers for Red Hat-based Linux distributions such as CentOS, RHEL, and Fedora. dnf is the modern replacement for yum with improved performance.

**Example:** Installing the Apache web server on a CentOS server using dnf.

```
dnf install httpd -y
```

### Filesystem (Storage)

The method and structure used by the operating system to organize, store, and retrieve files on a storage device, defining how data is laid out on disk.

**Example:** Formatting a new disk with the ext4 filesystem before mounting it.

```
mkfs.ext4 /dev/sdb1
```

### Mount (Storage)

The process of making a filesystem accessible at a specific directory path (mount point) in the Linux directory tree so the OS and users can read and write to it.

**Example:** Mounting an additional EBS volume to /data on an EC2 instance.

```
mount /dev/sdb1 /data
```

### /etc/fstab (Storage)

A system configuration file that defines how disk partitions and storage devices are automatically mounted at boot time, including their mount points and options.

**Example:** Adding an entry to /etc/fstab to automatically mount an NFS share on every boot.

```
echo '/dev/sdb1 /data ext4 defaults 0 2' >> /etc/fstab
```

### df (Storage)

A command that reports the amount of disk space used and available on all mounted filesystems, helping identify storage capacity issues.

**Example:** Checking disk usage across all mounted filesystems in human-readable format.

```
df -h
```

### du (Storage)

A command that estimates the disk space used by files and directories, useful for identifying large files and directories consuming storage.

**Example:** Finding the top 10 largest directories under /var to diagnose a full disk.

```
du -sh /var/* | sort -rh | head -10
```

### LVM (Logical Volume Manager) (Storage)

A storage abstraction layer in Linux that allows flexible management of disk space by grouping physical volumes into volume groups and carving them into logical volumes that can be resized dynamically.

**Example:** Extending a logical volume and its filesystem online without downtime.

```
lvextend -L +10G /dev/vg0/data && resize2fs /dev/vg0/data
```

### Memory (RAM) (Performance)

The physical random-access memory available to the system for storing running processes and kernel data, directly affecting system performance and capacity.

**Example:** Checking total, used, and available RAM on a server to diagnose a memory pressure issue.

```
free -h
```

### Swap (Performance)

A designated area on disk that the Linux kernel uses as an overflow for RAM when physical memory is exhausted, allowing the system to continue operating at reduced performance.

**Example:** Creating and enabling a 4GB swap file on a server that ran out of RAM.

```
```bash
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
```
```

### Load Average (Performance)

A metric that represents the average number of processes waiting for CPU time over the last 1, 5, and 15 minutes, used to assess overall system load.

**Example:** Checking the load average to determine if a server is overloaded relative to its CPU count.

```
uptime
```

### vmstat (Performance)

A command that reports virtual memory statistics, including processes, memory, swap, I/O, and CPU activity, useful for diagnosing performance bottlenecks.

**Example:** Running vmstat every second to observe memory and CPU usage patterns during a load test.

```
vmstat 1 10
```

### strace (Performance)

A diagnostic tool that traces system calls and signals made by a process, helping debug application issues and understand how a program interacts with the kernel.

**Example:** Attaching strace to a running process to see which files it is trying to open.

```
strace -p 1234 -e trace=openat
```

### Syslog (Logging)

The standard logging system on Linux that collects messages from the kernel and applications, routing them to log files or remote logging servers based on facility and severity.

**Example:** Checking /var/log/syslog for system-level messages after an unexpected reboot.

```
tail -f /var/log/syslog
```

### logrotate (Logging)

A utility that automates the rotation, compression, and deletion of log files to prevent them from filling up disk space, configured via /etc/logrotate.conf.

**Example:** Configuring logrotate to rotate Nginx access logs weekly and keep 4 weeks of history.

```
```
/var/log/nginx/*.log {
  weekly
  rotate 4
  compress
  missingok
  notifempty
}
```
```

### rsyslog (Logging)

A high-performance system logging daemon that extends syslog with features like filtering, TCP/TLS transport, and forwarding logs to remote centralized servers.

**Example:** Configuring rsyslog to forward all auth logs to a centralized Graylog server.

```
```
*.* @@logs.example.com:514
```
```

### Environment Variable (Configuration)

A named value stored in the shell environment that affects how processes behave, commonly used to pass configuration like paths, credentials, and flags to applications.

**Example:** Setting PATH to include a custom binary directory for the current session.

```
export PATH=$PATH:/opt/myapp/bin
```

### /etc directory (Configuration)

The standard Linux directory that contains system-wide configuration files for the operating system and installed applications, editable by the root user.

**Example:** Editing /etc/nginx/nginx.conf to update the web server configuration.

```
ls /etc/
```

### /var directory (Configuration)

A Linux directory that holds variable data files that change during normal system operation, including logs, spools, caches, and runtime data.

**Example:** Inspecting /var/log to find application and system log files.

```
ls /var/log/
```

### Symbolic Link (symlink) (Filesystem)

A special file that acts as a pointer to another file or directory, allowing the same resource to be accessed from multiple locations in the filesystem.

**Example:** Creating a symlink so that /usr/local/bin/python points to the desired Python version.

```
ln -s /usr/bin/python3.11 /usr/local/bin/python
```

### grep (Text Processing)

A command-line tool for searching plain text for lines matching a pattern using regular expressions, widely used for filtering logs and configuration files.

**Example:** Searching all log files in /var/log for lines containing the word ERROR.

```
grep -r "ERROR" /var/log/
```

### sed (Text Processing)

A stream editor for filtering and transforming text, commonly used in scripts to perform find-and-replace operations on files or command output.

**Example:** Replacing all occurrences of localhost with a production hostname in a config file in place.

```
sed -i 's/localhost/prod.example.com/g' /etc/app/config.conf
```

### awk (Text Processing)

A versatile text-processing language used for pattern scanning and reporting, especially useful for parsing structured output and extracting specific fields.

**Example:** Printing only the process name and memory usage columns from ps output.

```
ps aux | awk '{print $11, $6}'
```

### tar (File Management)

A command-line utility for creating, extracting, and managing archive files, often combined with compression tools like gzip or bzip2 for backup and distribution.

**Example:** Creating a compressed tarball of the /etc directory as a configuration backup.

```
tar -czf etc-backup-$(date +%F).tar.gz /etc
```

### rsync (File Management)

A fast and versatile file synchronization and transfer tool that efficiently copies files locally or over SSH, transferring only the differences between source and destination.

**Example:** Syncing a local web directory to a remote server over SSH, deleting files removed locally.

```
rsync -avz --delete /var/www/ user@server:/var/www/
```

### NFS (Network File System) (Storage)

A distributed filesystem protocol that allows a server to share directories over a network, enabling client machines to mount and access remote storage as if it were local.

**Example:** Mounting a shared NFS export from a file server to /mnt/shared on a client node.

```
mount -t nfs fileserver:/exports/shared /mnt/shared
```

### SELinux / AppArmor (Security)

Mandatory Access Control (MAC) security frameworks for Linux that enforce fine-grained policies restricting what processes can access, going beyond standard file permissions.

**Example:** Using AppArmor to confine Nginx so it can only read files within /var/www and /etc/nginx.

```
aa-status
```

### PAM (Pluggable Authentication Modules) (Security)

A flexible authentication framework in Linux that decouples authentication logic from applications, allowing system-wide policies for login, password strength, and MFA.

**Example:** Configuring PAM to enforce a minimum password length and complexity policy.

```
cat /etc/pam.d/common-password
```

### Kernel Parameters (sysctl) (Performance)

Runtime configuration variables that control kernel behavior such as network stack settings, memory management, and security policies, managed via the sysctl command.

**Example:** Tuning the network stack to increase the maximum number of open file descriptors.

```
```bash
sysctl -w net.core.somaxconn=65535
echo 'net.core.somaxconn=65535' >> /etc/sysctl.conf
```
```
