Knowledge base articles relating to Linux systems

76 articles: Commands, permissions, services, logs and server security.

Linux is an open-source operating system developed by Linus Torvalds in the early 1990s. The operating system is based on the Unix system and can be used on a wide range of computers, including servers, desktop computers, mobile devices and smartphones.

The Linux operating system is generally available free of charge, and many people choose it because it is stable, secure and highly customisable. Using Linux offers numerous advantages, such as extensive software support, a high level of security and reliability, and a large community of developers and users.

7 Linux commands for gathering system information

lscpu, lsblk, free, lspci, lsusb, dmidecode and lshw: how to read processor, memory, disk and firmware details on a Linux server.

AlmaLinux: Recovering memory allocated for kdump

How much memory does the kdump (crashkernel) take up on AlmaLinux 9 and 10 systems, how can this be checked, and how can it be safely reduced or removed?

Basic Linux commands for beginners

A practical guide to the most commonly used Linux terminal commands (cd, ls, cp, mv, rm, grep, find and others) for beginners, with examples and tips.

Check Open Ports on Linux: ss, lsof and netstat

How to find open ports in Linux and list listening ports with the ss command, see which program uses a port, and why a listening port can still be unreachable....

Configuring the hostname, time zone and time synchronisation on a Linux server

How to configure the server name (hostname), time zone and time synchronisation using hostnamectl, timedatectl and chrony.

Copying files between servers: scp, rsync and sftp

How to copy files and folders between your own computer and a server, or between two servers, via SSH using the scp, rsync and sftp commands.

Creating a user and granting sudo privileges on Linux

How to create your own user on a VPS, how to grant them sudo privileges on AlmaLinux, Ubuntu and Debian systems, and how to copy your SSH key.

Creating and extracting tar.gz archives on Linux

How to pack folders into tar.gz (and tar.bz2, tar.xz) archives on Linux, how to unpack them, and how to view their contents without unpacking them.

Creating and managing Bash aliases on Linux

Creating aliases for frequently used commands: saving them permanently in .bashrc or .bashrc.d, default aliases, and when it is better to use a function.

Crontab syntax and scheduled tasks on Linux

How is the crontab syntax structured, how can you create a scheduled task (cron job) on Linux, and why does a cron job not run when executed manually?

Disk compression and deduplication with VDO on AlmaLinux and Rocky Linux

How to save disk space using VDO compression and deduplication on AlmaLinux and Rocky Linux 8, 9 and 10, using LVM or the old `vdo` command.

DNS queries using the dig command: examples

The `dig` command on Linux: record types, querying a specific DNS server, interpreting the output, `+short`, `+trace`, reverse lookup and DNSSEC validation.

Docker Compose: compose.yaml Examples, Volumes and env File

Docker Compose example with WordPress and MariaDB: compose.yaml, docker compose up, volumes, .env file, networks, updates, logs and volume backups.

Docker prune: Remove Images, Containers and Volumes

Remove Docker images, containers, volumes and build cache: docker system df, docker image prune, docker system prune, prune all, log files and regular cleanup.

Docker Swarm vs Kubernetes: how to choose a container orchestration tool?

Docker Swarm or Kubernetes: which container orchestration tool should you choose, based on their strengths?

Docker Web UI: Install Portainer, Dockge and Coolify

Portainer with Docker Compose, Portainer vs Dockge and a Coolify install on a VPS: what each Docker web UI is for, its ports and safe access.

Extracting a ZIP file to a specified folder

How can a ZIP file be extracted to a specified folder from the Linux terminal using the `unzip -d` command, and what should you do if `unzip` returns an error?...

File permissions (chmod, chown) explained simply on Linux

How do Linux file permissions work, what do 755 and 644 mean, and how can permissions and ownership be changed using the chmod and chown commands?

Finding and removing large error_log files on Linux

How to use the `find` command to locate error_log files that have grown too large, how to clear them safely, and what to do to prevent them from growing again....

Grep: displaying lines before and after a match on Linux

How can you display the lines before and after a grep match using the -B, -A and -C options, and how can you search log files effectively in this way?...

How can I perform a backup and restore of data on a Linux system?

Data backup and restoration on Linux: files using rsync and tar, databases using mysqldump, snapshots, and how to check that the backup is usable.

How can I resize the file system after expanding the VPS disk?

After a VPS disk upgrade, the extra space is usable only once the partition and file system grow: growpart, xfs_growfs, resize2fs and LVM.

How can I start, stop or restart services using the `systemctl` command?

Starting, stopping, restarting and automatically starting services using the `systemctl` command, with status and error checking on systemd-based Linux systems.

How can xinetd services be migrated to a systemd-based setup?

Migrating a service running under xinetd to a systemd socket: the .socket and @.service files, enabling, testing; tested on AlmaLinux 9 and 10 systems.

How can you check disk usage on a Linux server (using the `du` and `df` commands)?

Checking disk usage on a Linux server using the `df` and `du` commands: identifying the largest directories and files, and what to do if the disk is full.

How to Become a Hacker (for fun)

Eric S. Raymond’s classic essay ‘How to Become a Hacker’ on hacker culture, translated back into English from our Hungarian version.

How to Check the Linux OS Version and Ubuntu Version

How to check the Ubuntu version in the terminal and the Linux OS version command for any distro: /etc/os-release, hostnamectl, lsb_release, uname, EOL dates.

How to Install Docker on Ubuntu 24.04, Debian and AlmaLinux

Installing Docker and Docker Compose from the official repository on Ubuntu 24.04 and 26.04, Debian and AlmaLinux: first container, log limits and firewall.

Install PostgreSQL on Ubuntu and AlmaLinux (Linux guide)

Install PostgreSQL in Ubuntu, Debian or AlmaLinux Linux: distro vs PGDG repo, create a database and user, password and remote access, backups.

Install security updates only (dnf, yum)

How to list and install only security updates using dnf on AlmaLinux, Rocky Linux and other RHEL-based servers.

Installing a specific version using apt-get on an Ubuntu/Debian system

How to install a specific version of a package using `apt-get` on Ubuntu or Debian, how to lock the version, and what to do in the event of a dependency...

Installing and configuring Fail2ban to protect against SSH brute-force attacks

How to install and configure Fail2ban on AlmaLinux, Ubuntu and Debian servers so that it automatically blocks IP addresses attempting to guess passwords.

Installing and using htop on AlmaLinux

Installing htop from EPEL on AlmaLinux 9 and 10: understanding the screen layout, important keyboard shortcuts, filtering, tree view and stopping processes.

Installing Apache and PHP-FPM on AlmaLinux 9

Installing the Apache web server and PHP-FPM on AlmaLinux and Rocky Linux 9 step by step, with a virtual host and an open firewall port.

Installing Nginx mainline on AlmaLinux from the nginx.org repository

The latest Nginx on AlmaLinux 9 and 10 from the nginx.org repository: stable or mainline, switching from the AppStream version and configuring PHP-FPM.

Installing PHP on AlmaLinux 9 and 10

Which version of PHP comes with AlmaLinux, how to install PHP 8.3, 8.4 or 8.5 from the system’s repositories or the Remi repository, and how PHP-FPM works.

Installing Redis and Valkey on AlmaLinux

Installing Redis or Valkey on AlmaLinux 9 and 10: where each one comes from, how to set a password and memory limit, and how to use them from PHP.

Installing the EPEL repository on AlmaLinux

What EPEL is, how to enable it on AlmaLinux 9 and 10 with the CRB repository, how to list the packages installed from it, and how to disable it.

Installing the Mainline Linux kernel on AlmaLinux from the ELRepo repository

Installing a newer Linux kernel (kernel-ml) on AlmaLinux 9 and 10 from ELRepo, setting the default kernel with grubby, and going back.

Installing the MariaDB database server on AlmaLinux 9 and 10

Installing MariaDB on AlmaLinux: choosing a version, configuring security, creating a database and user, and blocking port 3306 from external access.

Installing the Remi repository on AlmaLinux

The Remi repository on AlmaLinux 9 and 10: which versions of PHP, Redis and Valkey are provided, and how the modules and parallel PHP versions work.

Linux find Command: Find Files, Large Files, Examples

Linux find command examples: find files by name, size, date and owner, find large files, search recursively, exclude directories, use -exec and -delete.

Linux Secure Shell (SSH)

What SSH (Secure Shell) is, how encryption and key-based authentication work, how to connect to a Linux server, and what to watch out for.

Linux: Delete a Directory, Rename Files, Symlinks

How to delete a directory and its files in Linux, fix 'Directory not empty', rename and move files with mv, rename many at once, and create symlinks with ln.

Linux: List Users and Groups, Add a User to a Group

Linux list users and groups: getent, id, who and last for users logged in, list users in a group, and add a user to a group with usermod -aG or...

Microsoft SQL Server Express on Linux: native and in Docker

SQL Server 2025 Express on AlmaLinux as a service or in Docker: installation, firewall, backups, limits and a comparison with the Windows version.

Monitoring processes using the top and htop commands

How to monitor running processes, CPU and memory usage in real time using the `top` and `htop` commands on Linux, and how to identify the cause of the load.

Mounting a new disk under Linux: partitioning, formatting and fstab

How to partition, format and mount a new disk permanently on a Linux server using parted, mkfs and /etc/fstab.

Network troubleshooting: ping, traceroute, mtr, dig and curl

Ping, traceroute, mtr, dig, ss and curl: find where the connection between your computer and the server fails, and what to send to support.

Nginx Proxy Manager Setup with Docker Compose

Nginx Proxy Manager docker compose setup: several web apps on one VPS behind ports 80 and 443, proxy hosts, Let's Encrypt SSL and access lists.

Out of memory: OOM killer, the `free` command and creating a swap file

Why do databases or web servers shut down on their own, how can you tell if the OOM killer has shut them down, and how can you create a swap...

Passwords: the fine line between love and hate

Passwords have been the cornerstones of our online security for decades – so why are they so frustrating, and how can we manage them better?

Reading log files on Linux: journalctl and the /var/log directory

Where can you find the system, web server, SSH and email logs on Linux, and how can you search through them using the `journalctl`, `tail` and `grep` commands?

Running commands over an intermittent SSH connection: tmux and screen

Run long operations (updates, copies, backups) on a server with tmux, screen or nohup, so a dropped SSH connection doesn’t stop them.

Scanning for malware on the server using ClamAV and Maldet

Scanning websites on a VPS for malware (webshells, injected code) using ClamAV and Linux Malware Detect, and the steps to take in the event of an infection.

SELinux: why do I get a ‘Permission denied’ error when the permissions are correct?

How to tell on AlmaLinux or Rocky Linux whether SELinux causes a Permission denied or 403 error, and how to fix it without disabling SELinux.

Setting up an SSH SOCKS proxy via a Linux server

Your own SOCKS5 proxy with one ssh -D command: route your browser’s traffic encrypted through your server on public Wi-Fi or a filtered network.

SSH Config File (~/.ssh/config) Explained with Examples

SSH config file examples: host aliases, User, Port, IdentityFile and IdentitiesOnly, ProxyJump, LocalForward, keepalive and ControlMaster in ~/.ssh/config.

SSH server security settings

Securing SSH on a VPS: key-based login, disabling passwords and root login, changing the port with SELinux and a firewall, and checking it all.

Storing users’ SSH keys in Active Directory for SSH authentication

How can users’ public SSH keys be stored in Active Directory, and how do SSSD and OpenSSH read them for key-based authentication?

System updates using dnf and apt, configuring automatic updates

Updating the VPS system on AlmaLinux, Rocky Linux, Ubuntu and Debian: when to restart, and how to enable automatic updates.

Text editing in the terminal: the basics of nano and vim

How to open, edit and save configuration files on the server using the nano and vim text editors, and how to exit vim.

The disk is full, but the disk usage tool isn’t showing what’s taking up the space: what could be the reason?

Why does `df` show the disk as full when `du` indicates there is free space: deleted but open files, exhausted inodes, reserved blocks and hidden directories.

The ‘du’ command in detail: examples for analysing disk usage

Examples of the `du` command’s options: depth, sorting, exclusion, size threshold, apparent size, hard links and sparse files, inodes, and `ncdu`.

Ubuntu/Debian – Fixing the “sudo: command not found” error

How to fix the ‘sudo: command not found’ error on a minimal Debian or Ubuntu installation by installing sudo.

Unix Timestamp to Date: Converter and Linux Commands

Convert a Unix timestamp to a date and back: online converter, the Linux date command, awk, PHP, Python and MySQL, plus seconds vs milliseconds.

Updating AlmaLinux and Rocky Linux to a new major version using ELevate

How to upgrade an AlmaLinux or Rocky Linux server in-place, without reinstalling, from version 8 to 9 or from 9 to 10 using the ELevate (Leapp) tool.

Updating Ubuntu and Debian to a new major version

Upgrading an Ubuntu server to the next LTS release with do-release-upgrade, and a Debian server to the next stable release, without reinstalling.

Using the sudo command: examples

Running commands as root or as another user using sudo: important switches, the password cache, sudoers rules, logging and common errors.

What are the basic components of Linux?

The basic parts of Linux, from the boot loader through the kernel, systemd and the shell to the package manager, plus the directory layout.

What are the most popular Linux distributions?

The most popular Linux distributions (Ubuntu, Debian, AlmaLinux, Rocky Linux and more): features, support periods, and which suits servers or desktops.

What does ‘load’ mean on Linux systems?

What the load average means on Linux, how to read the three numbers against the number of CPU cores, and what to do if it is high.

What is Linux?

What Linux is, what it consists of beyond the kernel, what distributions are, where it is used, and how to tell which one runs on your server.

What is LVM?

What Linux LVM is: physical volumes, volume groups and logical volumes, and how to check and extend them on the server.

What is swap in Linux?

What swap is in Linux, how swap partitions and swap files work, how to check usage, and when it signals that memory is short.

What is the Linux kernel?

What the Linux kernel is, how it manages hardware and processes, how to find its version, and why a kernel update needs a server restart.

Can’t find what you’re looking for?

Write to us and our support team will help.

Open a ticket