author Magesh

Setting up ZSH in openSUSE 15.5

Magesh Ravi on April 4, 2024

In this article, we'll cover the commands/steps to install ZSH, OhMyZsh and two other plugins that will make your life easier (as a developer).

Note: this article focuses on commands for the openSUSE OS (Leap 15.5). If you are using a Debian/Ubuntu based distro, please checkout this article.

Before we begin, check if git is installed in your system. If not, install it before proceeding further.

Open your terminal (Konsole) and run the command,

sudo zypper in git-core

ZSH

# install zsh
sudo zypper in zsh

# check the installed version
zsh --version

# set zsh as default SHELL
chsh -s $(which zsh)

Please logout and login for the changes to take effect.

OhMyZsh

Copy-paste the below command into your terminal and follow the onscreen instructions,

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

ZSH Autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

ZSH syntax highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Activating the plugins

Edit the plugins section of the ~/.zshrc file as shown below,

plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
)

Save and exit. Restart all terminal sessions or reload the config file using the command,

source ~/.zshrc

Video