Linux Server Administration 2026 : Complete Guide to Managing & Securing Linux Servers

Linux Server Administration: Complete Guide to Managing, Securing and Troubleshooting Linux Servers

Introduction

Linux is one of the most important operating-system platforms in modern IT infrastructure.

It powers:

  • Web servers
  • Database servers
  • DNS servers
  • Mail infrastructure
  • Cloud workloads
  • Container platforms
  • Kubernetes nodes
  • Network appliances
  • Security systems
  • CI/CD infrastructure
  • Virtualization environments
  • Storage systems
  • Development environments

Learning Linux server administration therefore means learning much more than a collection of terminal commands.

A professional Linux administrator needs to understand how several layers interact:

                    Linux Server
                         │
        ┌────────────────┼────────────────┐
        │                │                │
     Hardware         Operating        Network
        │              System             │
        │                │                │
        │       ┌────────┼────────┐       │
        │       │        │        │       │
      CPU     Users   Services  Storage  Firewall
      RAM     Groups  systemd   Files    Routing
      Disk    SSH     Logs      LVM      DNS

The objective of Linux server administration is to keep those components:

  • Available
  • Secure
  • Performant
  • Observable
  • Recoverable
  • Properly configured

This guide explains how to approach Linux administration systematically rather than memorizing isolated commands.

If you are completely new to infrastructure, begin with Servers & Infrastructure Explained and Virtualization Explained before building larger Linux laboratories.


What Is Linux Server Administration?

Linux server administration is the process of installing, configuring, securing, monitoring, maintaining, troubleshooting, and automating Linux-based servers.

A server administrator typically works with:

Area Responsibilities
Operating system Installation, updates, configuration
Users Accounts, groups, authentication
Permissions Ownership, modes, ACLs
Networking IP, routes, DNS, interfaces
Services systemd, daemons, dependencies
Storage Disks, partitions, filesystems
Security SSH, firewall, hardening
Logs Journald, application logs
Monitoring CPU, RAM, disk, network
Backup Data and configuration recovery
Automation Bash, Ansible, scripts
Troubleshooting Root-cause analysis
Availability Redundancy and recovery

Professional administration is therefore an ongoing lifecycle:

Plan
 ↓
Install
 ↓
Configure
 ↓
Secure
 ↓
Monitor
 ↓
Maintain
 ↓
Troubleshoot
 ↓
Automate
 ↓
Recover
 ↓
Improve

Linux Server Architecture

Before administering Linux, it is useful to understand the basic architecture.

Applications
     │
     ▼
User Space
     │
     ├── Shell
     ├── Services
     ├── Libraries
     └── Utilities
     │
     ▼
System Calls
     │
     ▼
Linux Kernel
     │
     ├── CPU scheduling
     ├── Memory management
     ├── Networking
     ├── Storage
     ├── Security
     └── Drivers
     │
     ▼
Hardware

The kernel is responsible for managing the underlying resources, while user-space programs provide most administration and application functionality.

This separation is fundamental when troubleshooting.

For example, if an application cannot access a disk, the problem could exist at several layers:

Application
   ↓
Filesystem
   ↓
Block device
   ↓
Storage controller
   ↓
Kernel driver
   ↓
Physical/virtual disk

Changing application settings will not fix a failed physical disk.


Linux Server Distributions

Linux is not a single operating system distribution.

Common server families include:

  • Ubuntu Server
  • Debian
  • Red Hat Enterprise Linux
  • Rocky Linux
  • AlmaLinux
  • SUSE Linux Enterprise Server
  • openSUSE
  • Fedora Server
  • Oracle Linux

The underlying Linux kernel is shared across the ecosystem, but administration tools, package systems, default configurations, security frameworks, and lifecycle policies can differ.

For example:

Debian / Ubuntu
        │
       apt
        │
      .deb

RHEL / Fedora family
        │
       dnf
        │
      .rpm

This distinction becomes important when writing automation.

A command that works on Ubuntu should not automatically be assumed to work identically on RHEL.


Ubuntu Server and RHEL Administration

Ubuntu Server provides extensive official server documentation covering installation, networking, storage, high availability, security, and other administration tasks.

Red Hat Enterprise Linux provides its own administration framework and documentation, including systemd, SELinux, user management, networking, storage, and security.

For example, RHEL 10 uses systemd to manage system services, while SELinux can participate in authorization decisions surrounding service management.

This illustrates an important principle:

Linux administration requires both distribution-specific knowledge and transferable Linux fundamentals.


The Linux Filesystem

Linux organizes files through a hierarchical filesystem.

The root directory is:

/

Important directories include:

Directory Typical purpose
/etc System configuration
/var Variable data and logs
/home User home directories
/root Root user’s home
/usr Applications and system resources
/bin Essential commands
/sbin Administrative commands
/tmp Temporary files
/opt Optional software
/srv Service data
/dev Device files
/proc Process/kernel information
/sys Kernel/device information
/run Runtime state

A good administrator should understand where configuration, runtime state, logs, and application data are stored.


Essential Linux Navigation Commands

Start with:

pwd
ls
cd
mkdir
cp
mv
rm
touch
cat
less
head
tail

Examples:

pwd

shows the current directory.

ls -lah

displays files with permissions, ownership, sizes, and hidden files.

cd /etc

moves into the system configuration directory.

sudo ls -lah /var/log

examines system logs where permitted.


Linux Users and Groups

Linux uses users and groups to control access to resources.

A basic model is:

User
 │
 ├── Primary Group
 └── Supplementary Groups

Inspect the current account:

whoami
id

List users:

cat /etc/passwd

List groups:

cat /etc/group

Create a user:

sudo useradd -m alice

Set a password:

sudo passwd alice

Add a user to a supplementary group:

sudo usermod -aG developers alice

Always understand what privileges a group grants before adding an account to it.


Root and Privilege Escalation

The root account has extensive administrative privileges.

Instead of logging in directly as root for routine work, administrators commonly use sudo.

For example:

sudo systemctl restart nginx

The important security principle is:

Administrative privileges should be granted only when necessary.

This is the principle of least privilege.

It also connects directly to the broader security architecture discussed in Zero Trust Security.


Linux File Permissions

Linux permissions traditionally contain three primary classes:

Owner
Group
Others

For example:

-rwxr-x---

can be interpreted as:

Owner  → rwx
Group  → r-x
Others → ---

The permissions mean:

  • r = read
  • w = write
  • x = execute

Check permissions:

ls -l file.txt

Change permissions:

chmod 640 file.txt

Change ownership:

sudo chown alice:developers file.txt

Change directory ownership recursively:

sudo chown -R alice:developers /srv/application

Be extremely careful with recursive permission changes on system directories.


Numeric Linux Permissions

Linux permissions can also be represented numerically.

r = 4
w = 2
x = 1

Therefore:

7 = rwx
6 = rw-
5 = r-x
4 = r--
0 = ---

For example:

chmod 750 script.sh

means:

Owner  → rwx
Group  → r-x
Others → ---

This is useful for service directories and scripts.


Special Permissions and ACLs

Traditional permissions are not always sufficient.

Linux also supports Access Control Lists.

ACLs allow more granular permissions.

For example:

getfacl /srv/application

and:

setfacl -m u:alice:rwx /srv/application

ACLs are useful when an application needs access without changing the primary owner/group structure.

However, complex ACL configurations can become difficult to maintain.

Use them deliberately and document why they exist.


Package Management

Package management is one of the core administrative tasks.

Ubuntu and Debian systems commonly use:

apt update
apt upgrade
apt install
apt remove
apt autoremove

Example:

sudo apt update
sudo apt upgrade

Install a package:

sudo apt install nginx

On distributions using DNF:

sudo dnf check-update
sudo dnf upgrade
sudo dnf install nginx

Always understand the difference between:

Package metadata update

and:

Package installation/update

The first refreshes information about available packages; the second changes the installed software.


Updating a Production Linux Server

Never treat updates as an uncontrolled command execution.

A better workflow is:

Review updates
      ↓
Check dependencies
      ↓
Backup
      ↓
Test
      ↓
Maintenance window
      ↓
Update
      ↓
Reboot if required
      ↓
Validate services
      ↓
Monitor

For critical environments, package updates should be integrated into a controlled change-management process.


systemd and Linux Services

Modern Linux distributions commonly use systemd as the system and service manager.

The systemctl command is used to inspect and control services. The Linux manual documents systemctl as the interface for controlling and introspecting the systemd service manager.

Check a service:

systemctl status nginx

Start:

sudo systemctl start nginx

Stop:

sudo systemctl stop nginx

Restart:

sudo systemctl restart nginx

Reload:

sudo systemctl reload nginx

Enable at boot:

sudo systemctl enable nginx

Enable and start:

sudo systemctl enable --now nginx

Disable:

sudo systemctl disable nginx

Understanding Service State

A service can have different states.

For example:

loaded
active
running
failed
inactive
disabled
enabled

Check failed services:

systemctl --failed

Check overall system state:

systemctl is-system-running

This is useful during troubleshooting.


systemd Units

systemd does not manage only services.

It works with multiple unit types.

Examples include:

.service
.socket
.timer
.mount
.target
.device
.scope
.slice

RHEL documentation also describes services, scopes, and slices as part of systemd’s resource-control hierarchy.

This becomes important when troubleshooting complex server workloads.


Creating a Custom systemd Service

A simple service could look like:

[Unit]
Description=Example Application
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=appuser
WorkingDirectory=/opt/example
ExecStart=/opt/example/app
Restart=on-failure

[Install]
WantedBy=multi-user.target

Save it as:

/etc/systemd/system/example.service

Then:

sudo systemctl daemon-reload
sudo systemctl enable --now example.service

Check:

systemctl status example.service

This pattern is valuable for custom applications and infrastructure services.


Linux Logging with journald

Modern systemd-based Linux systems commonly use systemd-journald.

The journalctl utility reads entries stored in the systemd journal. It can filter logs by service, boot, PID, and other structured fields.

View logs:

journalctl

View recent logs:

journalctl -n 100

Follow logs:

journalctl -f

View logs for a service:

journalctl -u nginx

View logs since the current boot:

journalctl -b

View errors:

journalctl -p err

This makes journalctl one of the most important troubleshooting tools on modern Linux servers.


Troubleshooting a Failed Service

Suppose Nginx is not working.

Do not immediately reinstall it.

Use:

systemctl status nginx

Then:

journalctl -u nginx --since "30 minutes ago"

Then inspect configuration:

sudo nginx -t

Then verify listeners:

sudo ss -lntp

The troubleshooting chain becomes:

Service status
      ↓
Service logs
      ↓
Configuration validation
      ↓
Listening socket
      ↓
Firewall
      ↓
Network path
      ↓
Application

This method is much more reliable than random configuration changes.


Linux Networking Fundamentals

Every Linux administrator should understand:

  • IP addresses
  • Subnets
  • Default gateways
  • Routing
  • DNS
  • TCP/UDP
  • Network interfaces
  • Listening ports

These concepts are explained in depth in Computer Networking Explained and TCP/IP Explained.


Inspecting Network Interfaces

Use:

ip addr

or:

ip link

Show routes:

ip route

Example:

default via 192.168.1.1 dev ens18
192.168.1.0/24 dev ens18 proto kernel scope link

This indicates that:

  • The default gateway is 192.168.1.1
  • The interface is ens18
  • The local subnet is 192.168.1.0/24

Network Configuration with Netplan

On Ubuntu systems using Netplan, network configuration is commonly represented in YAML under:

/etc/netplan/

Canonical documents the use of Netplan to generate backend configurations, with networking potentially rendered through systemd-networkd or NetworkManager depending on the environment.

Example static configuration:

network:
  version: 2
  ethernets:
    ens18:
      addresses:
        - 192.168.10.20/24
      routes:
        - to: default
          via: 192.168.10.1
      nameservers:
        addresses:
          - 1.1.1.1
          - 8.8.8.8

Before applying network changes remotely, test carefully.

A wrong network configuration can disconnect you from the server.


Testing Network Connectivity

Start with the local interface:

ip addr

Then the gateway:

ping -c 4 192.168.10.1

Then an external IP:

ping -c 4 1.1.1.1

Then DNS:

getent hosts example.com

or:

resolvectl query example.com

The diagnostic sequence is:

Interface
   ↓
Gateway
   ↓
Internet IP
   ↓
DNS
   ↓
Application

Checking Open Ports

Use:

ss -lntup

Ubuntu’s security documentation recommends ss for identifying listening network ports and shows how -p can be used with elevated privileges to identify the associated process.

For example:

sudo ss -lntup

A typical result might show:

22     SSH
80     HTTP
443    HTTPS
53     DNS

Only expose services that are actually required.


SSH Server Administration

SSH is one of the most important technologies in Linux administration.

The OpenSSH daemon, sshd, provides encrypted communications between hosts over an untrusted network and handles authentication, command execution, and data exchange.

Typical connection:

ssh [email protected]

Specify a key:

ssh -i ~/.ssh/id_ed25519 [email protected]

Specify a port:

ssh -p 2222 [email protected]

SSH Keys

SSH keys provide a strong authentication mechanism.

Generate an Ed25519 key:

ssh-keygen -t ed25519

Copy the public key:

ssh-copy-id [email protected]

Then authenticate using the private key.

The architecture is:

Client
 │
 ├── Private Key
 │
 └── Public Key
        │
        ▼
      Server
        │
  authorized_keys

The private key should never be copied to the server.


SSH Hardening

The SSH configuration is commonly stored in:

/etc/ssh/sshd_config

The OpenSSH configuration documentation identifies this file as the primary server configuration file.

A security-focused configuration may consider:

PermitRootLogin
PasswordAuthentication
PubkeyAuthentication
AllowUsers
AllowGroups
MaxAuthTries
ClientAliveInterval

However, do not blindly copy hardening configurations from the Internet.

A configuration that is appropriate for one environment may break another.


Safe SSH Configuration Changes

Before changing SSH configuration:

sudo sshd -t

This checks configuration syntax.

Then reload:

sudo systemctl reload ssh

Keep the existing SSH session open while testing a new connection.

For example:

Existing SSH session
       │
       ├── Change configuration
       │
       ├── Validate configuration
       │
       └── Open second SSH session
                │
                ▼
             Test

Only close the original session after the new connection has been verified.


Linux Firewall

A server should expose only the network services required for its function.

On Ubuntu, ufw is the default firewall configuration tool and provides a user-friendly interface to the kernel’s Netfilter subsystem.

Check status:

sudo ufw status verbose

Allow SSH:

sudo ufw allow ssh

Allow HTTPS:

sudo ufw allow 443/tcp

Enable:

sudo ufw enable

List rules:

sudo ufw status numbered

Firewall architecture:

Internet
   │
   ▼
Firewall
   │
   ├── Allowed
   │
   └── Blocked
          │
          ▼
       Server

For a broader firewall explanation, see Firewalls Explained.


Firewall Is Not a Substitute for Secure Services

A firewall does not fix an insecure application.

For example:

Port 443
  ↓
Firewall allows it
  ↓
HTTPS application
  ↓
Application vulnerability

The firewall may correctly allow the traffic while the application itself remains vulnerable.

Security therefore needs multiple layers:

Network Firewall
       ↓
Host Firewall
       ↓
Authentication
       ↓
Authorization
       ↓
Application Security
       ↓
Monitoring

Linux Server Hardening

A hardened server starts with reducing unnecessary exposure.

Basic hardening checklist

[ ] Remove unnecessary packages
[ ] Disable unnecessary services
[ ] Use SSH keys
[ ] Restrict privileged access
[ ] Enable firewall
[ ] Keep OS updated
[ ] Monitor authentication
[ ] Monitor logs
[ ] Protect backups
[ ] Use least privilege
[ ] Configure time synchronization
[ ] Test recovery

Hardening should be based on the server’s actual role.

A DNS server does not need the same configuration as a database server.


SELinux and Mandatory Access Control

Linux security can operate beyond traditional UNIX permissions.

SELinux provides mandatory access-control mechanisms based on security policies and labels.

Red Hat documentation explains that SELinux can participate in authorization around system services and that systemd can consult SELinux policy when managing service operations.

This creates another security layer:

User
 ↓
UNIX Permissions
 ↓
Process
 ↓
SELinux Policy
 ↓
Resource

An application may therefore have permission according to traditional filesystem ownership but still be denied by SELinux.

This is an important concept when troubleshooting RHEL-based systems.


Linux Storage Administration

Storage administration involves several layers:

Physical / Virtual Disk
        ↓
Partition
        ↓
Filesystem / LVM
        ↓
Mount Point
        ↓
Directory
        ↓
Application

Inspect disks:

lsblk

Check filesystem usage:

df -h

Check directory size:

du -sh /var/*

Inspect mounted filesystems:

findmnt

Disk Space Troubleshooting

One of the most common Linux server problems is:

No space left on device

Start with:

df -h

Then:

sudo du -xhd1 / | sort -h

Inspect /var:

sudo du -xhd1 /var | sort -h

Check inode usage:

df -i

This distinction is important.

A filesystem can have free bytes but run out of inodes.


LVM

Logical Volume Manager provides flexible storage management.

Conceptually:

Physical Disks
      │
      ▼
Physical Volumes
      │
      ▼
Volume Group
      │
      ▼
Logical Volumes
      │
      ▼
Filesystems

Common commands:

pvs
vgs
lvs

LVM can make it easier to resize logical storage resources compared with rigid partition layouts.


Mounting Filesystems

A filesystem can be mounted manually:

sudo mount /dev/sdb1 /mnt/data

Check:

findmnt /mnt/data

Persistent mounts are commonly configured through:

/etc/fstab

After modifying /etc/fstab, validate carefully:

sudo mount -a

On a remote production system, incorrect filesystem configuration can affect boot or service availability.


Linux Server Time Synchronization

Accurate time is critical for:

  • TLS
  • Authentication
  • Kerberos
  • Logs
  • Distributed systems
  • Databases
  • Monitoring
  • Incident investigation

Ubuntu documents timedatectl and timesyncd as standard time-synchronization mechanisms, with chrony also available for NTP use cases.

Check:

timedatectl status

You want to see that synchronization is active.

Incorrect system time can create extremely confusing security and troubleshooting symptoms.


Process Management

Linux servers may run hundreds or thousands of processes.

List processes:

ps aux

Interactive monitoring:

top

or:

htop

Find a process:

pgrep nginx

Inspect a process:

ps -fp <PID>

Terminate gracefully:

kill <PID>

Force termination should be reserved for cases where normal termination fails:

kill -9 <PID>

CPU Troubleshooting

Check load:

uptime

or:

top

Look for:

  • High CPU processes
  • Load average
  • CPU wait
  • Excessive process creation
  • Runaway applications

A high load average does not automatically mean CPU usage is 100%.

It can also indicate processes waiting on resources such as I/O.


Memory Troubleshooting

Check memory:

free -h

Inspect processes:

ps aux --sort=-%mem | head

Linux uses available memory for caching, so seeing low “free” memory alone does not necessarily mean the system is unhealthy.

Look at:

  • Available memory
  • Swap usage
  • Application memory
  • OOM events

Check kernel messages:

journalctl -k | grep -i oom

Swap

Swap provides additional virtual memory backing.

Check:

swapon --show

and:

free -h

Swap should not be treated as a substitute for sufficient physical RAM.

Heavy swapping can significantly affect application performance.


Monitoring Linux Servers

Effective monitoring should cover multiple dimensions.

Availability
     │
     ├── Uptime
     ├── Services
     └── Health checks

Performance
     │
     ├── CPU
     ├── RAM
     ├── Disk I/O
     └── Network

Capacity
     │
     ├── Disk
     ├── Memory
     └── CPU

Security
     │
     ├── Authentication
     ├── Network connections
     └── System events

This is the foundation of observability.

For broader monitoring concepts, see the CorgiNetwork Network Monitoring topic when that guide is available.


Log Monitoring

Important logs can come from:

  • systemd journal
  • Authentication services
  • Web servers
  • Databases
  • Kernel
  • Security systems
  • Applications

Useful commands include:

journalctl -p warning
journalctl --since today
journalctl -u ssh
journalctl -u nginx --since "1 hour ago"

The ability to filter logs by service and time is essential during incident response.


Linux Server Backups

A backup strategy should answer:

  1. What needs to be backed up?
  2. How often?
  3. Where are backups stored?
  4. How long are they retained?
  5. How quickly can they be restored?
  6. Has restoration actually been tested?

A simple model:

Production Server
       │
       ▼
Backup System
       │
 ┌─────┼─────┐
 ▼     ▼     ▼
Daily Weekly Monthly

A backup that cannot be restored is not a reliable recovery mechanism.


Configuration Backups

Do not back up only application data.

Important configuration may exist in:

/etc/ssh/
/etc/systemd/
/etc/nginx/
/etc/apache2/
/etc/fstab
/etc/netplan/
/etc/ufw/

The exact directories depend on the distribution and applications installed.

A useful recovery strategy separates:

Data
+
Configuration
+
Application Packages
+
Infrastructure Documentation

Linux Server Disaster Recovery

Disaster recovery is different from ordinary backup.

Backup answers:

Can we recover data?

Disaster recovery asks:

Can we restore the service?

A proper recovery plan includes:

Backup
 ↓
Infrastructure
 ↓
OS
 ↓
Configuration
 ↓
Application
 ↓
Data
 ↓
DNS
 ↓
Validation

For larger infrastructure, this should be tested periodically.


Linux Server Automation

Manual administration does not scale well.

Suppose an organization has:

1 server

Manual configuration may be manageable.

At:

10 servers

inconsistencies become more likely.

At:

100+ servers

automation becomes essential.

Automation tools can include:

  • Bash
  • Ansible
  • Terraform
  • CI/CD
  • Configuration management
  • Cloud-init

This leads directly into the CorgiNetwork Cloud & DevOps cluster.


Bash Automation

A simple script:

#!/usr/bin/env bash

set -euo pipefail

echo "Hostname: $(hostname)"
echo "Kernel: $(uname -r)"
echo "Uptime:"
uptime

echo "Disk:"
df -h /

echo "Memory:"
free -h

The use of:

set -euo pipefail

helps expose common scripting errors rather than allowing failures to pass silently.

Automation should be:

  • Idempotent where possible
  • Logged
  • Tested
  • Version controlled
  • Reviewed

Linux Administration with Git

Infrastructure configuration should increasingly be treated as code.

For example:

Git Repository
     │
     ├── Ansible
     ├── Bash
     ├── systemd units
     ├── Configuration
     └── Documentation

Changes can then be:

Created
 ↓
Reviewed
 ↓
Tested
 ↓
Approved
 ↓
Deployed

This reduces configuration drift and improves auditability.


Linux Server Security Architecture

A secure Linux server should not depend on one security control.

A layered model is better:

                Internet
                    │
                    ▼
             Network Firewall
                    │
                    ▼
              Host Firewall
                    │
                    ▼
                 SSH
                    │
             Authentication
                    │
             Authorization
                    │
               Application
                    │
              Filesystem
                    │
              SELinux / MAC
                    │
                 Logs
                    │
               Monitoring

This is the practical implementation of defense in depth.


Linux Server Attack Surface

The attack surface consists of everything exposed or exploitable.

Examples:

  • Open network ports
  • SSH
  • Web applications
  • APIs
  • Kernel
  • Packages
  • Credentials
  • File permissions
  • Scheduled tasks
  • Third-party software

Check listening services:

sudo ss -lntup

Then ask:

Does every listening service need to exist?

If not, disable or remove it.

Ubuntu’s security documentation explicitly discusses minimizing unnecessary open ports and provides ss as a method for identifying listening services.


Linux Server Hardening Workflow

A practical hardening workflow is:

Inventory
   ↓
Remove unnecessary services
   ↓
Patch system
   ↓
Secure accounts
   ↓
Harden SSH
   ↓
Configure firewall
   ↓
Protect files
   ↓
Enable monitoring
   ↓
Review logs
   ↓
Test recovery

Security should be continuous rather than a one-time installation step.


Common Linux Server Problems

Problem 1: SSH connection refused

Check:

systemctl status ssh

Then:

sudo ss -lntp | grep :22

Then firewall:

sudo ufw status

Then logs:

journalctl -u ssh

Problem 2: Website Is Not Reachable

Check:

systemctl status nginx

Then:

sudo ss -lntp | grep -E ':80|:443'

Then:

sudo nginx -t

Then:

curl -I http://127.0.0.1

Finally inspect:

  • Firewall
  • DNS
  • Routing
  • Reverse proxy
  • Application backend

Problem 3: DNS Is Not Working

Test DNS separately:

resolvectl status

Then:

resolvectl query example.com

Test connectivity independently:

ping -c 4 1.1.1.1

If IP connectivity works but DNS fails, the problem is likely in the DNS-resolution path.

For a deeper explanation, see DNS Explained.


Problem 4: Disk Is Full

Start with:

df -h

Then:

sudo du -xhd1 /var | sort -h

Check deleted files still held open:

sudo lsof +L1

A process can continue consuming disk space through an open deleted file until the process closes it.


Problem 5: Server Is Slow

Use:

uptime
top
free -h
df -h

Then inspect:

iostat

if available.

Investigate:

CPU
RAM
Swap
Disk I/O
Network
Processes
Logs

Do not assume the problem is CPU.


Problem 6: Service Starts but Immediately Stops

Check:

systemctl status service-name

Then:

journalctl -u service-name -b

Inspect configuration and dependencies.

A service can fail because of:

  • Invalid configuration
  • Missing file
  • Wrong permissions
  • Port already in use
  • Missing dependency
  • Security policy
  • Incorrect environment variables
  • Resource exhaustion

Problem 7: Port Already in Use

Find the process:

sudo ss -lntup

or:

sudo lsof -i :8080

Then determine whether:

Existing service

should be stopped, or:

New application

should use a different port.

Never kill an unknown process without understanding what it does.


Linux Server Administration Best Practices

A professional baseline includes:

1. Minimize the installation

Install only what the server needs.

2. Patch regularly

Maintain an update process.

3. Use least privilege

Avoid unnecessary administrative access.

4. Secure SSH

Prefer strong key-based authentication and restrict access appropriately.

5. Use a firewall

Expose only required services.

6. Monitor logs

Know what normal behavior looks like.

7. Monitor resources

Watch CPU, memory, disk, and network.

8. Back up data

Maintain tested recovery procedures.

9. Automate repeatable work

Reduce manual configuration.

10. Document changes

Future administrators need to understand the system.


Production Linux Server Architecture

A more complete production architecture may look like:

                         Internet
                            │
                            ▼
                       Edge Firewall
                            │
                            ▼
                       Load Balancer
                            │
                ┌───────────┴───────────┐
                │                       │
             Web 01                  Web 02
                │                       │
                └───────────┬───────────┘
                            │
                       Application
                            │
                ┌───────────┴───────────┐
                │                       │
             Database              Cache
                │                       │
                └───────────┬───────────┘
                            │
                         Storage
                            │
                         Backup
                            │
                       Monitoring

Each layer should have its own:

  • Security controls
  • Monitoring
  • Backup strategy
  • Failure plan

Linux Servers and Virtualization

Linux servers frequently run as virtual machines.

The architecture becomes:

Physical Server
      │
      ▼
Hypervisor
      │
 ┌────┼─────┐
 ▼    ▼     ▼
VM1  VM2   VM3
 │    │     │
Linux Linux Linux

This connects directly to the virtualization concepts covered in Virtualization Explained.

Virtualization adds another troubleshooting layer:

Physical Host
 ↓
Hypervisor
 ↓
Virtual Hardware
 ↓
Linux Kernel
 ↓
Application

Linux Servers in the Cloud

The same administration principles apply to cloud VMs.

A cloud server still requires:

  • Operating-system updates
  • SSH security
  • Firewall configuration
  • User management
  • Logs
  • Monitoring
  • Backups
  • Application security

The cloud provider manages some infrastructure, but it does not automatically manage every aspect of the guest operating system.

This is an important part of the shared-responsibility model.

For cloud infrastructure, continue with Cloud Networking Explained and AWS vs Azure vs Google Cloud.


Linux Server Administration and DevOps

Linux administration is increasingly connected to DevOps.

Traditional approach:

Administrator
      │
Manual configuration
      │
Server

Modern approach:

Git
 │
 ▼
Configuration
 │
 ▼
Automation
 │
 ▼
Infrastructure
 │
 ▼
Monitoring
 │
 ▼
Feedback
 │
 └──────────► Git

This creates a continuous operational feedback loop.


Infrastructure as Code

Infrastructure as Code extends this model.

Instead of manually configuring infrastructure, administrators define desired state through code.

For example:

Infrastructure Definition
        │
        ▼
Automation Tool
        │
        ▼
Server
        │
        ▼
Validation

The same concepts apply to:

  • Terraform
  • Ansible
  • Cloud-init
  • CI/CD
  • GitOps

This is one reason Linux administration is an important foundation for modern cloud engineering.


Linux Server Administration Checklist

Use this checklist for a new server:

INSTALLATION
[ ] Supported OS
[ ] Correct hostname
[ ] Correct timezone
[ ] Time synchronization

IDENTITY
[ ] Administrative account
[ ] SSH keys
[ ] Least privilege
[ ] Group membership reviewed

NETWORK
[ ] Correct IP
[ ] Correct gateway
[ ] Correct DNS
[ ] Routing verified

SECURITY
[ ] Firewall configured
[ ] Unnecessary services disabled
[ ] SSH hardened
[ ] Updates applied

SERVICES
[ ] Required services installed
[ ] systemd configuration verified
[ ] Startup behavior tested

STORAGE
[ ] Filesystems verified
[ ] Disk capacity monitored
[ ] Backup configured

MONITORING
[ ] Logs accessible
[ ] Resource monitoring
[ ] Service monitoring
[ ] Alerting

RECOVERY
[ ] Backups tested
[ ] Restoration procedure documented
[ ] Recovery dependencies identified

Linux Server Troubleshooting Methodology

The most important skill is not memorizing commands.

It is knowing how to reason about failures.

Use this model:

1. Define the symptom
        ↓
2. Determine scope
        ↓
3. Reproduce the problem
        ↓
4. Check recent changes
        ↓
5. Inspect logs
        ↓
6. Check dependencies
        ↓
7. Test one hypothesis
        ↓
8. Apply controlled change
        ↓
9. Validate
        ↓
10. Document

Avoid changing ten settings simultaneously.

If ten variables change and the problem disappears, you may not know which change actually fixed it.


The Linux Troubleshooting Decision Tree

                 Service unavailable
                         │
                         ▼
                 Is process running?
                    /          \
                  No            Yes
                  │              │
                  ▼              ▼
            systemctl       Is port open?
            / journal          /      \
                             No        Yes
                             │          │
                             ▼          ▼
                         Service      Network
                         config       path
                                      │
                                      ▼
                                    Firewall
                                      │
                                      ▼
                                     DNS
                                      │
                                      ▼
                                  Application

This methodology is applicable to almost every Linux server.


Frequently Asked Questions

What is Linux server administration?

Linux server administration is the practice of installing, configuring, securing, monitoring, maintaining, troubleshooting, and automating Linux servers.

Which Linux distribution is best for servers?

There is no universal answer. Ubuntu Server, Debian, RHEL-family distributions, and SUSE environments are all widely used. The appropriate choice depends on application compatibility, support requirements, security policies, operational expertise, and lifecycle requirements.

What command manages services on modern Linux?

On systemd-based systems, systemctl is the primary command for inspecting and controlling services.

How do I check Linux logs?

On systemd-based systems, use:

journalctl

For a particular service:

journalctl -u service-name

journalctl supports filtering by service, boot, PID, and structured journal fields.

How do I check open ports?

Use:

sudo ss -lntup

Ubuntu’s security documentation specifically recommends ss for identifying listening ports.

How do I secure SSH?

Use strong authentication, preferably key-based access where appropriate, restrict administrative access, review sshd_config, limit unnecessary exposure, and validate configuration before reloading the service.

Is Linux server administration useful for DevOps?

Yes. Linux is a fundamental platform for many DevOps environments, including containers, CI/CD, Kubernetes, automation, and cloud infrastructure.

Do Linux servers need firewalls?

Host-level firewalling can provide an additional security layer, although the appropriate architecture depends on the environment. Ubuntu documents ufw as its default firewall configuration tool.

Are Linux permissions enough to secure a server?

No. Permissions are one security layer. Strong server security also requires authentication controls, network restrictions, patching, application security, logging, monitoring, and potentially mandatory access-control systems such as SELinux.

What is the most important Linux troubleshooting skill?

A structured troubleshooting methodology is more important than memorizing individual commands. Start with the symptom, determine scope, inspect logs, identify dependencies, test hypotheses, make controlled changes, and validate the result.


Final Linux Server Administration Checklist

Before declaring a Linux server production-ready:

SYSTEM
✓ Supported operating system
✓ Correct hostname
✓ Time synchronized
✓ Updates applied

ACCESS
✓ Administrative access controlled
✓ SSH secured
✓ Users and groups reviewed
✓ Least privilege applied

NETWORK
✓ IP configuration correct
✓ Routing correct
✓ DNS working
✓ Firewall configured
✓ Only required ports exposed

SERVICES
✓ Required services running
✓ Unnecessary services disabled
✓ systemd dependencies understood

STORAGE
✓ Filesystems healthy
✓ Disk capacity monitored
✓ Backups configured
✓ Recovery tested

SECURITY
✓ SSH hardened
✓ Firewall active
✓ Security policies reviewed
✓ Logs monitored
✓ Packages maintained

OPERATIONS
✓ Monitoring configured
✓ Alerting configured
✓ Automation version-controlled
✓ Documentation available
✓ Recovery procedure tested

Conclusion

Linux server administration is the foundation beneath a large part of modern IT infrastructure.

A professional Linux administrator needs to understand far more than shell commands.

The administrator must understand the relationship between:

Users
   ↓
Permissions
   ↓
Processes
   ↓
Services
   ↓
Operating System
   ↓
Storage
   ↓
Networking
   ↓
Security
   ↓
Monitoring
   ↓
Backup
   ↓
Automation

Once these layers are understood, troubleshooting becomes systematic instead of experimental.

The most important tools are often simple:

systemctl
journalctl
ip
ss
ps
top
free
df
du
find
grep
ssh
sudo

But their real power comes from knowing when to use each one and how to interpret the result.

Linux server administration also provides the foundation for the next stages of infrastructure engineering:

Linux
  ↓
Servers
  ↓
Networking
  ↓
Security
  ↓
Virtualization
  ↓
Containers
  ↓
DevOps
  ↓
Kubernetes
  ↓
Cloud

For CorgiNetwork, this makes Linux administration a central bridge between the Servers & Infrastructure, Networking, Cybersecurity, and Cloud & DevOps clusters.

The next logical step is to go deeper into Linux File System, Permissions, Processes and Services, followed by practical Linux networking and server-security guides.


Authoritative External Resources

For Linux system administration, the Linux man-pages project provides detailed references for commands and system interfaces, including systemctl, journalctl, and OpenSSH.

For Ubuntu-specific administration, the official Ubuntu Server documentation covers installation, networking, security, storage, services, backups, and other operational tasks.

For enterprise Linux administration and security, consult the official Red Hat Enterprise Linux documentation, including its documentation for systemd and SELinux.

For SSH configuration, the OpenSSH sshd_config reference documents server-side configuration options and file locations.


Related CorgiNetwork Articles

Leave a Reply

Your email address will not be published. Required fields are marked *