One-script terminal environment setup for Ubuntu 24.04 and macOS (Apple Silicon). Installs modern CLI tools, writes a curated zsh config, and configures a Starship prompt — all in one run.
Starting from a fresh install, these scripts transform the default terminal into a productive, modern development environment. Both are idempotent — safe to run multiple times without duplicating work.
| # | Tool | Purpose | Ubuntu | macOS |
|---|---|---|---|---|
| 1 | Zsh | Default shell with powerful scripting and completion | apt | built-in |
| 2 | Homebrew | Package manager | — | brew |
| 3 | Starship | Fast, cross-shell prompt with git integration | curl | brew |
| 4 | eza | Modern ls — icons, git-aware, tree view |
apt | brew |
| 5 | bat | Modern cat — syntax highlighting, line numbers |
apt | brew |
| 6 | fzf | Fuzzy finder for history (Ctrl+R) and files (Ctrl+T) |
apt | brew |
| 7 | zsh-autosuggestions / zsh-syntax-highlighting | Ghost-text suggestions and live syntax coloring | apt | brew |
| 8 | delta | Beautiful side-by-side git diffs | — | brew |
| 9 | broot + tree | Interactive and classic directory viewers | binary | brew |
| — | JetBrainsMono Nerd Font | Patched font for terminal icon support | curl | brew cask |
~/.config/zsh/setup.zsh— History, tab completion, Emacs-style key bindings, and aliases for git, eza, bat, and tree. Includes helper functions:mkcd,extract, andf(quick file search). Sourced from~/.zshrcvia a single line — survives rewrites by conda, nvm, and similar tools.~/.config/starship.toml— Two-line prompt displaying directory, git branch/status, conda environment, language versions (Python, Node, Rust), command duration, and clock.- Conda — Appends
conda initblock automatically if~/anaconda3,~/miniconda3,~/miniforge3, or~/mambaforgeis detected. - ROS 2 Jazzy (Ubuntu only) — Sources the workspace setup if
/opt/ros/jazzy/setup.zshexists.
git clone https://github.com/MichaelFYang/terminal-setup.git
cd terminal-setup
chmod +x setup_ubuntu.sh
./setup_ubuntu.shgit clone https://github.com/MichaelFYang/terminal-setup.git
cd terminal-setup
chmod +x setup_macos.sh
./setup_macos.sh- Ubuntu: Log out and back in (or run
zsh) to activate the new default shell. - Set your terminal font to JetBrainsMono Nerd Font for icon rendering.
- VSCode: Terminal > Integrated: Font Family
- Terminal.app (macOS): Preferences > Profiles > Text > Font
- Run
source ~/.zshrcto load the new configuration.
| Alias | Command |
|---|---|
ls |
eza --icons |
ll |
eza -lh --icons --git |
la |
eza -lah --icons --git |
lt |
eza --tree --icons --level=2 |
cat |
bat --paging=never |
t2 / t3 |
tree -L 2 / tree -L 3 |
| Alias | Command |
|---|---|
gs |
git status |
ga |
git add |
gc |
git commit |
gp |
git push |
gl |
git log --oneline --graph --decorate --color |
gd |
git diff |
gco |
git checkout |
| Function | Description |
|---|---|
mkcd <dir> |
Create a directory and cd into it |
f <pattern> |
Quick case-insensitive file search |
extract <file> |
Extract any common archive format |
| Platform | Requirements |
|---|---|
| Ubuntu | 24.04 on x86_64 or aarch64 (should work on other Debian-based distros), sudo access |
| macOS | Apple Silicon (M1+), admin access for Homebrew |
Both scripts write shell configuration to ~/.config/zsh/setup.zsh and add a single source line to ~/.zshrc. This design survives tools like conda and nvm that rewrite ~/.zshrc. To customize after installation, edit ~/.config/zsh/setup.zsh. The Starship prompt config lives at ~/.config/starship.toml.
Built with the assistance of Claude by Anthropic.
This project is licensed under the MIT License.