← Back to list

The Ultimate Guide to Setting Up Oh My Zsh in Ubuntu and macOS

Introduction

Keshav Carpenter · 2025-08-21 10:27 · 0 claps · 2.0 min read
#zsh #oh-my-zsh #zshrc #shell #mac
Open on Medium ↗
Wiki topics: 🔓 · Open Source

The Ultimate Guide to Setting Up Oh My Zsh in Ubuntu and macOS

Introduction

Oh My Zsh is a powerful framework for managing your Zsh (Z shell) configuration. This guide will walk you through installing and customizing Oh My Zsh on both Ubuntu and macOS, including essential plugins, themes, and productivity-enhancing aliases.

Prerequisites

  • Ubuntu 20.04+ or macOS 10.15+
  • Terminal access
  • Basic command line knowledge

Installing Zsh and Oh My Zsh

For Ubuntu:

# Install Zsh  
sudo apt update  
sudo apt install zsh -y
# Make Zsh your default shell  
chsh -s $(which zsh)
# Install Oh My Zsh  
sh -c “$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

For macOS:

# Install Homebrew if not already installed  
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Zsh  
brew install zsh
# Install Oh My Zsh  
sh -c “$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Essential Oh My Zsh Plugins

1. Syntax Highlighting

This plugin provides real-time syntax highlighting for your commands:

# Clone the plugin repository  
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Add to plugins in ~/.zshrc  
plugins=(… zsh-syntax-highlighting)

2. Auto-suggestions

Get Fish-like autosuggestions:

# Clone the plugin repository  
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Add to plugins in ~/.zshrc  
plugins=(… zsh-autosuggestions)

3. Git Plugin (Pre-installed)

Enable the git plugin by adding it to your plugins list:

plugins=(… git)

Customizing Your Theme

Oh My Zsh comes with numerous built-in themes. Here’s how to change them:

  1. Open your configuration file:
nano ~/.zshrc
  1. Find the ZSH_THEME line and modify it:
# Popular themes include:  
ZSH_THEME=”robbyrussell” # Default theme  
ZSH_THEME=”agnoster” # Popular alternative  
ZSH_THEME=”powerlevel10k/powerlevel10k” # Advanced theme

Installing Powerlevel10k Theme

For a more powerful theme experience:

# Clone the repository  
git clone — depth=1 ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Set the theme in ~/.zshrc  
ZSH_THEME=”powerlevel10k/powerlevel10k”
# Reload configuration  
source ~/.zshrc

Setting Up Useful Aliases

Add these aliases to your ~/.zshrc:

# Navigation  
alias ..=”cd ..”  
alias …=”cd ../..”  
alias ll=”ls -la”
# Git shortcuts  
alias gs=”git status”  
alias gc=”git commit”  
alias gp=”git push”  
alias gl=”git pull”
# System  
alias update=”sudo apt update && sudo apt upgrade” # Ubuntu  
alias update=”brew update && brew upgrade” # macOS
# Custom project directories  
alias projects=”cd ~/Documents/Projects”

Productivity Tips

  1. Directory Jumping Enable the z plugin to quickly jump to frequently visited directories:
plugins=(… z)
  1. Command History Use Ctrl+R to search through command history interactively.
  2. Tab Completion Double-tap Tab to see all possible completions for a command.

Troubleshooting Common Issues

Font Issues

If you see broken characters:

  1. Install a Nerd Font
  2. Configure your terminal to use it

Performance Issues

If your shell feels slow:

  1. Remove unused plugins
  2. Update Oh My Zsh regularly:
omz update

Conclusion

Oh My Zsh dramatically improves your terminal experience with its rich features and customization options. Start with the basics and gradually add more features as you become comfortable with the setup.

Additional Resources

  • Official Oh My Zsh Documentation
  • Powerlevel10k Documentation
  • Zsh User Guide

Remember to reload your configuration (source ~/.zshrc) after making any changes to your setup.

Keywords: Oh My Zsh, Zsh, terminal customization, Ubuntu, macOS, shell configuration, command line productivity, Powerlevel10k, terminal themes, Zsh plugins


메타데이터
post_id
afabef7a4fcd
slug
the-ultimate-guide-to-setting-up-oh-my-zsh-in-ubuntu-and-macos-afabef7a4fcd
url
https://medium.com/@keshaav/the-ultimate-guide-to-setting-up-oh-my-zsh-in-ubuntu-and-macos-afabef7a4fcd
canonical_url
https://medium.com/@keshaav/the-ultimate-guide-to-setting-up-oh-my-zsh-in-ubuntu-and-macos-afabef7a4fcd
author_url
https://medium.com/@keshaav
status
ok
fetched_at
2026-07-18 01:45:18