Knowledgebase

CentOS

Cent Operating System

Articles

How To Auto Mount a FileSystem Using Systemd? Below example shows how to create a systemd script to mount a disk under a specific path on reboot automatically.   1. Check the filesystem UUID using the command... How To Install Icinga 2 on CentOS 7 / RHEL 7 Updated 28 September 2026 Icinga 2 on Ubuntu 24.04 CentOS 7 / RHEL 7 are end of life. Icinga 2 is an open-source monitoring system for hosts and services, with a web interface (Icinga Web). Its official packages are... How systemd-tmpfiles Cleans /tmp and /var/tmp (tmpwatch Replacement) Updated 28 September 2026 systemd-tmpfiles (systemd 252 to 259) on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debi systemd-tmpfiles creates, cleans and removes temporary files and folders according to simple rule files. It replaced tmpwatch (CentOS 6 and older), and it is what... How to Add, List, Delete and Change Samba Users (smbpasswd, pdbedit and Failed to add entry for user) Updated 4 November 2026 Samba 4.22.11 (Debian 13), 4.23.6 (Ubuntu 26.04), 4.19.5 (Ubuntu 24.04) and 4.23.5 (AlmaLinux 10.2 and Rocky Linux 9.8), Samba keeps its own passwords, separate from Linux login passwords, and every Samba user must first exist as a Linux user. As root: sudo useradd -M -s... How to Allow or Deny Users on a vsftpd FTP Server Updated 4 November 2026 vsftpd 3.0.5 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 vsftpd decides who may log in with three separate mechanisms: a user list that can work as a block list or an allow list, a fixed list of accounts that are always... How to Back Up and Restore XFS File Systems (xfsdump / xfsrestore)? Use the xfsdump and xfsrestore utilities to back up and restore files in an XFS file system. You can back up files to directly attached tape drives or hard drives, or... How to Boot Linux into Rescue, Emergency or Recovery Mode Updated 18 October 2026 Linux with systemd: tested on Debian 13, Ubuntu 24.04 and 26.04, AlmaLinux 9.8 and 10.2; RHEL and Rocky Linux according To boot Linux into rescue mode, stop the GRUB menu, press e, add systemd.unit=rescue.target to the end of the line that starts with linux and press Ctrl+X. For... How to Boot into Single User Mode on RHEL 8, 9 and 10 Updated 4 November 2026 RHEL, AlmaLinux and Rocky Linux 8, 9 and 10 (rescue and emergency targets tested with systemd 252 on AlmaLinux 9.8 and s On RHEL 8, 9 and 10, single user mode is called rescue mode (the systemd rescue.target). To boot into it, stop the GRUB menu, press e, add systemd.unit=rescue.target... How to Change the Default Log Directory (/var/log) for rsyslog Updated 28 September 2026 rsyslog 8.2x on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 Logs normally live in /var/log. If that disk is small, or logs must be kept on a separate disk, there are two ways to move them: point rsyslog's log files to another... How to Change the Kernel Command Line Permanently (grubby and GRUB) Updated 4 November 2026 grubby 8.40 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; GRUB on Ubuntu 24.04 and 26.04 and Debian 13 The kernel command line holds boot options such as crashkernel=, console=, transparent_hugepage= or ipv6.disable=1. This guide changes it permanently, for the current... How to Change the Permissions of /var/log/messages on RHEL, AlmaLinux and Rocky Linux Updated 28 September 2026 rsyslog 8.2x and logrotate on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; notes for Ubuntu 24.04 and 26.04 and On AlmaLinux, Rocky Linux and RHEL, /var/log/messages is readable by root only (-rw-------). If a monitoring tool or an application running as another user must read... How to Change the Timeout Before Falling Back to the Secondary DNS Server Updated 28 September 2026 glibc resolver with NetworkManager on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; systemd-resolved on Ubuntu 2 When the first DNS server in /etc/resolv.conf does not answer, every lookup waits before trying the next one: by default 5 seconds per attempt, with 2 rounds through... How to Change the UUID of an LVM Volume Group or Physical Volume 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 Every LVM physical volume (PV) and volume group (VG) has a unique ID (UUID). Two disks with the same UUIDs confuse LVM: this happens when a disk is cloned, a VM image... How to Check a Disk for Bad Blocks and Errors in Linux Updated 4 November 2026 smartmontools 7.2 to 7.4, e2fsprogs badblocks and xfsprogs on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu Disk errors show up as I/O errors in the logs, slow file access, or a file system that turns read-only. Modern disks (HDD and SSD) replace bad sectors themselves and... How to Check and Change the Timezone on AlmaLinux, Rocky Linux, RHEL and Fedora (timedatectl) Updated 4 November 2026 AlmaLinux 10.2 (systemd 257, cronie 1.7.0), Rocky Linux 9.8 (systemd 252, cronie 1.5.7) and Fedora 44 (systemd 259); leg To check the server timezone on AlmaLinux, Rocky Linux, RHEL or Fedora, run timedatectl and read the Time zone line. To change it, run sudo timedatectl set-timezone... How to Check if ALUA Is Enabled on a LUN in Linux (sg_rtpg and multipath) Updated 29 September 2026 sg3_utils 1.46 to 1.48 and device-mapper-multipath on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 an ALUA (Asymmetric Logical Unit Access) is how many storage arrays tell a server which paths to a LUN are fast and which are slower. A LUN is usually reachable through... How to Check if a Remote Port Is Open with nc (netcat) Updated 4 November 2026 Ncat 7.92 (nmap-ncat) on AlmaLinux 10.2, also used on Rocky Linux and RHEL; OpenBSD netcat on Debian 13 (1.229), Ubuntu To check whether a port on another server is open, run nc -zv -w 3 203.0.113.10 443 (use the server's address and port). -z only opens and closes the connection, -v... How to Check, Tune or Disable NUMA on Linux Updated 30 September 2026 Linux kernels on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 On servers with more than one CPU socket (and on some single-socket processors), memory is divided into NUMA nodes: each CPU reaches its "own" memory faster than... How to Configure Device File owner/group with udev rules? Linux creates a device file under /dev for each hardware device when it is attached.By default these files are owned by root and belong to a system group (for example... How to Configure Django with Apache and mod_wsgi on Linux Updated 19 November 2026 Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 mod_wsgi lets Apache run a Django project directly. This guide assumes the project is in /srv/mysite with a virtual environment in /srv/mysite/venv (see "How to... How to Configure Huge Pages (HugeTLB) on Linux Updated 28 September 2026 AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 (x86_64) Huge pages are memory pages of 2 MiB (or 1 GiB) instead of the normal 4 KiB. Large databases and some Java and virtualisation workloads run faster with them, because... How to Configure Kernel Fallback with GRUB on Linux Updated 19 November 2026 Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 CentOS 6 and its GRUB 0.97 "fallback" setting are long obsolete. Current systems use GRUB 2, where the same safety net works with a one-time boot entry. These steps... How to Configure Nginx with Lets Encrypt on AlmaLinux, Rocky Linux and Ubuntu Updated 18 November 2026 AlmaLinux 9 / Rocky Linux 9 and Ubuntu 24.04 CentOS 7 reached end of life on 30 June 2024, so this guide now uses AlmaLinux 9 / Rocky Linux 9 (the steps also suit other RHEL 9 rebuilds). Let's Encrypt gives free... How to Configure Remote rsyslog with TLS and Plain TCP Updated 4 November 2026 rsyslog 8.23 to 8.25 with rsyslog-gnutls on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, D Logs sent over the network in plain text can be read and altered on the way. rsyslog can encrypt them with TLS. This guide sets up a log server that accepts encrypted... How to Configure Samba Guest and Home Shares on AlmaLinux, Rocky Linux and RHEL Updated 4 November 2026 Samba 4.23 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10 (SELinux and firewalld) This guide adds two common kinds of Samba share on AlmaLinux, Rocky Linux and RHEL: a read-only public folder that anyone on your network can open without a password,...