Seamlessly synchronize your terminal experience across macOS and Linux. Includes Zsh shell, Gruvbox Dark theme, Nerd Fonts, Powerlevel10k, plugins, and more.
This setup script customizes your terminal environment consistently across macOS and Linux by:
- Installing Zsh as the default shell with automatic package manager detection
- Installing Gruvbox Dark theme for macOS Terminal.app (with user confirmation)
- Installing and configuring Oh My Zsh framework
- Installing Hack Nerd Font with OS-specific installation paths
- Installing Powerlevel10k theme with configuration wizard option
- Installing essential Zsh plugins:
zsh-syntax-highlighting- Syntax highlighting for commandszsh-autosuggestions- Fish-like autosuggestions
- Setting up Ruby environment with rbenv and latest stable Ruby
- Installing colorls gem with convenient aliases (
ls,ll,la) - Creating automatic backups of all modified configuration files
- Comprehensive logging of all installation steps
# Download and run the script
curl -fsSL https://raw.githubusercontent.com/akhil41/zsh-shell-customizer/main/terminal-setup.sh | bash
# Or clone and run locally
git clone https://github.com/akhil41/zsh-shell-customizer.git
cd zsh-shell-customizer
chmod +x terminal-setup.sh
./terminal-setup.sh- Homebrew - Install from brew.sh
- Xcode Command Line Tools -
xcode-select --install
- One of the supported package managers:
apt(Ubuntu/Debian)yum(CentOS/RHEL)dnf(Fedora)pacman(Arch Linux)
curlandgitinstalled
- User confirmation for each installation step
- Progress indicators and detailed status messages
- Graceful cancellation - stop at any point without breaking your system
- Idempotent design - safe to run multiple times
- Automatic backups of all modified files in
~/.terminal-setup-backups/ - Comprehensive logging in
~/terminal-setup.log - Non-destructive - preserves existing configurations when possible
- macOS with Homebrew
- Linux with multiple package manager support
- Consistent experience across different operating systems
| Component | Description | Location |
|---|---|---|
| Zsh | Modern shell with advanced features | System package |
| Oh My Zsh | Zsh framework and configuration | ~/.oh-my-zsh/ |
| Powerlevel10k | Fast and customizable prompt theme | ~/.oh-my-zsh/custom/themes/ |
| Zsh Plugins | Syntax highlighting and autosuggestions | ~/.oh-my-zsh/custom/plugins/ |
| Hack Nerd Font | Programming font with icons | ~/Library/Fonts/ (macOS) or ~/.local/share/fonts/ (Linux) |
| Ruby + rbenv | Ruby version manager and latest Ruby | ~/.rbenv/ (Linux) or via Homebrew (macOS) |
| colorls | Colorful ls replacement |
Ruby gem |
| Gruvbox Theme | Dark color scheme for Terminal.app | Downloads folder (macOS only) |
After running the script, verify your installation:
-
Check the shell
echo $SHELL # Should show path ending with 'zsh'
-
Verify Oh My Zsh
ls ~/.oh-my-zsh # Should show Oh My Zsh directory structure
-
Test plugins
ls ~/.oh-my-zsh/custom/plugins # Should show 'zsh-syntax-highlighting' and 'zsh-autosuggestions'
-
Test colorls
ls # Should display colorful directory listing -
Check Powerlevel10k
echo $ZSH_THEME # Should show 'powerlevel10k/powerlevel10k'
-
Verify font installation
- macOS: Check Font Book for "Hack Nerd Font"
- Linux: Run
fc-list | grep -i hack
After installation, configure your prompt:
p10k configure- Open Terminal.app preferences
- Go to Profiles tab
- Import the downloaded
Gruvbox-Dark.terminalfile - Set as default profile
The script adds these aliases to your ~/.zshrc:
alias ls='colorls' # Colorful ls
alias ll='colorls -l' # Long format
alias la='colorls -la' # Long format with hidden filesAll installation steps are logged to:
~/terminal-setup.log
Original configuration files are backed up to:
~/.terminal-setup-backups/YYYYMMDD_HHMMSS/
To restore a configuration file:
cp ~/.terminal-setup-backups/YYYYMMDD_HHMMSS/zshrc.backup ~/.zshrcScript fails with "Homebrew required"
- Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Ruby installation takes too long
- This is normal - Ruby compilation can take 10-30 minutes
Fonts not appearing
- macOS: Restart Terminal.app and check Font preferences
- Linux: Run
fc-cache -fvand restart terminal
Powerlevel10k not loading
- Restart terminal or run
source ~/.zshrc - Run
p10k configureto set up the theme
- Check the installation log:
cat ~/terminal-setup.log - Verify prerequisites are installed
- Try running the script again (it's safe to re-run)
- Open an issue on GitHub with your log file
To remove components installed by this script:
# Remove Oh My Zsh
uninstall_oh_my_zsh
# Remove rbenv (Linux)
rm -rf ~/.rbenv
# Restore original shell
chsh -s /bin/bash
# Remove colorls gem
gem uninstall colorls
# Restore from backup
cp ~/.terminal-setup-backups/YYYYMMDD_HHMMSS/zshrc.backup ~/.zshrcContributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Test your changes on both macOS and Linux
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Oh My Zsh - Zsh framework
- Powerlevel10k - Zsh theme
- Hack Nerd Font - Programming font
- colorls - Colorful ls replacement
- Gruvbox - Color scheme