This article is older than 2 years. Some information might be outdated.
Series: oh-my-zsh
Part 1/4Hello! 😊
This article is the first part of the Oh My Zsh series. In this series, we will learn how to install and configure the Zsh shell and Oh My Zsh framework.
What is Oh My Zsh?#
Oh My Zsh is an open-source framework developed for the Zsh shell. It enhances your terminal experience by using Zsh's powerful features.
Features:#
- 🎨 Themes: 200+ ready-made themes
- 🔌 Plugins: 500+ plugins
- ⚡ Fast: Auto-completion and suggestions
- 🛠️ Customizable: Easy configuration
Installation#
1. Installing Zsh#
First, make sure Zsh is installed on your system:
# Ubuntu/Debian
sudo apt install zsh
# Arch Linux
sudo pacman -S zsh
# Fedora
sudo dnf install zsh
2. Installing Oh My Zsh#
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
3. Setting as Default Shell#
chsh -s $(which zsh)
Basic Settings#
.zshrc File#
After Oh My Zsh installation is complete, the ~/.zshrc file is created. This file is the configuration file for Zsh.
# To edit the file
nano ~/.zshrc
Basic Configuration#
# Theme setting
ZSH_THEME="robbyrussell"
# Plugins
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
# Automatically check for Oh My Zsh updates
DISABLE_AUTO_UPDATE="false"
Popular Themes#
1. Robbyrussell (Default)#
ZSH_THEME="robbyrussell"
2. Powerlevel10k#
ZSH_THEME="powerlevel10k/powerlevel10k"
3. Agnoster#
ZSH_THEME="agnoster"
Useful Plugins#
1. Git Plugin#
plugins=(git)
- Git status display
- Git aliases
- Branch information
2. Zsh Autosuggestions#
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
3. Zsh Syntax Highlighting#
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Next Steps#
After this installation is complete:
- You can read the article Using Shopt in Zsh
- You can add your custom aliases
- You can customize themes and plugins
Troubleshooting#
Common Issues:#
- Theme not visible: Check if your terminal supports Unicode
- Plugins not working: Reload the
.zshrcfile:source ~/.zshrc - Colors not visible: Make sure your terminal supports 256 colors
Resources#
This article is the first part of the Oh My Zsh series. You can follow other articles for the continuation of the series.
Comments