cheatsheet

find Command in Linux: Syntax, Options & Practical Examples

GNU find walks a directory tree and matches files and folders by name, type, size, time, owner, and permissions. It can print paths, run commands on matches, or delete files — the standard tool for log cleanup, audits, …

Rohan Timalsina11 min read
cheatsheet

cpio Command in Linux: Archive, Extract & Pass-Through (Ubuntu)

The cpio command archives, lists, and extracts files on Linux. It reads file names from standard input, so it pairs naturally with find for flexible backups, initramfs images, and directory copies.

Rohan Timalsina9 min read
cheatsheet

lbzip2 Command in Linux: Syntax, Options & Practical Examples

lbzip2 compresses and decompresses .bz2 files using multiple CPU threads. It reads the same bzip2 format as the classic bzip2 tool, so archives stay compatible while compression and decompression run faster on multi-core …

Deepak Prasad9 min read
cheatsheet

finger Command in Linux: Syntax, Options & Practical Examples

finger looks up user account details on Linux — logged-in sessions, home directory, shell, idle time, and optional .plan files. It is not installed by default on many distros; on minimal hosts it often reports no …

Rohan Timalsina8 min read
cheatsheet

ip route Command in Linux: Syntax, Options & Routing Examples

ip route displays and changes the kernel routing table — default gateways, static subnets, metrics, and special drop routes. It is part of iproute2 and replaces the legacy route command on modern Linux.

Rohan Timalsina10 min read
cheatsheet

lscpu Command in Linux: CPU Architecture, Cores & JSON Output

lscpu prints CPU topology from sysfs and /proc/cpuinfo — sockets, cores, threads, NUMA nodes, caches, and flags. Use it for capacity planning, affinity tuning, and JSON export to monitoring scripts.

Rohan Timalsina7 min read
cheatsheet

lshw Command in Linux: List Hardware (CPU, Disk, Memory, Network)

lshw reports hardware configuration — CPU, memory, disks, network, and firmware — from DMI, PCI, and kernel interfaces. Run it with sudo for full detail; use -short, -json, or -class to narrow output.

Rohan Timalsina7 min read
cheatsheet

chown Command in Linux: Change File & Directory Ownership (Ubuntu/Debian)

The chown command changes the user and/or group owner of files and directories on Linux. Use it with sudo to fix web roots, deploy trees, and restore ownership after restores or copies.

Rohan Timalsina10 min read
cheatsheet

ln Command in Linux: Create Symbolic Links (Soft Links) on Ubuntu

The ln command creates links in the filesystem. With -s it makes symbolic (soft) links — path shortcuts to files or directories — without duplicating data.

Deepak Prasad9 min read
cheatsheet

chmod Command in Linux: Octal, Symbolic Modes & Recursive -R (Ubuntu)

The chmod command sets read, write, and execute permission bits on files and directories. Use octal modes like 644 and 755, symbolic forms like u+x, or chmod -R to fix an entire tree.

Deepak Prasad10 min read
cheatsheet

csplit Command in Linux: Split Files by Pattern or Line Number

The csplit command splits a text file into pieces at regex patterns or line numbers. Use it when file structure — headers, sections, markers — defines where to cut.

Deepak Prasad8 min read
cheatsheet

rmmod Command in Linux: Syntax, Options & Practical Examples

rmmod removes loadable kernel modules from a running Linux kernel. Use it to unload drivers you loaded for testing; modprobe -r is the higher-level alternative that handles dependencies.

Omer Cakmak7 min read
cheatsheet

hping3 Command in Linux: Syntax, Options & Practical Examples (Ubuntu)

hping3 crafts and sends custom TCP, UDP, and ICMP packets on Linux. Network admins use it for connectivity checks, port probes, firewall rule validation, and latency tests when ping is not enough.

Rohan Timalsina10 min read
cheatsheet

groupadd Command in Linux: Syntax, Options & Practical Examples

groupadd creates a new entry in /etc/group and /etc/gshadow. Use it to add project teams, service groups, or fixed GIDs before assigning users with usermod or adduser.

Rohan Timalsina8 min read
cheatsheet

Linux ACL: setfacl, getfacl, and Permission Workflow on ext4 and xfs

POSIX ACLs extend owner/group/other permissions with per-user and per-group rules. On Linux, getfacl inspects ACLs and setfacl changes them on ext4 and xfs; GNU chmod has no +a syntax (that is macOS/BSD).

Rohan Timalsina11 min read
cheatsheet

ps Command in Linux: Syntax, Options & Process Listing Examples

ps prints a snapshot of running processes from /proc — PIDs, owners, CPU and memory use, and command lines. Part of procps-ng on most Linux distros; ideal for scripts and one-off checks.

Rohan Timalsina8 min read
cheatsheet

crontab Command in Linux: Schedule Jobs, Syntax & Examples

crontab installs and edits per-user cron tables — the schedule files the cron daemon reads to run commands at fixed times. Use it to list, edit, validate, and remove recurring jobs without touching spool files by hand.

Rohan Timalsina9 min read
cheatsheet

ping Command in Linux: Syntax, Options & Practical Examples

ping sends ICMP echo requests to a host and reports whether replies arrive. Use it to check basic IP reachability, measure round-trip time, and spot DNS or firewall problems before digging into ports or routes.

Rohan Timalsina10 min read
cheatsheet

nice and renice Commands in Linux: Process Priority Syntax & Examples

nice starts a command with a lower or higher CPU scheduling priority (nice value -20 to 19). renice changes the nice value of processes that are already running — by PID, process group, or user.

Rohan Timalsina8 min read
cheatsheet

lsof Command in Linux: Syntax, Options & Practical Examples (Ubuntu)

lsof lists open files, directories, devices, and network sockets for running processes on Linux. Admins use it to find which process holds a port, a log file, or a deleted-but-still-open path.

Rohan Timalsina9 min read
cheatsheet

iostat Command in Linux: Syntax, Options & Practical Examples (Ubuntu)

iostat from the sysstat package reports CPU utilization and per-device disk I/O statistics on Linux. It helps admins spot saturated disks, high iowait, and throughput changes during performance troubleshooting.

Rohan Timalsina8 min read
cheatsheet

paste Command in Linux: Merge Lines, Delimiters & Practical Examples

paste merges corresponding lines from one or more files into wider rows — tab-separated by default, or with custom delimiters. Use it to build columns, CSV-style output, and one-line serializations in shell pipelines.

Deepak Prasad7 min read
cheatsheet

cut Command in Linux: Extract Fields, Bytes & Practical Examples

cut prints selected bytes, characters, or delimiter-separated fields from each line of a file or pipeline. It is the fast first choice for usernames from /etc/passwd, CSV columns, and fixed-width snippets in shell …

Rohan Timalsina7 min read
cheatsheet

cmp Command in Linux: Compare Files Byte by Byte (Examples & Reference)

cmp compares two files byte by byte on Linux. It reports the first difference, supports silent exit codes for scripts, and can list every differing byte — unlike line-oriented diff.

Rohan Timalsina6 min read
cheatsheet

netstat Command in Linux: Syntax, Options & Practical Examples (Ubuntu)

netstat from net-tools prints active sockets, routing tables, interface counters, and protocol statistics on Linux. It is a legacy but still common tool for checking listening ports and connection states on Debian and …

Rohan Timalsina9 min read
cheatsheet

dmidecode Command in Linux: BIOS, Serial, Memory & CPU (Debian/Ubuntu)

dmidecode reads SMBIOS/DMI tables from firmware and prints hardware inventory: BIOS version, system vendor and serial, board, chassis, processor, and memory layout on Linux.

Rohan Timalsina8 min read
cheatsheet

dpkg Command in Linux: Syntax, Options & Practical Examples (Debian/Ubuntu)

dpkg is the low-level package manager for .deb archives on Debian and Ubuntu. It installs, removes, configures, and inspects packages in the local dpkg database without resolving repository dependencies.

Rohan Timalsina8 min read
cheatsheet

rpm Command in Linux: Syntax, Options & Practical Examples (RPM-Based Distros)

rpm is the low-level package manager for .rpm archives on RHEL, Fedora, Rocky Linux, and AlmaLinux. It installs, upgrades, erases, queries, and verifies RPM packages and maintains the local RPM database.

Rohan Timalsina9 min read
cheatsheet

nmap Command in Linux: Syntax, Options & Practical Examples (Ubuntu)

nmap (Network Mapper) discovers hosts, scans TCP and UDP ports, detects services and OS fingerprints, and runs NSE scripts. It is the standard CLI tool for network inventory and authorized security audits on Linux.

Rohan Timalsina12 min read
cheatsheet

grep Command in Linux: Search Text, Logs, and Command Output

grep prints lines that match a pattern in files or piped input. Use it to scan logs, filter command output, and count or list matches with GNU grep options.

Rohan Timalsina8 min read