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: this is how you can retrieve information about the processor, memory, hard drives and firmware 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.
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
Shortcuts for frequently used commands: creating aliases, saving them permanently in the .bashrc or .bashrc.d file, default aliases, and when to use a function instead.
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 hosting 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
Using the `dig` command on Linux: querying record types, querying a specific DNS server, interpreting the output, `+short`, `+trace`, reverse lookups and DNSSEC validation.
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?
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 expanding the VPS, the additional space can only be used once the partition and the file system have been enlarged: the steps are `growpart`, `xfs_growfs`, `resize2fs` and, in the...
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)
A Hungarian translation of Eric S. Raymond’s classic essay ‘How to Become a Hacker’, which explores hacker culture.
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 the EPEL repository on AlmaLinux 9 and 10 systems, understanding the interface, the most important keyboard shortcuts, filtering, the fan view and stopping processes.
Installing Apache and PHP-FPM on AlmaLinux 9
A step-by-step guide to installing the Apache web server and PHP-FPM on AlmaLinux and Rocky Linux 9, including setting up a virtual host and opening a port in the firewall....
Installing Nginx mainline on AlmaLinux from the nginx.org repository
Installing the latest version of Nginx on AlmaLinux 9 and 10 from the official 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 is EPEL? How can it be enabled on AlmaLinux 9 and 10 alongside the CRB repository? How can you list the packages installed from EPEL, and how can it...
Installing the Mainline Linux kernel on AlmaLinux from the ELRepo repository
Installing the latest Linux kernel (kernel-ml) on AlmaLinux 9 and 10 systems from the ELRepo repository, setting the default kernel using grubby, and reverting the changes.
Installing the MariaDB database server on AlmaLinux 9 and 10
Installing MariaDB on AlmaLinux: which version to choose, security settings, creating a database and a user, and how to block port 3306 from external access.
Installing the Remi repository on AlmaLinux
Configuring the Remi repository on AlmaLinux 9 and 10: which versions of PHP, Redis and Valkey are provided, and how the modules and the PHP versions that can be installed...
Linux Secure Shell (SSH)
What is SSH (Secure Shell)? How do encryption and key-based authentication work? How can you use it to connect to a Linux server, and what should you bear in mind?...
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: here’s how to find out where the connection between your computer and the server is failing, and what information to send to the...
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 time-consuming operations (updates, copying, backup) on the server using tmux, screen or nohup, so that they are not interrupted if the SSH connection is lost.
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?
Here’s how to determine, when using AlmaLinux or Rocky Linux, whether a ‘Permission denied’ or 403 error is caused by SELinux, and how to fix it without disabling SELinux.
Setting up an SSH SOCKS proxy via a Linux server
Set up your own SOCKS5 proxy with a single `ssh -D` command: this is how you can route your browser’s traffic securely through your own server, whether you’re on public...
SSH server security settings
Securing an SSH server on a VPS: key-based authentication, disabling passwords and root access, changing the port alongside SELinux and a firewall, and checking the settings.
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.
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 using the `do-release-upgrade` command, and upgrading a Debian server to the next stable release, without reinstalling.
Using the sudo command: examples
How to run a command as root or as another user using sudo: the most common options, the password cache, sudoers rules, logging and common errors.
What are the basic components of Linux?
The fundamental components of the Linux operating system range from the boot loader, through the kernel, systemd and the shell, to the package manager, together with the directory structure.
What are the most popular Linux distributions?
The features and support periods of the most popular Linux distributions (Ubuntu, Debian, AlmaLinux, Rocky Linux and others), and which ones are best suited for servers and desktops.
What does ‘load’ mean on Linux systems?
What does the load average mean in Linux, how should you interpret the three figures in relation to the number of processor cores, and what should you do if it...
What is Linux?
What is Linux, what does it consist of apart from the kernel, what are distributions, where is it used, and how can you tell which Linux distribution is running on...
What is LVM?
What is Linux LVM (Logical Volume Manager)? What are physical volumes, volume groups and logical volumes? And how can they be monitored and expanded on the server?
What is swap in Linux?
What is swap in Linux? How do swap partitions and swap files work? How can you check their usage, and when does the system indicate that there is insufficient memory?...
What is the Linux kernel?
What is the Linux kernel, how does it manage hardware and processes, how can you find out its version, and why does the server need to be restarted after a...
No results were found for this topic. Search the entire knowledge base