Solve the Problem of invalid installing Zsh in Bash On Ubuntu On Window. Attachment installation instructions

Source: Internet
Author: User

Solve the Problem of invalid installing Zsh in Bash On Ubuntu On Window. Attachment installation instructions
Preface

Zsh is a great Shell. People who use Linux and Mac systems basically know the existence of zsh.

Problem

After Zsh is installed, zsh can be used, but after restart, It is restored to the default bash.
After installation, run the following command:chsh -s /bin/zshSwitch the default shell.
Then, the $ SHELL variable is output as follows:

root@XY ~ # echo $SHELL/bin/bash

The setting is invalid. I thought it was about to restart.
Restart Bash On Ubuntu On Window.
The result is still invalid.

Solution

I opened an issues on BashOnWindows GitHub. The following method may be the easiest.

Add zsh to the. bashrc configuration file

Open the. bashrc file:

root@XY ~ # vi ~/.bashrc

Add bash-c zsh to the end of the file.

Then restart the terminal.

Attachment: Installation

Zsh is now popular with the use of oh-my-zsh for configuration, so you need to install oh-my-zsh.

Install zsh
Installing ZSH

root@XY ~ # sudo apt-get install zsh

Install oh-my-zsh
You can install oh-my-zsh in the following two ways.
Via curl

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

Via wget

root@XY ~ # sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

For more information, see oh-my-zsh # basic-installation

If you have a better method, I hope you can share it with me.

Zsh installation and Configuration Guide

Nine reasons for using Zsh

Zsh usage tips

Install the ultimate Shell Zsh in Linux

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.