zsh

How to use plugins for ZSH

How to use plugins for ZSH
I think we can all agree that the shell is the one thing we all have in common as Unix/Linux geeks. Whether you are a system admin, DevOps, Hardware, or Penetration testing, you will have to use the terminal to accomplish your tasks.

In today's tutorial, I want to show you how to install ZSH, make it the default shell and install the oh-my-zsh framework to customize and add more functionality to your shell using plugins.

Let us get started:

How to Install ZSH and Oh-My-ZSH Framework

ZSH is a popular shell usually available in the repositories of major Linux distributions. To install it, use your default package manager. For this example, I will use the apt package manager:

sudo apt-get update
sudo apt-get install zsh -y

Next, run ZSH for the initial setup and create a .zshrc config file.

To make ZSH your default shell, use the chsh command as:

chsh -s /usr/bin/zsh

Installing oh-my-zsh

Installing the oh-my-zsh framework is easy as executing a single line of command. If you want to know what the installer script does, you can download and review it, then execute it once you're comfortable. Otherwise, use either of the commands below to install it:

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

To use cURL, enter the command:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Once you have oh-my-zsh is installed and activated, you can start customizing it by editing the .zshrc file in your home directory.

How to Activate Plugins

By default, oh-my-zsh comes packaged with a collection of plugins that you can activate to suit your needs. Some of them are simple aliases, but others are complex. The following link has a list of all supported plugins.

https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins

Once you find a plugin you wish to use, activate it by adding it to the plugin() array in the .zshrc file. For example, to activate the python, Vscode, git, and wp-CLI plugins, add the entries as shown below:

plugins=(python, git, vscode, wp-cli)

Save the file and source the .zshrc file to load the changes or launch a new shell session.

source ~/.zshrc

Conclusion

ZSH and Oh-my-zsh have a dedicated community that is constantly releasing new plugins, themes, and functions to make working with the shell easier. Feel free to visit the community forums to explore ways to customize your shell to fit your needs.

Emulate Mouse clicks by hovering using Clickless Mouse in Windows 10
Using a mouse or keyboard in the wrong posture of excessive usage can result in a lot of health issues, including strain, carpal tunnel syndrome, and ...
Add Mouse gestures to Windows 10 using these free tools
In recent years computers and operating systems have greatly evolved. There was a time when users had to use commands to navigate through file manager...
Control & manage mouse movement between multiple monitors in Windows 10
Dual Display Mouse Manager lets you control & configure mouse movement between multiple monitors, by slowing down its movements near the border. Windo...