linux-helper — quick Linux command reference ==================================================== USAGE GET / Basic common commands (default) GET /?list=full All commands GET /?q= Search name/description (or exact command) Params: q|query, list=basic|full (also full=1) EXAMPLES curl 'http://localhost:5000/' curl 'http://localhost:5000/?list=full' curl 'http://localhost:5000/?q=ls' curl 'http://localhost:5000/?q=permission' LIST: basic (57 commands) Use ?list=full for every command. ARCHIVE ---------------------------------------------------- tar An archiving utility → tar -xzf archive.tar.gz unzip List, test, and extract compressed ZIP files → unzip archive.zip zip Package and compress files → zip -r archive.zip dir/ DIRECTORY/FILES ---------------------------------------------------- cd Change the current directory → cd ~ cp Copy files and directories → cp -r src/ dest/ ln Create hard or symbolic links → ln -s /path/to/target linkname ls List directory contents → ls -lia mkdir Create directories → mkdir -p path/to/dir mv Move or rename files → mv old.txt new.txt pwd Print working directory → pwd rm Remove files or directories → rm -rf dirname touch Create empty file or update timestamps → touch file.txt DISK ---------------------------------------------------- blkid Print block device attributes (UUID, TYPE, LABEL) → sudo blkid df Report file system disk space usage → df -h du Estimate file space usage → du -sh * fdisk List or edit disk partition tables → sudo fdisk -l findmnt List mounted filesystems in a tree → findmnt lsblk List disks, partitions, and mount points → lsblk -f mount Mount a filesystem (or list mounts) → mount | head umount Unmount filesystems → sudo umount /mnt MEMORY ---------------------------------------------------- free Display amount of free and used memory → free -h top Dynamic real-time process view → top uptime Tell how long the system has been running → uptime NETWORK ---------------------------------------------------- curl Transfer data from or to a server → curl -I https://example.com ip Show / manipulate routing, devices, policy routing → ip a ping Send ICMP ECHO_REQUEST to network hosts → ping -c 4 8.8.8.8 rsync Fast incremental file transfer → rsync -av src/ dest/ scp Secure copy (remote file copy over SSH) → scp file.txt user@host:/tmp/ ssh OpenSSH remote login client → ssh user@host wget Non-interactive network downloader → wget https://example.com/file.tgz PERMISSIONS ---------------------------------------------------- chmod Change file mode bits (permissions) → chmod +x script.sh chown Change file owner and group → sudo chown user:group file PROCESS ---------------------------------------------------- crontab Maintain crontab files for individual users → crontab -e kill Send a signal to a process → kill PID ps Report a snapshot of current processes → ps aux systemctl Control the systemd system and service manager → systemctl status nginx tmux Terminal multiplexer → tmux new -s work SEARCH ---------------------------------------------------- find Search for files in a directory tree → find . -name '*.log' SECURITY ---------------------------------------------------- id Print real and effective user/group IDs → id sudo Execute a command as another user → sudo command SHELL ---------------------------------------------------- history Display or manipulate the shell history list → history | tail man Interface to the system reference manuals → man ls which Locate a command → which python3 SYSTEM ---------------------------------------------------- date Print or set the system date and time → date uname Print system information → uname -a TEXT ---------------------------------------------------- cat Concatenate and print files → cat file.txt echo Display a line of text → echo 'hello' grep Print lines matching a pattern → grep -rn 'pattern' . head Output the first part of files → head -n 20 file.txt less Page through a file or stream → less file.txt nano Simple terminal text editor → nano file.txt sed Stream editor for filtering and transforming text → sed 's/foo/bar/g' file sort Sort lines of text files → sort file.txt tail Output the last part of files → tail -f /var/log/syslog vim Vi IMproved, a programmer's text editor → vim file.txt wc Print newline, word, and byte counts → wc -l file.txt USER ---------------------------------------------------- whoami Print effective userid → whoami Total: 57. ?q= for details. PACKAGE MANAGEMENT ---------------------------------------------------- Distro / family Mgr Update / Install / Remove Ubuntu apt update sudo apt update && sudo apt upgrade install sudo apt install remove sudo apt remove Debian apt update sudo apt update && sudo apt upgrade install sudo apt install remove sudo apt remove Fedora dnf update sudo dnf upgrade install sudo dnf install remove sudo dnf remove RHEL / Rocky / Alma dnf update sudo dnf upgrade install sudo dnf install remove sudo dnf remove Arch / Manjaro pacman update sudo pacman -Syu install sudo pacman -S remove sudo pacman -Rns openSUSE zypper update sudo zypper refresh && sudo zypper update install sudo zypper install remove sudo zypper remove Alpine Linux apk update sudo apk update && sudo apk upgrade install sudo apk add remove sudo apk del More detail: ?q=apt ?q=dnf ?q=pacman ?q=zypper ?q=apk