Linux - Aliases

Linux - Aliases#

Ubuntu Workstation Configuration#

The Ubuntu workstation keeps Linux aliases in the tracked Scripts repository rather than duplicating them directly in .bashrc:

/home/marc/Scripts/Linux/Aliases/Linux-Aliases.bash

The local /home/marc/.bashrc sources this file. After pulling alias changes, reload the shell with:

source ~/.bashrc

The active workstation aliases are:

Alias or function Purpose
pulllab Safely force-aligns /home/marc/Obsidian/Homelab with origin/main.
pushlab Converts and publishes the Homelab vault to the remote Hugo VM, then backs up the vault to GitHub. Use pushlab --sync-only to skip remote publishing and vault backup.
gitstatus Reports Git repository status under /home/marc.
speed Runs the Linux disk benchmark against $HOME, or another directory selected with SPEED_TARGET_DIR.
pushscripts Commits and pushes Linux script and alias changes to GitHub.
pullscripts Pulls the latest Scripts repository changes from GitHub.

The MacOS aliases and scripts are not sourced or modified by this configuration.

Mac OS - Aliases Management

Mac OS - Aliases Management#

Keep Mac Studio and MacBook Air in Sync

The Mac Studio is the source of truth for the shared aliases. Edit and publish changes there, then pull them onto the MacBook Air.

On the Mac Studio — edit and publish:

nano ~/Scripts/MacOS/Aliases/MacOS-Aliases.zsh
source ~/.zshrc
pushscripts

pushscripts commits and pushes pending changes in the ~/Scripts repository.

On the MacBook Air — download and apply:

pullscripts
source ~/.zshrc

If an open terminal still shows old aliases, open a new terminal window. The shared aliases are in ~/Scripts/MacOS/Aliases/MacOS-Aliases.zsh; ~/.zshrc is local to each Mac and must source that file.

Mac OS - Brewfile

Mac OS - Brewfile#

Daily Sync Shortcuts (Keep Computers Mirrored):

  • Run pushbrew on the machine where you just installed/removed software to scan your system, update the Brewfile, and push it to GitHub.
  • Run pullbrew on your other workstations to pull the update and automatically install/clean up your packages to match.

Quick Restore & Sync (Workstation Rebuild):

  • To Restore (New Computer):
    1. Install Homebrew (if missing): /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    2. Clone scripts: git clone git@github.com:marcoue/Scripts.git ~/Scripts
    3. Reinstall all software: brew bundle --file=~/Scripts/MacOS/Brew/Brewfile
  • To Sync Updates (Ongoing):
    • Pull latest and clean up local packages: pullbrew

Related Recovery Guides: Master Checklist: Mac OS - Recovery | Shortcut Configuration: Mac OS - Aliases Management | Repository Standard: Scripts Mangement.

Mac OS - Recovery

Mac OS - Recovery#


Intel iMac profile: The 2014 iMac is a managed macOS workstation for Scripts, Obsidian, and MCP administration. Its Homebrew prefix is /usr/local, and Intel Homebrew may compile large packages from source. Use the standalone uv installer plus uv-managed Python 3.12 for MCP Python environments when Homebrew builds are impractical. Xcode is optional for this workstation; the shared xcode-tools definition may remain configured but can stay offline.

MacOS System Administration & Optimization

macOS System Administration & Optimization#

Workstation Recovery & Rebuild Standard: If you need to rebuild your Mac Studio or synchronize its software and aliases with another Mac, refer to the master checklist at Mac OS - Recovery.


1 Modify Known Hosts for SSH#

# Add description
nano ~/.ssh/known_hosts
# To remove a specific host
ssh-keygen -R 10.1.1.14
# Clear the full file
cat /dev/null > ~/.ssh/known_hosts

2 Disk Management & Diagnostics#

2.1 Identify and Verify Disks#

# List all physical and virtual disks
diskutil list
# Verify a specific disk (replace X with disk number)
diskutil verifyDisk /dev/diskX

2.2 SMART Monitoring (via Homebrew)#

# Install smartmontools
brew install smartmontools
# Check health of the primary NVMe drive
smartctl -a /dev/disk0

3 Homebrew Package Manager#

Official site: brew.sh