Created
December 3, 2025 16:07
-
-
Save MCarlquist/f70abc6281f7ab9ea70128f31e83e043 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| echo "=== Updating system ===" | |
| sudo apt update -y && sudo apt upgrade -y | |
| echo "=== Installing prerequisites ===" | |
| sudo apt install -y curl wget git gpg software-properties-common apt-transport-https unzip lsb-release | |
| # ------------------------------------------------------------- | |
| # Core utilities | |
| # ------------------------------------------------------------- | |
| echo "=== Installing core utilities ===" | |
| sudo apt install -y build-essential ripgrep fd-find jq tree | |
| # fd β fd-find symlink | |
| if ! command -v fd >/dev/null; then | |
| sudo ln -sf /usr/bin/fdfind /usr/local/bin/fd | |
| fi | |
| # ------------------------------------------------------------- | |
| # VS Code | |
| # ------------------------------------------------------------- | |
| echo "=== Installing Visual Studio Code ===" | |
| if ! command -v code >/dev/null; then | |
| wget -qO- https://packages.microsoft.com/keys/microsoft.asc \ | |
| | gpg --dearmor \ | |
| | sudo tee /usr/share/keyrings/microsoft.gpg > /dev/null | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/microsoft.gpg] \ | |
| https://packages.microsoft.com/repos/code stable main" \ | |
| | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null | |
| sudo apt update -y | |
| sudo apt install -y code | |
| fi | |
| # ------------------------------------------------------------- | |
| # Google Chrome | |
| # ------------------------------------------------------------- | |
| echo "=== Installing Google Chrome ===" | |
| if ! command -v google-chrome >/dev/null; then | |
| wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O chrome.deb | |
| sudo apt install -y ./chrome.deb | |
| rm chrome.deb | |
| fi | |
| # ------------------------------------------------------------- | |
| # GitHub CLI (gh) | |
| # ------------------------------------------------------------- | |
| echo "=== Installing GitHub CLI (gh) ===" | |
| if ! command -v gh >/dev/null; then | |
| curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ | |
| | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg | |
| sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] \ | |
| https://cli.github.com/packages stable main" \ | |
| | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null | |
| sudo apt update -y | |
| sudo apt install -y gh | |
| fi | |
| # ------------------------------------------------------------- | |
| # Node.js + npm + pnpm | |
| # ------------------------------------------------------------- | |
| echo "=== Installing Node.js LTS ===" | |
| curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - | |
| sudo apt install -y nodejs | |
| echo "=== Installing pnpm ===" | |
| sudo npm install -g pnpm | |
| # ------------------------------------------------------------- | |
| # Python | |
| # ------------------------------------------------------------- | |
| echo "=== Installing Python tools ===" | |
| sudo apt install -y python3 python3-pip python3-venv | |
| # ------------------------------------------------------------- | |
| # Docker Engine + Compose | |
| # ------------------------------------------------------------- | |
| echo "=== Installing Docker ===" | |
| if ! command -v docker >/dev/null; then | |
| sudo apt remove -y docker docker-engine docker.io containerd runc || true | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg \ | |
| | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg | |
| echo \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] \ | |
| https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) stable" \ | |
| | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| docker-ce docker-ce-cli containerd.io \ | |
| docker-buildx-plugin docker-compose-plugin | |
| sudo usermod -aG docker $USER | |
| fi | |
| # ------------------------------------------------------------- | |
| # JetBrainsMono Nerd Font | |
| # ------------------------------------------------------------- | |
| echo "=== Installing JetBrainsMono Nerd Font ===" | |
| FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip" | |
| FONT_DIR="/usr/local/share/fonts/JetBrainsMonoNerd" | |
| sudo mkdir -p "$FONT_DIR" | |
| wget -q "$FONT_URL" -O /tmp/JetBrainsMono.zip | |
| sudo unzip -o /tmp/JetBrainsMono.zip -d "$FONT_DIR" | |
| rm /tmp/JetBrainsMono.zip | |
| sudo fc-cache -f | |
| # ------------------------------------------------------------- | |
| # Oh My Zsh | |
| # ------------------------------------------------------------- | |
| echo "=== Installing Zsh & Oh My Zsh ===" | |
| sudo apt install -y zsh | |
| if [ ! -d "$HOME/.oh-my-zsh" ]; then | |
| RUNZSH=no CHSH=yes KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
| fi | |
| # ------------------------------------------------------------- | |
| # Oh My Zsh Plugins | |
| # ------------------------------------------------------------- | |
| echo "=== Installing Oh My Zsh plugins ===" | |
| ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}" | |
| # zsh-autosuggestions | |
| if [ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]; then | |
| git clone https://github.com/zsh-users/zsh-autosuggestions \ | |
| "$ZSH_CUSTOM/plugins/zsh-autosuggestions" | |
| fi | |
| # zsh-syntax-highlighting | |
| if [ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ]; then | |
| git clone https://github.com/zsh-users/zsh-syntax-highlighting \ | |
| "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" | |
| fi | |
| # ------------------------------------------------------------- | |
| # Add plugins to ~/.zshrc if missing | |
| # ------------------------------------------------------------- | |
| echo "=== Updating ~/.zshrc plugins ===" | |
| sed -i 's/^plugins=.*/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/' ~/.zshrc || true | |
| sed -i 's/ZSH_THEME=.*/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc || true | |
| # ------------------------------------------------------------- | |
| # Cleanup | |
| # ------------------------------------------------------------- | |
| echo "=== Cleaning up ===" | |
| sudo apt autoremove -y | |
| echo "" | |
| echo "=============================================================" | |
| echo "All done! π" | |
| echo "π Log out and back in to activate Docker group + Zsh shell." | |
| echo "=============================================================" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment