Articles by Rohan Timalsina
chattr Command in Linux: Syntax, Options & Immutable and Append-Only Examples
chattr sets filesystem-level attributes on ext2, ext3, and ext4 — immutable (+i) blocks edits and deletion even for root; append-only (+a) allows only adds at the end. Pair it with lsattr to inspect flags before …
ipcs Command in Linux: Syntax, Options & IPC Monitoring Examples
ipcs lists System V IPC facilities in the kernel — shared memory segments, message queues, and semaphore arrays. Use it to see what applications allocated, who owns each object, and whether limits are close to …
vmstat Command in Linux: Memory, CPU, and I/O Snapshots
vmstat prints process, memory, swap, I/O, and CPU activity from /proc. The first sample is often a summary since boot; repeating with a delay shows live trends for quick performance checks.
apt Command in Linux: Syntax, Options & Practical Examples (Ubuntu/Debian)
apt is the high-level package manager on Debian and Ubuntu. It refreshes repository indexes, installs and removes packages with dependency resolution, and queries metadata from configured sources.
chage Command in Linux: Syntax, Options & Password Aging Examples
chage views and edits password aging fields in /etc/shadow — maximum password age, warning days, inactivity lock, and account expiry. Use it to enforce rotation policy or set temporary accounts without editing shadow by …
chgrp Command in Linux: Syntax, Options & Change Group Ownership Examples
chgrp changes the group owner of files and directories without touching the user owner. Use it for shared project trees, web roots, and fixing group mismatches after restores.
usermod Command in Linux: Syntax, Options & Practical Examples
usermod changes an existing local user account — login name, UID, primary or supplementary groups, home directory, shell, expiry, and lock state. It edits /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow.
journalctl Command in Linux: View, Filter, and Troubleshoot System Logs
journalctl reads logs collected by systemd-journald — kernel messages, service output, boot sessions, and syslog traffic in one queryable journal. Filter by unit, time, priority, boot, and process fields without hunting …
elinks Command in Linux: Syntax, Options & Practical Examples
ELinks is a terminal web browser for Linux. It renders pages in text mode for interactive browsing over SSH, and with -dump or -source it prints readable text or raw HTML for scripts and offline docs.
curl Command in Linux: Syntax, Options & Practical Examples
curl transfers data over HTTP, HTTPS, FTP, and other protocols from the shell. Use it to fetch URLs, inspect headers, download files, and send POST and JSON payloads when testing APIs or debugging connectivity.
dumpe2fs Command in Linux: Syntax, Options & Practical Examples
dumpe2fs prints read-only superblock and block-group metadata for ext2, ext3, and ext4 filesystems. Admins use it to inspect UUIDs, inode counts, mount history, and backup superblock locations before fsck recovery.
locate Command in Linux: Syntax, Options & Practical Examples (plocate)
locate finds file paths by name using a prebuilt index instead of walking the disk. On Ubuntu 25.04 the locate name is a symlink to plocate; searches are fast but you need updatedb when files were added or removed …
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, …
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.
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 …
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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 …
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.
