Here’s how I set up ZSH on Fedora Linux.
Install the basic packages
dnf install zsh zsh-autosuggestions zsh-syntax-highlighting util-linux-user
Install Oh My ZSH
- Follow the instruction on the Oh My ZSH website:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install the Powerlevel10k theme
Install the MesloLGS
font family first to get the best results.
- Install the fonts:
- Clone the repository:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
- Set
ZSH_THEME="powerlevel10k/powerlevel10k"
in~/.zshrc
- Configure the Terminal to load the
MesloLGS
font:
-
Open a new Terminal windom to start the wizard, choose your style by following the steps. If you cannot see the icons, redo the
MesloLGS
font family step. -
The setup is complete!
ZSH Plugins
Oh My ZSH
and Powerlevel10k
provides a lot of useful plugins. I just need few of them, this is how my .zshrc
plugins block looks like:
plugins=(
dnf
genpass
git
python
)
Enable Autosuggestions and Syntax Highlighting
Enable zsh-autosuggestions and zsh-syntax-highlighting.
The productivity is increased by these two add-ons. Fedora provides the packages, which have been installed in the initial step of this tutorial. The installation instructions can be found on the projects’ website if you don’t use Fedora.
For Fedora, you just need to add the two lines below into .zshrc
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Alias and Source
I use some aliases to make my daily tasks easier.
alias zshconfig="nvim ~/.zshrc"
alias pydevel="source ~/.virtualenvs/pydevel/bin/activate"
Wrap up
ZSH is a powerful tool that can be used to increase productivity and have fun while using Linux. This is my personal setup, which I use daily. I created this tutorial in order to share my setup and use it as a reference in the future.