Knowledgebase

CentOS

Cent Operating System

Articles

How to Run a Script Automatically at Boot on Linux (systemd) 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 To run a script once every time the server starts, for example to set a network option, mount a special disk or send a "server is up" message, use a small systemd... How to Run a Script When USB Devices Is Attached or Removed Using UDEV? The post outlines steps to create UDEV rules that run a specific script when a USB device is attached or removed. We can use the udevadm tool to see the information... How to Scan for New LUNs with Multipath on RHEL, AlmaLinux and Rocky Linux Updated 4 November 2026 device-mapper-multipath 0.8 and 0.9, sg3_utils 1.47 and 1.48 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; mu When a storage administrator assigns a new LUN (a disk from a SAN, over Fibre Channel or iSCSI) to a server, Linux does not always notice it by itself. You tell the... How to Secure Kibana with an Nginx Reverse Proxy Updated 19 November 2026 Elastic Stack 9.x on Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 CentOS 7 is end of life. Current Kibana versions (9.x) have their own login and can use TLS, so Nginx is used mainly to publish Kibana on a normal HTTPS address. These... How to Secure a CentOS, AlmaLinux or Rocky Linux Server Updated 22 October 2026 AlmaLinux 10.2 and Rocky Linux 9.8 (tested), RHEL 9 and 10 (according to Red Hat); notes for servers still on CentOS 7 The steps that make the biggest difference on a CentOS-family server are: keep it updated, log in with SSH keys instead of root passwords, close every port you do not... How to Send Linux Audit Logs to a Remote Rsyslog Server Updated 4 November 2026 audit 3.1 and 4.0 with rsyslog 8.2x on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian The Linux audit system writes its events to /var/log/audit/audit.log on each server. If an attacker gets root, they can edit that file. Sending a copy of every audit... How to Set Up Nginx Server Blocks on AlmaLinux and Rocky Linux Updated 18 November 2026 AlmaLinux 9 / Rocky Linux 9 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). Server blocks (virtual... How to Set Up a Firewall with firewalld on AlmaLinux and Rocky Linux Updated 18 November 2026 AlmaLinux 9 / Rocky Linux 9 (and Ubuntu 24.04 / Debian 12 with UFW) CentOS 6/7/8 and RHEL 6/7 are end of life. This guide uses AlmaLinux 9 / Rocky Linux 9 (and Ubuntu 24.04 / Debian 12 where they differ). firewalld is the standard... How to Set Up a Remote Syslog Server with rsyslog Updated 4 November 2026 rsyslog 8.2510 on AlmaLinux 9.8 and 10.2 (the same steps apply to Rocky Linux and RHEL 9 and 10) and rsyslog 8.2312 on U A remote syslog server is a server that collects log messages from your other servers and network devices, by default on port 514 (UDP and TCP). With rsyslog you set... How to Set a Network Interface to Promiscuous Mode Permanently on Linux Updated 4 November 2026 NetworkManager 1.54 and 1.56 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; iproute2 on Ubuntu 24.04 and 26.04 A network interface in promiscuous mode passes every packet it sees to the system, not only packets addressed to it. Packet capture and intrusion detection tools... How to Set a Static IP Address from the Linux Command Line (CentOS, AlmaLinux, Rocky Linux, RHEL and Ubuntu) Updated 11 October 2026 NetworkManager 1.58 (CentOS Stream 10) and 1.54 (AlmaLinux 9.8), the same nmcli commands on AlmaLinux, Rocky Linux and R To set a static IP address from the Linux command line on CentOS Stream, AlmaLinux, Rocky Linux, RHEL or Fedora, change the NetworkManager connection with nmcli and... How to Set dev_loss_tmo Value Persistently Using Udev Rule? 1. Check the attributes of the FC remote port(s) using the below command: # udevadm info --attribute-walk --path=/sys/class/fc_remote_ports/rport-x:y-z   2. Then... How to Set nproc (Max User Processes) Limits on Linux Updated 28 September 2026 systemd 252 to 259 and PAM limits on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 1 The nproc limit caps how many processes (and threads) one user may run. It protects a server from a runaway program or a fork bomb. When it is too low, busy... How to Set or Disable the Login Banner and MOTD for Specific Users Updated 28 September 2026 OpenSSH and pam_motd on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 Linux servers can show two kinds of messages to people who log in over SSH: a banner, shown before login (often a legal warning), and the MOTD ("message of the day"),... How to Set the Date, Time, Time Zone and NTP with timedatectl Updated 4 November 2026 systemd 252 to 259 (timedatectl) on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 timedatectl shows and sets the system clock, the time zone and automatic time synchronisation (NTP) in one tool. It replaces the separate date, hwclock and... How to Set udev Rules for Oracle ASM on Multipath Disks Updated 28 September 2026 systemd-udev and device-mapper-multipath on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Oracle Linux 8 to 10 Oracle ASM needs its disks owned by the Grid Infrastructure user (often grid, group asmadmin) with mode 0660, and those settings must survive reboots. With multipath... How to Start and Restart the Samba Service in Linux Updated 12 October 2026 Samba 4.23.5 on AlmaLinux 10.2, Samba 4.23.6 on Ubuntu 26.04 and Samba 4.22.11 on Debian 13 (tested); Ubuntu 24.04 (Samb To restart Samba, run sudo systemctl restart smb on AlmaLinux, Rocky Linux, RHEL and Fedora, or sudo systemctl restart smbd on Ubuntu and Debian. To start it now and... How to Start, Stop and Use Process Accounting (psacct and acct) Updated 28 September 2026 psacct 6.6.4 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; acct 6.6.4 on Ubuntu 24.04 and 26.04 and Debian 13 Process accounting records every command that finishes on the server: who ran it, when, and how much CPU time it used. It helps answer "who ran this?" after an... How to Stop Kernel or Package Updates with dnf versionlock and apt-mark hold Updated 22 October 2026 Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 Sometimes an application needs a specific kernel or package version, so it must not be updated. RHEL/CentOS 7 used the yum versionlock plugin; AlmaLinux 9 / Rocky... How to Stop Repeated Promiscuous Mode Messages in the System Log 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 Messages such as device eth0 entered promiscuous mode and device eth0 left promiscuous mode, repeated many times in /var/log/messages or the journal, mean that some... How to Stop SSH Session Timeouts (ServerAliveInterval, ClientAliveInterval) and Exit, Kill or Stop SSH Updated 4 November 2026 OpenSSH 10.2p1 (Ubuntu 26.04), 10.0p2 (Debian 13), 9.9p1 (AlmaLinux 10.2 and Rocky Linux 9.8) and 9.6p1 (Ubuntu 24.04) OpenSSH does not close an idle session by itself: ClientAliveInterval is 0 and there is no idle timeout by default. When a quiet session drops, a router, NAT gateway... How to Troubleshoot NFS Latency With nfsiostat Updated 29 September 2026 nfs-utils 2.5 to 2.8 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10; nfs-common on Ubuntu 24.04 and 26.04 and Debi When an NFS share feels slow, the first question is where the time goes: the network, the NFS server, or waiting inside the client. nfsiostat answers that per mount... How to Troubleshoot iSCSI Connection Problems on Linux Updated 30 September 2026 iscsi-initiator-utils 6.2.1 (open-iscsi) on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10; open-iscsi on Ubuntu 24.0 When an iSCSI disk does not appear, disappears, or is slow, work from the network up to the session and the disk. The commands below are the same on all current... How to Tune Btrfs Filesystem for Better Performance? Btrfs is a filesystem which is very new and is still under development and benchmarking phase. As far as performance is concerned usually it doesn’t require much to do... How to Upgrade MariaDB on cPanel, AlmaLinux, Rocky Linux and Ubuntu Updated 19 November 2026 AlmaLinux 9 / Rocky Linux 9, Ubuntu 24.04, Debian 12 and cPanel & WHM 138 (MariaDB 11.4 LTS) MariaDB 10.4, CentOS 7 and VestaCP are all end of life (VestaCP is no longer maintained). The current MariaDB long-term releases are 10.11, 11.4, 11.8 and 12.3. These...