APT (Advanced Package Tool) for Debian and Ubuntu-based systems. Basic Commands 1# Update package list 2sudo apt update 3 4# Upgrade all packages 5sudo apt upgrade 6 7# Full upgrade (may remove packages) 8sudo apt full-upgrade 9sudo apt dist-upgrade # Older command 10 11# Install package 12sudo apt install package-name …
Read MoreCommand Dispatcher Pattern Create a script that dispatches commands via switch/case: 1#!/bin/bash 2 3# Command dispatcher script 4command_dispatcher() { 5 local cmd="$1" 6 shift # Remove first argument, rest are parameters 7 8 case "$cmd" in 9 start) 10 echo "Starting service..." 11 # Your start …
Read Moredpkg - Low-level package manager for Debian-based systems. Basic Commands 1# Install package 2sudo dpkg -i package.deb 3 4# Remove package (keep config) 5sudo dpkg -r package-name 6 7# Purge package (remove config) 8sudo dpkg -P package-name 9 10# List installed packages 11dpkg -l 12 13# List specific package 14dpkg -l …
Read Moreemerge (Portage) - Source-based package manager for Gentoo Linux. Basic Commands 1# Sync package tree 2emerge --sync 3# Or 4emaint sync -a 5 6# Update system 7emerge --update --deep --newuse @world 8 9# Install package 10emerge package-name 11 12# Install with dependencies 13emerge --ask package-name 14 15# Remove …
Read Morepacman - Package manager for Arch Linux and derivatives (Manjaro, EndeavourOS). Basic Commands 1# Update package database 2sudo pacman -Sy 3 4# Upgrade all packages 5sudo pacman -Syu 6 7# Full system upgrade 8sudo pacman -Syyu 9 10# Install package 11sudo pacman -S package-name 12 13# Install multiple packages 14sudo …
Read Moreyum (Yellowdog Updater Modified) and dnf (Dandified Yum) for RHEL, Fedora, CentOS. dnf vs yum 1# dnf is the modern replacement for yum 2# Commands are mostly compatible 3 4# Fedora 22+: dnf 5# RHEL 8+: dnf 6# CentOS 8+: dnf 7# Older systems: yum 8 9# This guide uses dnf, but most commands work with yum Basic Commands …
Read MoreZsh-Specific Features Globbing 1# Recursive globbing 2ls **/.txt 3 4# Exclude pattern 5ls ^.txt 6 7# Numeric ranges 8ls file<1-10>.txt 9 10# Qualifiers 11ls *(.) # Files only 12ls *(/) # Directories only 13ls *(.x) # Executable files 14ls *(m-7) # Modified in last 7 days 15ls *(Lm+100) # Larger than 100MB …
Read More