Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Terminal Setup

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.

Shell Platform License

Overview

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.

What Gets Installed

#ToolPurposeUbuntumacOS
1ZshDefault shell with powerful scripting and completionaptbuilt-in
2HomebrewPackage managerbrew
3StarshipFast, cross-shell prompt with git integrationcurlbrew
4ezaModern ls — icons, git-aware, tree viewaptbrew
5batModern cat — syntax highlighting, line numbersaptbrew
6fzfFuzzy finder for history (Ctrl+R) and files (Ctrl+T)aptbrew
7zsh-autosuggestions / zsh-syntax-highlightingGhost-text suggestions and live syntax coloringaptbrew
8deltaBeautiful side-by-side git diffsbrew
9broot + treeInteractive and classic directory viewersbinarybrew
JetBrainsMono Nerd FontPatched font for terminal icon supportcurlbrew cask

What Gets Configured

  • ~/.config/zsh/setup.zsh — History, tab completion, Emacs-style key bindings, and aliases for git, eza, bat, and tree. Includes helper functions: mkcd, extract, and f (quick file search). Sourced from ~/.zshrc via 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 init block automatically if ~/anaconda3, ~/miniconda3, ~/miniforge3, or ~/mambaforge is detected.
  • ROS 2 Jazzy (Ubuntu only) — Sources the workspace setup if /opt/ros/jazzy/setup.zsh exists.

Quick Start

Ubuntu

git clone https://github.com/MichaelFYang/terminal-setup.git cd terminal-setup chmod +x setup_ubuntu.sh ./setup_ubuntu.sh

macOS

git clone https://github.com/MichaelFYang/terminal-setup.git cd terminal-setup chmod +x setup_macos.sh ./setup_macos.sh

After Installation

  1. Ubuntu: Log out and back in (or run zsh) to activate the new default shell.
  2. Set your terminal font to JetBrainsMono Nerd Font for icon rendering.
    • VSCode: Terminal > Integrated: Font Family
    • Terminal.app (macOS): Preferences > Profiles > Text > Font
  3. Run source ~/.zshrc to load the new configuration.

Aliases Reference

File Navigation

AliasCommand
lseza --icons
lleza -lh --icons --git
laeza -lah --icons --git
lteza --tree --icons --level=2
catbat --paging=never
t2 / t3tree -L 2 / tree -L 3

Git

AliasCommand
gsgit status
gagit add
gcgit commit
gpgit push
glgit log --oneline --graph --decorate --color
gdgit diff
gcogit checkout

Utility Functions

FunctionDescription
mkcd <dir>Create a directory and cd into it
f <pattern>Quick case-insensitive file search
extract <file>Extract any common archive format

Requirements

PlatformRequirements
Ubuntu24.04 on x86_64 or aarch64 (should work on other Debian-based distros), sudo access
macOSApple Silicon (M1+), admin access for Homebrew

Customization

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.

Acknowledgments

Built with the assistance of Claude by Anthropic.

License

This project is licensed under the MIT License.

关于 About

One-script terminal setup for Ubuntu and macOS — Zsh, Starship, eza, bat, fzf, delta, broot, and Nerd Fonts

语言 Languages

Shell100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
6
Total Commits
峰值: 5次/周
Less
More

核心贡献者 Contributors