Knowledgebase

CentOS

Cent Operating System

Articles

How to Limit the Download Speed of dnf and apt Updates Updated 28 September 2026 dnf 4 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; apt on Ubuntu 24.04 and 26.04 and Debian 13 Package updates can fill a slow or shared network link, for example on a branch office line or when many servers update at the same time. Both dnf and apt can limit... How to List Services on RHEL, AlmaLinux and Rocky Linux and Check Their Status with systemctl Updated 4 November 2026 systemd 252 (RHEL 9.8, Rocky Linux 9.8) and 257 (RHEL 10.2, AlmaLinux 10.2); the same commands work on Debian 13 and Ubu To list all services on Red Hat Enterprise Linux (RHEL) and its rebuilds AlmaLinux and Rocky Linux, run systemctl list-units --type=service --all. To see only the... How to Log Debug Messages with rsyslog and journald Updated 28 September 2026 rsyslog 8.2x and systemd-journald on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 1 By default, /var/log/messages (AlmaLinux, Rocky Linux, RHEL) and /var/log/syslog (Ubuntu) leave out the least important messages, the "debug" level. When you... How to Log all Bash History Commands to syslog (/var/log/messages) in CentOS/RHEL? The user wants to see the list of commands used in the syslog messages. This way the user can audit user activities written in bash_history.   Solution   1. To log... How to Make USB Storage Read-Only with a udev Rule (and Block USB with USBGuard) Updated 28 September 2026 systemd-udev on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13; USBGuard 1.1 On machines where data must not leave on a USB stick, you can make every USB storage device read-only as soon as it is plugged in: people can still read files from it,... How to Make ethtool Settings Persistent Across Reboots Updated 30 September 2026 NetworkManager 1.54 and 1.56 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; netplan 1.1 on Ubuntu 24.04 and 26 ethtool changes network card settings such as offloading features, speed and duplex, but those changes are lost at the next reboot. On CentOS 6 and 7 (both end of... How to Measure Network Bandwidth and Latency with qperf Updated 4 November 2026 qperf 0.4.9 to 0.4.11 on AlmaLinux and Rocky Linux 9 (EPEL), Ubuntu 24.04 and 26.04, Debian 13 qperf measures bandwidth and latency between two Linux machines over TCP, UDP and, on suitable hardware, RDMA. Its strength is latency: it reports the round-trip time... How to Modify Kernel Arguments With grubby Updated 30 September 2026 grubby with GRUB 2 and Boot Loader Specification entries on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10 Kernel arguments (also called kernel command-line parameters) control things such as the console, crash dumps, or hardware quirks. On AlmaLinux, Rocky Linux and RHEL,... How to Monitor /etc/passwd and /etc/shadow Changes with auditd Updated 28 September 2026 Linux audit 3.1 and 4.0 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10; auditd on Ubuntu 24.04 and 26.04 and Debia Changes to /etc/passwd, /etc/shadow and /etc/group mean that user accounts, passwords or group memberships changed. An unexpected change is a strong sign of an... How to Monitor Linux Server Performance with Netdata Updated 18 November 2026 Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 (Netdata 2.x) CentOS 7/8 are end of life; these steps are for Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9. Netdata is an open-source monitoring agent that collects... How to Monitor System Time Changes with auditd Updated 28 September 2026 Linux audit 3.1 and 4.0 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10 (x86_64); notes for Ubuntu and Debian Someone changing the system clock can hide their tracks in the logs, break TLS and two-factor logins, or disturb scheduled jobs. Security standards such as PCI DSS and... How to Open a Port in the Firewall on RHEL, AlmaLinux and Rocky Linux Updated 28 September 2026 firewalld on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; UFW on Ubuntu 24.04 and 26.04 and Debian 13; CSF To make a service reachable from outside, two things must be true: the service listens on the port, and the firewall allows it. This guide opens a port with firewalld,... How to Open and Close Ports on a Linux Server Firewall Updated 19 November 2026 Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 CentOS 6 and 7 are end of life. These are the current ways to open and close a port (5555/tcp in the examples). AlmaLinux / Rocky Linux (firewalld) firewall-cmd... How to Prevent Users From Reusing Their Last 10 Passwords Updated 28 September 2026 pam_pwhistory (Linux-PAM 1.5 to 1.7) on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debia A password history rule stops users from setting a password they used recently, so an expired password cannot simply be set again. The PAM module pam_pwhistory does... How to Query and Change Kernel Parameters with sysctl (Now and Permanently) Updated 28 September 2026 procps-ng sysctl and systemd-sysctl on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian Kernel parameters control things such as IP forwarding, network buffer sizes, swap behaviour and file limits. sysctl reads and changes them while the system runs, and... How to Rebuild a Corrupt RPM Database on RHEL and AlmaLinux Updated 18 October 2026 RPM 4.16.1.3 (AlmaLinux 9.8) and 4.19.1.1 (AlmaLinux 10.2) with the SQLite database, RPM 4.14.3 (AlmaLinux 8.10) with Be To rebuild the RPM database, back up its folder, then run rpmdb --rebuilddb as root (rpm --rebuilddb does the same) and compare rpm -qa | wc -l before and after. Check... How to Recover Missing GRUB2 Files from /boot? Updated 28 September 2026 AlmaLinux 9 and Rocky Linux 9 If the GRUB2 files in /boot are missing, the system cannot boot. Boot a rescue system, then reinstall GRUB2 and regenerate its configuration. Steps (AlmaLinux / Rocky... How to Recover an Interrupted dnf or apt Package Transaction Updated 28 September 2026 dnf 4 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; apt and dpkg on Ubuntu 24.04 and 26.04 and Debian 13 If a package installation or update stops half-way, because the SSH session dropped, the server lost power or someone pressed Ctrl+C at the wrong moment, some packages... How to Reinstall GRUB2 from Rescue Mode on RHEL, AlmaLinux and Rocky Linux Updated 28 September 2026 GRUB 2.06 and 2.12 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10 (BIOS and UEFI); notes for Ubuntu and Debian If a server stops at a "grub>" or "grub rescue>" prompt, or no longer finds its operating system after a disk change, the boot loader must be reinstalled. You do... How to Remove the Rescue Kernel and Boot Entry With grubby Updated 29 September 2026 dracut 057 and later, grubby and GRUB 2 with Boot Loader Specification entries on AlmaLinux and Rocky Linux 9 and 10 and AlmaLinux, Rocky Linux and RHEL install a rescue boot entry: a kernel and a large initramfs that contain drivers for almost any hardware, so the system can still boot... How to Remove virbr0 and lxcbr0 Interfaces on CentOS/RHEL 6,7? Updated 28 September 2026 Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 RHEL/CentOS 6 and 7 are end of life; these steps are for Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9. A server with one network card may still show extra... How to Resize or Expand a Btrfs File System Updated 28 September 2026 btrfs-progs 6.x on Ubuntu 24.04 and 26.04, Debian 13, Fedora and AlmaLinux 10; not supported on RHEL, Rocky Linux or Alm Btrfs can grow and shrink while it is mounted, and it can span several disks, so resizing is usually a single command. Which Linux you run matters: Btrfs is the... How to Restore a Deleted LVM Volume Group (vgcfgrestore) Updated 28 September 2026 LVM 2.03 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 If a volume group was removed by mistake with vgremove, the data is usually still on the disks: LVM only deleted its description of the volumes. Before every change,... How to Run MariaDB as a Custom User and Group on RHEL, AlmaLinux and Rocky Linux Updated 28 September 2026 MariaDB 10.5, 10.11 and 11.8 from the AlmaLinux, Rocky Linux and RHEL 9 and 10 repositories (systemd) MariaDB normally runs as the system user mysql. Some security policies or shared setups require it to run as another account. On current systems you do this with a... How to Run a Custom Script as a systemd Service Updated 28 September 2026 systemd 252 to 259 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 Turning your own script or program into a systemd service means it starts at boot, restarts when it crashes, runs as a chosen user, and logs to the journal. All you...