CentOS
Cent Operating System
Articles
How to Use auditd to Find Out Who Deleted a File in Linux
When files disappear from a server, the audit system can tell you who deleted them, when, and with which program. You add a rule that records every delete and rename...
How to Use auditd to Monitor a Specific System Call
The audit system can record every call of a chosen system call, the low-level request a program makes to the kernel. This catches actions no matter which program...
How to Use dnf repoquery to List Package Dependencies
repoquery answers questions about packages without installing anything: what a package needs, what needs it, which package provides a file, and what is available in...
How to Use iperf3 to Test Network Performance in Linux
iperf3 measures the real network throughput between two machines. It is the standard tool to check whether a server gets the bandwidth it should, to compare two data...
How to allow or deny telnet login to specific users only in CentOS/RHEL?
The login to specific users can be allowed or denied using the file /etc/pam.d/remote. Other network services uses the files /etc/pam.d/sshd or...
How to backup Linux OS using “dd” Command?
“dd” command can be really handy when it comes to taking an Operating System backup to clone the disk the OS is installed on. Here are few examples of using dd command...
How to boot into rescue mode from installation DVD/ISO CentOS / RHEL 7 ?
CentOS/RHEL 7 are end of life; the rescue mode of the AlmaLinux 9 / Rocky Linux 9 installation ISO works as follows. Use it when the system no longer boots from its...
How to calculate the size of hugepage used by a specific process/application on RHEL/CentOS 6,7?
With HugePages configured, you may want to know how many a particular process uses. These methods work on Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9....
How to change the default permissions of log files created by rsyslog?
The user wants to change the default permissions of the log file /var/log/messages to make it world-writeable. How can this be done using rsyslog?
Solution
The...
How to change the number of commands stored in Bash History?
The 2 environment variables which majorly affects the Bash History setting of saving the last run commands are HISTSIZE and HISTFILESIZE. The post is a short howto on...
How to change the path of the auditd log file /var/log/audit/audit.log?
auditd records security events in /var/log/audit/audit.log. You can move the log, for example to a larger disk. These steps are for AlmaLinux 9 / Rocky Linux 9; on...
How to check Linux for Spectre and Meltdown vulnerability?
Spectre, Meltdown and the many later CPU flaws (for example MDS, Retbleed, Downfall) are handled by the kernel and the CPU microcode. On Ubuntu 24.04, Debian 12,...
How to clean /tmp on Centos/cPanel server?
Open SSH to your server, if SSH will not connect due to disk space full in tmp, reboot your server in cloud server manager then try again.
Once connected run the...
How to clear disk space on CentOS/RHEL 6, 7, 8?
CentOS 6/7/8 are end of life; these steps are for Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9. Do not run cleanup scripts from the internet that you have...
How to clear the buffer/pagecache (disk cache) under Linux
Are you facing a performance issue and you suspect it might be related to cache usage? High cache usage should not normally cause performance issues, but it might be...
How to configure DM-Multipath from an iSCSI initiator to an iSCSI target in CentOS / RHEL?
The procedure to configure DM-Multipath from an iSCSI initiator to an iSCSI target is presented, which assumes the following:
The iSCSI target package is installed...
How to configure cache-only nameserver on CentOS and RHEL 7?
Caching-only nameservers, or recursive nameservers, offer resolution services but they are not authoritative for any zone. These DNS cache nameservers store answers to...
How to configure iSCSI Initiator (client) in CentOS / RHEL 7?
CentOS/RHEL 7 are end of life; these steps are for AlmaLinux 9 / Rocky Linux 9 and Ubuntu 24.04 / Debian 12. An iSCSI initiator (client) connects to storage shared...
How to configure iSCSI target using targetcli in CentOS / RHEL 7?
CentOS/RHEL 7 are end of life; these steps are for AlmaLinux 9 / Rocky Linux 9 (Ubuntu/Debian: package targetcli-fb). The LIO target in the Linux kernel, managed with...
How to configure multicast on an IP address (interface)?
Multicast can be used to send IP packets to a group of interested receivers. Compared with broadcast, the packets are only sent to the members of a multicast group...
How to create an XFS Filesystem?
The XFS filesystem is a high performance journalling filesystem. XFS is the default file system for RedHat Linux 7. XFS supports a maximum file system size of 500 TB...
How to create partitions and file systems on DM-Multipath devices?
DM-Multipath combines multiple physical I/O paths between a server and a storage array (separate cables, switches and controllers) into one aggregated device, for...
How to create partitions inside loopback device?
In most of the situations you would simply create a loopback device using “losetup” and mount it using the “-o loopback” options. But if you want to create a loopback...
How to disable PREAUTH permanently in CentOS/RHEL 7
On RHEL/CentOS 7 systems joined to a domain with SSSD, a stale pam_preauth_available file can force pre-authentication prompts. Remove it automatically when SSSD...
How to disable firewalld and and switch to iptables in CentOS / RHEL 7?
By default, RHEL 7 uses the FirewallD service to provide network security. Firewalld may not be to everyone’s liking and you may prefer iptables. FirewallD must be...