Linux
Linux, cPanel, CentoOs
Articles
How to Search and Remove Directories Recursively on Linux?
To achieve the above purpose, you can employ the find command together with rm command using the syntax below. Here, the + sign at the end enables multiple directories...
How to Send a Message to Logged Users in Linux Terminal?
Linux offers a variety of means for sending messages to users logged on to a server as explained in the two methods below.
In the first method, we will use wall...
How to Set Up an SSL Certificate on Apache Tomcat 10.1 and 11
To configure SSL in Tomcat, copy your certificate, its chain and the private key to the server and add an HTTPS Connector with an SSLHostConfig element to...
How to Set Up and Manage Log Rotation with logrotate
logrotate keeps log files from filling the disk: it renames the current log, starts a new one, compresses the old ones and deletes the oldest. System packages set it...
How to Set a Static IP Address on Debian 13 with ifupdown
On a Debian server without a desktop, the network is set in /etc/network/interfaces (the ifupdown package). To give the server a static IP address, change the...
How to Set always_populate_raw_post_data in the php.ini File
The always_populate_raw_post_data setting only exists in PHP 5.x, which is end of life. It was removed in PHP 7.0, so it cannot be set on current PHP versions (8.1 and...
How to Set or Change Hostname in CentOS 7?
CentOS 7 is end of life. On Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 the hostname is set with hostnamectl.
Show the current name: hostnamectlSet a new...
How to Show Asterisks While Typing the sudo Password in Linux
To make sudo show an asterisk (*) for every character of your password, add Defaults pwfeedback to the sudoers configuration with visudo. The quickest safe way is a...
How to Shrink an LVM Volume Formatted with XFS
XFS file systems cannot be shrunk; there is no command for it. To make an LVM volume that holds XFS smaller, you back up the data, reduce the volume, create a new XFS...
How to Start, Stop, or Restart Apache?
The Apache service is called apache2 on Ubuntu and Debian and httpd on AlmaLinux, Rocky Linux and other RHEL-based systems.
systemctl start apache2 # start...
How to Sync Google Drive on Ubuntu 24.04 and 26.04 (Insync and rclone)
Google does not make a Google Drive app for Ubuntu: its help pages say the Drive for desktop app is not available for Linux and point Linux users to Drive in the...
How to Sync Time with an NTP Server on Linux and Ubuntu
To sync the time on Linux, run timedatectl. If it shows System clock synchronized: yes and NTP service: active, the server already keeps its clock in step with NTP...
How to Test Website Loading Speed in Linux Terminal?
A website response time can have a great impact on user experience, and if you are a web developer, or simply a server administrator who is particularly responsible...
How to Turn Off the Firewall on Linux (firewalld, UFW, CSF)
To turn off the firewall on Linux, run sudo systemctl stop firewalld on AlmaLinux, Rocky Linux and RHEL (add sudo systemctl disable firewalld to keep it off after a...
How to Turn On Syntax Highlighting in Vi and Vim
To turn on syntax highlighting in Vim, type :syntax on and press Enter. To keep it on, add syntax on to the file ~/.vimrc in your home folder. If Vim answers E319:...
How to Turn Swap Off in Linux and Disable It Permanently
To turn swap off in Linux, run sudo swapoff -a. That lasts until the next reboot. To disable swap permanently, also put a # in front of every swap line in /etc/fstab...
How to Undo or Redo a Yum Install on CentOS and RHEL?
One of the most important and useful features added to YUM Package Manager (from version 3.2.25) is the ‘yum history’ command. It allows you to review a full history...
How to Unzip a Password Protected ZIP File in Linux (and Create One with zip or 7-Zip AES)
To unzip a password-protected ZIP file in Linux, run unzip file.zip and type the password when it asks. If unzip answers need PK compat. v5.1 (can do v4.6), the file...
How to Update Fedora Linux and Flatpak Apps from the Terminal
To update Fedora Linux from the terminal, run sudo dnf upgrade --refresh, then reboot if the kernel or core libraries were updated. Flatpak apps are not part of that:...
How to Update Python and pip on Linux Without Breaking Your System
Linux distributions depend on their own Python for system tools, so “updating Python” means adding a newer version next to the system one, and using...
How to Update Ubuntu and Linux from the Command Line
To update Ubuntu from the command line, run sudo apt update to refresh the package lists, then sudo apt upgrade to install the newer versions. In one line:
sudo apt...
How to Update a Lenovo BIOS on Linux Without Windows (fwupd and Bootable ISO)
Yes, you can update a Lenovo BIOS from Linux without Windows. Lenovo publishes BIOS (UEFI) firmware for ThinkPad, ThinkCentre and ThinkStation models on the Linux...
How to Use 7-Zip on Linux: Add to Archive and Extract from the Command Line (7z Examples)
To use 7-Zip on Linux, install the 7zip package and run the 7z command. 7z a adds files to an archive and 7z x extracts an archive with its folders:
7z a backup.7z...
How to Use GNU bc (Basic Calculator) in Linux
bc is a calculator for the command line with arbitrary precision. It is handy in shell scripts, which can only do whole-number arithmetic on their own, and for quick...
How to Use Udev for Device Detection and Management in Linux?
Udev (userspace /dev) is a Linux sub-system for dynamic device detection and management, since kernel version 2.6. It’s a replacement of devfs and hotplug.
It...