Hello, I’m Yue Chuang.

The first blog of this article is www.aiyc.top/1976.html

Welcome to our official account: AI Yuechuang.

You can’t afford a MacBook, you can use Windows 10 to configure the ZSH command line for development.

  1. Must be Windows10, open “Windows Subsystem for Linux” in programs and features

Microsoft +R to start running, enter: control press Enter:

  1. Search for Linux in the app store and choose your preferred Linux version. I’ll use Ubuntu as an example:

  1. Open after installation, take a while to configure. And then I’m going to set the username and password, so in this case I’m going to set the username to user

Then configure the username and password for Ubuntu:

  1. After the configuration, I found that the Command prompt terminal under Windows was really difficult to use, and there was no way to copy and paste the shortcut keys. In a Conemu

This works as quickly as iTerm2 on Linux or MAC: conemu.github. IO /

www.fosshub.com/ConEmu.html

After the installation is complete and Bash is initialized, you can go directly to the Ubuntu command line with Bash as the default:

Ok, let’s see what happens. When you click ConEmu to start, you will enter a default path, which is the external Windows user’s directory. Disk C is mounted under/MNT/C, and file sharing is implemented directly. If you don’t know what you’re doing yet, you can start by using the ZSH command line on Windows 10

  1. The default bash is still a bit weak, with oh my ZSH

Ohmyz. sh/#install

Mac installation ZSH

Most MAC users are likely to have Homebrew installed, so it is recommended to install ZSH directly using BREW as follows:

brew install zsh
Copy the code

During the installation, the terminal displays the following information:

==> Installing zsh
==> Downloading https://homebrew.bintray.com/bottles/zsh-5.7.1.mojave.bottle.tar
==> Downloading from https://akamai.bintray.com/79/793d87f67e64a5e01dfdea890af21
######################################################################## 100.0%
==> Pouring zsh-5.7.1.mojave.bottle.tar.gz
?  /usr/local/Cellar/zsh/5.7.1: 1.515 files, 13.3MB
Copy the code

Linux installation ZSH

ZSH installation in Linux is also very simple, just need a command to complete the installation, considering that there are many versions of Linux, different versions of the installation method is different, the common Ubuntu and centos as an example:

Ubuntu ZSH installation command:

apt install zsh
Copy the code

Centos install ZSH command:

yum install zsh
Copy the code

I use Ubuntu as an example. After executing the installation command, the following information is displayed:

Oh – my – ZSH installation

The purpose of installing oh-my-zsh is to make it easier for you to learn the command line operation of Git. It provides a great convenience for you to enter some Git commands.

Because oh-my-zsh is based on ZSH, its installation mode is related to the system itself, so the unified installation command is as follows:

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Copy the code

After the installation command is executed, the following information is displayed:

__ __ ____ / / _ ____ ____ ____ ____ _____ _____ / / __ / __ / __ \ / __ ` __ \ / / / / / _ / / ___ / __ / / / _ / / / / / / / / / / / / __ / / / / _ (__) / / / \ ____ _ / _ / _ / / __ / / _ \ __, / / ___ / _____ there comes / __ / / __ / / /... is now installed! Please look over the ~/.zshrc file to select plugins, themes, and options. p.s. Follow us on https://twitter.com/ohmyzsh p.p.s. Get stickers, shirts, and coffee mugsat https://shop.planetargon.com/collections/oh-my-zsh
➜  ~
Copy the code

The validation test

After the installation is successful, the terminal will notice a significant change. When you type part of a command and then press TAB, it will give you some corresponding prompts or auto-complete, such as when you type:

git st
Copy the code

Press TAB again, and the terminal will see the following effect:

➜  ~ git st
stash      -- stash away changes to dirty working directory
status     -- show working-tree status
stripspace -- filter out empty lines
Copy the code

In addition to autocomplete and command prompt, you can also correct errors, such as when you type a command:

git statsu
Copy the code

It will tell you that Git doesn’t have this command and prompt you for the correct one, as shown below:

➜  ~ git statsu
git: 'statsu' is not a git command. See 'git --help'.

The most similar command is
    status
Copy the code

AI Yue Chuang ·V: Jiabcdefh

Official account: AI Yue Chuang