Linux
Linux, cPanel, CentoOs
Articles
How to Limit Download Speed with wget (and curl) in Linux
A large download can use all of a server’s bandwidth and slow down your websites. wget --limit-rate caps the speed. We tested it on Ubuntu 24.04 and AlmaLinux...
How to List All Cron Jobs for All Users in Linux (crontab, cron.d and systemd Timers)
To list your own cron jobs, run crontab -l. To see another user's jobs, run sudo crontab -l -u USERNAME. To view cron jobs for all users, you need more than one...
How to List Cron Jobs in Linux and Read Crontab Syntax
Cron jobs can live in several places: each user’s own crontab, system-wide files in /etc, and, on modern systems, systemd timers. To see everything that runs on...
How to List Files Installed From a RPM or DEB Package in Linux
To list the files a package installed, use rpm -ql <package> on an RPM based system or dpkg -L <package> on a Debian based system. Package names are case...
How to List Users using Linux Command Line?
To list every user on a Linux system from the command line, read /etc/passwd, which has one line per account, human and system accounts both. cat /etc/passwd shows the...
How to Make File and Directory Undeletable, Even By Root in Linux?
On Unix-like operating systems including Linux, the root is the account or user name that by default can modify all directories and files on a system. In this article,...
How to Make Files and Directories Undeletable in Linux?
The command below makes /backups/passwd file immutable (or undeletable). This implies that the file can’t be modified in any way: it can’t be deleted or renamed. You...
How to Monitor CPU, Disk and Load on Linux with NRPE and Nagios
NRPE (Nagios Remote Plugin Executor) lets a Nagios server run checks on another Linux server: load, disk space, swap, processes and anything else a plugin can measure....
How to Monitor Server Ports and Services with Uptime Kuma
Uptime Kuma can watch more than websites. Use a TCP Port monitor to check that SSH, MySQL or mail ports answer, a Ping monitor to check that a server is reachable at...
How to Monitor Website Uptime with Uptime Kuma and Get Alerts
In Uptime Kuma, first create a notification (Email (SMTP), Telegram, Slack, Discord or one of the 90+ other services), press Test to check it, then add an HTTP(s) or...
How to Open a Port in Linux and Ubuntu: Firewall Commands
To open a port in Linux, allow it in the firewall your server uses, and make sure a program is listening on it. The command depends on the firewall:
Ubuntu and Debian...
How to Read a Filename with Spaces in Linux?
We will cover how to create, read and copy a file which has spaces in their filename.
1) Creating file names with spaces
To create files with spaces in file...
How to Read, Empty and Stop Root Mail on a Linux Server
Cron jobs, security tools and system services send their messages to the root user. On a server without anyone reading them, the root mailbox can grow to hundreds of...
How to Reload Vim: Reload .vimrc Without Restarting and Reload the Current File
To reload your Vim configuration without restarting Vim, type this in normal mode and press Enter:
:source $MYVIMRC
:so is the short form. $MYVIMRC holds the path of...
How to Remove Packages with Dependencies Using Yum?
Normally, removing a package using the YUM package management system will remove that package together with its dependencies. However, certain dependencies will not be...
How to Remove a Directory in Linux (rmdir and rm -r)
Linux has two commands for deleting folders: rmdir for empty folders and rm -r for folders with files in them. There is no recycle bin on the command line, so a...
How to Rename All Files in a Directory in Linux (Including to Lowercase)
To rename all files in a directory in Linux, loop over them in bash and call mv for each one, for example for f in *.txt; do mv -- "$f" "${f%.txt}.md"; done. This...
How to Rename Files and Folders in Linux (mv and rename)
Linux has no separate “rename” command for single files: you rename a file or folder by moving it to a new name with mv. For many files at once there is...
How to Repair database via phpMyAdmin in cPanel?
Repair a table when your site shows errors such as "Table '...' is marked as crashed and should be repaired" or "Incorrect key file for table".
Steps
Log in to cPanel...
How to Restart Services on Debian and Remote Linux Servers
To restart a service on Debian, run sudo systemctl restart SERVICE, for example sudo systemctl restart nginx. To do the same on another server without logging in to it...
How to Run Bash Aliases over SSH and Create SSH Host Aliases
ssh server myalias fails with command not found because a command sent over SSH runs in a non-interactive shell, and bash does not expand aliases there. The quick fix...
How to Run Commands from Standard Input Using Tee and Xargs in Linux?
Two of the most important command line utilities used with pipelines to build command lines are:
xargs: reads streams of data from standard input, then generates...
How to Run Multiple Commands on Multiple Linux Servers?
To achieve, this you can use the pssh (parallel ssh) program, a command-line utility for executing ssh in parallel on a number of hosts. With it, you can send input to...
How to Run Scripts and Commands with sudo in Linux
To run a shell script with sudo, give sudo the path to the script, not only its name: sudo ./backup.sh from the script's folder, or sudo /home/alice/bin/backup.sh from...
How to Save Terminal Output to a File in Linux
To save terminal output to a file in Linux, add > file.txt after the command, for example df -h > df.txt. > replaces the file, >> adds to the end of it,...