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.

Найкращі ігри для гри з відстеженням рук
Нещодавно Oculus Quest представив чудову ідею відстеження рук без контролерів. Завдяки постійно зростаючій кількості ігор та заходів, які виконують пі...
Як показати накладання екранного меню в повноекранному додатку та іграх для Linux
Гра у повноекранні ігри або використання додатків у повноекранному повноекранному режимі може відключити від відповідної системної інформації, видимої...
Топ 5 карт для захоплення ігор
Ми всі бачили і любили потокові ігри на YouTube. PewDiePie, Jakesepticye та Markiplier - лише деякі з найкращих геймерів, які заробили мільйони, заван...