Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure ZSH terminal for CentOS7.x

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "CentOS7.x how to install and configure ZSH terminal", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "CentOS7.x how to install and configure ZSH terminal" bar!

First, install basic components

First execute the yum command to install the required zsh original program and git program to pull the code.

Yum install-y zsh git

Install the oh my zsh script (this step requires the installation of git).

Wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh-o-| sh

Use which zsh to view the installation directory of zsh, which is usually stored in the / usr/bin/zsh directory.

Which zsh

Use the chsh command to switch the shell program you are using.

Chsh-s / usr/bin/zsh

Second, make optional configuration

2.1 install zsh icon fonts

Execute the following command to pull the icon in the current directory of the repository, and change to its directory, execute the. / install.sh script to install successfully.

Git clone https://github.com/powerline/fonts.git

2.2 change the zsh theme

Edit the / root/.zshrc file using the vi tool, change the zsh_theme= "robbyussell" field to the zsh_theme= "agnoster" field, and update their configuration files with the source ~ / .zshrc command.

2.3 install the plug-in

The main reason to replace the original shell with zsh is to use its powerful plug-ins. Only three plug-ins are recommended, which are wd, zsh-syntax-highlighting, and zsh-autosuggestions.

First, execute the following command in turn to clone the repository of the next two plug-ins to the plug-in directory of oh my zsh.

Cd / .oh-my-zsh/custom/pluginsgit clone https://github.com/zsh-users/zsh-syntax-highlighting.gitgit clone https://github.com/zsh-users/zsh-autosuggestions.git

After the clone operation is completed, the full path of the two plug-ins is:

/ root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-syntax-highlighting.zsh/root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

Continue to edit the ~ / .zshrc file using vi.

# other content plugins= (git wd zsh-syntax-highlighting zsh-autosuggestions) source / root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-syntax-highlighting.zshsource / root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zshsource $zsh/oh-my-zsh.sh# other content

After editing, execute the source ~ / .zshrc command to update the zsh configuration, and the final effect is shown in the following figure.

Thank you for reading, the above is the content of "how to install and configure ZSH terminal in CentOS7.x". After the study of this article, I believe you have a deeper understanding of how to install and configure ZSH terminal in CentOS7.x, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report