How to
Add, Create, Install
Articles
How to Add New Disks Using LVM to an Existing Linux System?
LVM (Logical Volume Management) is a flexible and advanced option available to manage hard disks in most of the major Linux distributions. It is easy to manage the...
How to Auto Execute Commands/Scripts During Reboot or Startup?
You put in motion a series of events that lead to a fully-functional system, sometimes in less than a minute. The same is true when you log off and / or shutdown the...
How to Backup or Clone Linux Partitions Using cat Command?
A rough utilization of Linux cat command would be to make a full disk backup or a disk partition backup or cloning of a disk partition by redirecting the command...
How to Build Nginx from source on Debian 9
Debian 9 and 10 are no longer supported, so this guide now uses Debian 12 (Ubuntu 24.04 works the same way).
Building Nginx from source lets you add modules that are...
How to Build Nginx from source on Fedora 29
Nginx (pronounced "engine x") is an open source web server software designed with high concurrency in mind, that can be used as HTTP/HTTPS server, reverse proxy...
How to Change the IP Address on RHEL, AlmaLinux and Rocky Linux (nmcli, nmtui, ip and ifconfig)
To change the IP address on RHEL, AlmaLinux or Rocky Linux permanently, edit the NetworkManager connection with nmcli and reactivate it:
nmcli connection show
nmcli...
How to Check Allocated Disk Space on a Linux Server
Two commands show disk space on Linux: df for whole file systems and du for folders.
Free space on each file system
df -h
Look at the Size, Used, Avail and Use%...
How to Check Bad Sectors or Bad Blocks on Hard Disk in Linux?
A bad sector/block, it’s a section on a disk drive or flash memory that can not be read from or written to anymore, as a result of fixed physical damage on the disk...
How to Check MD5 Sums of Installed Packages in Debian/Ubuntu Linux?
To Verify Installed Debian Packages Against MD5 Checksums
On Debian/Ubuntu systems, you can use the debsums tool to check the MD5 sums of installed packages. If...
How to Check Remote Ports are Reachable Using nc Command?
A port is a logical entity which acts as an endpoint of communication associated with an application or process on a Linux operating system. It is useful to know which...
How to Check SMART Status and Monitor Disk Health with smartd
To check the SMART status of a drive in Linux, run smartctl -H /dev/sda (or /dev/nvme0): PASSED is good, FAILED! means the drive has failed or, according to the...
How to Check the Timezone in Linux: Quick Commands for Any Distro, Scripts, PHP, MySQL and Python
To check the timezone on any Linux system, run date '+%Z %z': it prints the zone abbreviation and the offset from UTC. For the full zone name, run timedatectl show -p...
How to Clear DNS Cache: Mac, Chrome, Windows, Linux, dnsmasq
To clear the DNS cache, run the command for the system that keeps the old answer:
Mac: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Windows: ipconfig...
How to Compile Brotli Compression Tool from Source on Fedora 29
Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding, and 2nd...
How to Compress and Decompress a .bz2 File in Linux?
To compress a file(s), is to significantly decrease the size of the file(s) by encoding data in the file(s) using less bits, and it is normally a useful practice...
How to Configure Disk Quota on Ubuntu Server
Disk quotas limit how much space or how many files a user or group can create on a filesystem. On an ext4 filesystem, set this up by installing the quota package,...
How to Configure Nginx as a Reverse Proxy for Apache
In this setup Nginx answers all visitors on ports 80 and 443 and serves static files (images, CSS, JavaScript) itself, while Apache runs behind it on a local port and...
How to Convert Files to UTF-8 Encoding in Linux?
character encoding is a way of informing a computer how to interpret raw zeroes and ones into actual characters, where a character is represented by set of numbers....
How to Convert From RPM to DEB and DEB to RPM Package Using Alien??
alien converts between Linux package formats, for example .rpm to .deb. It is packaged for Ubuntu/Debian and in EPEL for AlmaLinux/Rocky.
Install
apt install alien...
How to Count Number of Files and Subdirectories inside a Given Directory?
The easiest way to count number of files and subdirectories in a directory using a tree command, which is best known for displaying files and directories in tree-like...
How to Create WHM Master or Alpha Reseller Accounts in Zamfoo
Zamfoo is a third-party plugin that adds sub-reseller management on top of WHM, letting a reseller create their own Master Reseller or Alpha Reseller accounts...
How to Create a Public Status Page with Uptime Kuma
To create a public status page in Uptime Kuma, open Status Pages, click New Status Page, enter a Name and a Slug, and click Next. In the editor, add a description and...
How to Create a Shared Directory for All Users in Linux?
To enable write access to all users on a particular directory (shared directory) in Linux.
This calls for setting the appropriate access permissions, and the most...
How to Create a Swap File in Linux
To create a swap file in Linux, run sudo fallocate -l 2G /swapfile, protect it with sudo chmod 600 /swapfile, format it with sudo mkswap /swapfile, turn it on with...
How to Create a Virtual Disk: VHDX on Windows, qcow2 and Disk Image Files on Linux
A virtual disk is a file that behaves like a hard drive. On Windows, open Disk Management and choose Action > Create VHD, or run New-VHD in PowerShell. On Linux,...