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 use Zsh of Shell

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of how to use Shell's Zsh, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this article on how to use Zsh in Shell. Let's take a look at it.

Zsh is a powerful Shell software, which can be used not only as an interactive terminal, but also as a script language interpreter. While it is compatible with POSIX's sh (not compatible by default, only when using emulate sh), it also improves features such as Tab completion and wildcards. 、

ZSH has been included in the official package repository of Ubuntu 18.04 LTS. Sudo apt install zsh.

After ZSH Shell is installed, you can view its version using the following command:

Zsh-version

Replace bash and set it as the default shellsudo usermod-s / bin/zsh username

Also OK

Chsh-s `which zsh`

Terminal input bash will return to the bash terminal, enter zsh will go to the zsh terminal.

Install Powerline and Powerline font sudo apt install powerline fonts-powerline for ZSH

Install ZSH Powerlevel9k beautification theme

Powerlevel9k is a cool theme for ZSH beautification, and you can install the Powerlevel9k ZSH theme on the Ubuntu 18.04 LTS system by running the following command:

Sudo apt install zsh-theme-powerlevel9k

After installation, execute the following command to enable the Powerlevel9k ZSH theme:

Echo "source / usr/share/powerlevel9k/powerlevel9k.zsh-theme" > > ~ / .zshrc

Now open a new terminal window and you can see the new look of ZSH Shell:

Enable syntax highlighting sudo apt install zsh-syntax-highlighting on ZSH Shell

After installation, use the following command to enable the ZSH Syntax Highlighting plug-in:

Echo "source / usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" > > ~ / .zshrc

Now open a new terminal window and start entering commands, and you should see the commands highlighted and highlighted in different colors:

This is the end of the article on "how to use Shell's Zsh". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use Shell's Zsh". If you want to learn more, you are welcome to follow the industry information channel.

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

Development

Wechat

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

12
Report