Knowledgebase

List of Commands

Tricks to learn commands

Articles

Commands for Comparing Files and Directories in Linux Updated 30 November 2026 Linux with GNU diffutils and coreutils (tested on AlmaLinux 10.2 with diffutils 3.10, coreutils 9.5, rsync 3.5 and Git 2 The main commands for comparing files in Linux are diff (which lines differ), cmp (are two files byte for byte the same) and sha256sum (compare checksums). For... Commands for Handling files and directories Updated 28 September 2026 AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12 Everyday commands for working with files and folders on Linux: mkdir dir # create a folder mkdir -p dir1/dir2 # create nested folders cd dir... Commands for changing file access rights Updated 28 September 2026 AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12 Linux permissions decide who can read (r), write (w) and execute (x) a file: the owner (u), the group (g) and others (o). chmod u+w file # owner may write... Compressing and Uncompressing Files in Linux Linux provides several tools for compressing and decompressing files. Compression reduces file size, saves storage, and makes transfers faster. Below are the most... Fundamental Commands of Linux and Unix (with Examples and Syntax) Updated 22 October 2026 These are the fundamental file and directory management commands every Linux or Unix user needs. 1. List files: ls ls Lists files and directories in your current... How to Display File Contents in Linux: cat, less, more, head and tail Updated 4 November 2026 Debian 13, Ubuntu 24.04 and 26.04 (GNU coreutils 9.7 and uutils 0.10.0, less 590 and 668, util-linux more 2.39 and 2.41) To display a file in Linux, use cat for short files, less to page through long ones, head and tail to see the first or last lines, and tail -f to watch a log file... How to List Files in Linux with the ls Command: Options and Examples Updated 4 November 2026 Debian 13, Ubuntu 24.04 and 26.04, AlmaLinux 10 (GNU coreutils ls 9.4 to 9.7; uutils ls 0.10.0 on Ubuntu 26.04) To list files in Linux, type ls. On its own it shows the names in the current directory; add a path to list another directory. For a full picture of a directory, use... Linux File Hierarchy Structure The Linux File Hierarchy Structure or the Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Unix-like operating systems.It... Linux Job Control Cheat Sheet: ps, kill, bg, fg, nohup Updated 11 October 2026 AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12 See and control running processes: ps -ef # all processes ps aux --sort=-%cpu # busiest first top # live view (P: CPU, M:... Linux Text Processing Commands: grep, sort, uniq, wc, cut, tr and diff with Examples Updated 4 November 2026 Debian 13, Ubuntu 24.04 and 26.04, Rocky Linux 9 (GNU coreutils 8.32 to 9.7, uutils coreutils 0.10.0 on Ubuntu 26.04, GN Linux has a small set of commands for searching, sorting, counting and changing text in files. Each one does one job, and you chain them with a pipe (|): grep 'text'... Linux Wildcards and Globbing: Match File Names with *, ? and [ ] in Bash Updated 4 November 2026 bash 5.2 and 5.3 on Debian 13, Ubuntu 24.04 and 26.04 and AlmaLinux 10; bash 5.1 on Rocky Linux 9 and AlmaLinux 9 File name pattern matching (globbing) is done by the shell, not by the command. Before ls, cp or rm runs, bash replaces a pattern with the list of matching names. *... Linux find Command Cheat Sheet for Finding Files Updated 11 October 2026 AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12 The find command searches folders for files by name, size, date and more. find . -name "*log*" # names containing "log" find... Linux tar and gzip Cheat Sheet: tar.gz, tgz, gunzip and zip Updated 9 November 2026 Debian 13 (GNU tar 1.35, gzip 1.13, Zip 3.0, UnZip 6.00) and Ubuntu 24.04 (tar 1.35, gzip 1.12); the same commands work To pack a directory into a gzipped tarball, run tar -czf archive.tar.gz folder. To unpack it, run tar -xzf archive.tar.gz (add -C /path to choose where). gzip file... Redirecting Command Output in Linux Bash: Files, Errors, tee Updated 30 November 2026 Bash 5.2 on Ubuntu 24.04, also Debian, AlmaLinux and Rocky Linux; notes for dash (/bin/sh) To save a command's output in a file, put > file after it (this replaces the file) or >> file (this adds to the end). Errors go to a separate stream, so add... Understanding File and Partition Sizes in Linux Understanding File and Partition Sizes in Linux Managing disk space efficiently in Linux requires checking file sizes, directory sizes, and disk partitions...