Linux - Aliases#
Quick Setup (Apply Aliases to Any Linux Machine):
- Open your bash configuration file:
nano ~/.bashrc- Append the following alias block to the bottom of the file:
# --- Homelab Linux Aliases --- # System Listings alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' # Docker & Docker Compose alias up='docker compose up' alias down='docker compose down' alias clean='docker system prune --all --volumes' # 1Password CLI Compose Integration alias 1p='op whoami >/dev/null 2>&1 || eval $(op signin); op run --env-file=".env" -- docker compose up' # Hugo Site Publishing (NAS-Mounted Scripts) alias push='bash /mnt/Software/Software/Scripts/Linux/publish-hugo-homelab.sh && tail -f /home/marc/hugo/homelab/logs/publish-hugo-homelab.log' alias pushgen='bash /mnt/Software/Software/Scripts/Linux/publish-hugo-gendash.sh && tail -f /home/marc/hugo/gendash/logs/publish-hugo-gendash.log' # ------------------------------ Save, exit, and reload the configuration:
source ~/.bashrc
1. Core Alias Reference#
These aliases are designed to standardise navigation, Docker compose stacks, and Hugo website publishing across Linux servers.
📋 Alias Descriptions & Prerequisites:#
ll/la/l: Standardised listing commands for quick directory navigation.up/down: Shortcuts to run standard Docker Compose builds and stacks.clean: Executesdocker system prune --all --volumesto perform a complete cleanup of unused Docker caches and volumes.1p(Prerequisite: 1Password CLI installed & configured):- Automatically authenticates you to the 1Password CLI (
op), then boots your Docker Compose stack while securely injecting environment keys defined in 1Password.
- Automatically authenticates you to the 1Password CLI (
push/pushgen(Prerequisite: NAS mount/mnt/Softwareconfigured):- Executes the Hugo publishing scripts mirrored from the Mac Studio and automatically displays the live build logs.
2. Related Notes#
- Scripts Master Catalog: Scripts Mangement
- MacOS Workstation Restore: Mac OS - Recovery
- MacOS Aliases: Mac OS - Aliases Management