Z Shell (zsh) Installation-Update-configuration-use

Source: Internet
Author: User
Tags bz2

Someone demonstrated a zsh, and looked very cool. The shell must be unique, so it's a piece of it.

Zsh, like Bash, is also a shell, except that it has its own differences, either gifted or inferior. When I started writing this record, I just installed it and didn't try to experience its "pros and cons".

1. Install. Zsh is included by default in the General Linux distribution. See what shells you have on your machine? Here's the shell on my machine.

$cat/etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
/bin/zsh
/usr/local/bin/bash
/usr/local/bin/csh
/usr/local/bin/ksh
/usr/local/bin/sh
/usr/local/bin/zsh

It's a lot!! already contains the zsh. Where/usr/local/bin/zsh is the new version of zsh that I installed myself later, and the/bin/zsh version is not the same. If there is no zsh on the machine, use " yum installzsh“ 安装。

2. Update. Since the configuration of the zsh that is used later on, the minimum requirement for the version of the zsh for Zsh is 4.3.9, and the zsh version that comes with my machine is "zsh 4.2.6 (X86_64-REDHAT-LINUX-GNU)"

So you also need to update the version of ZSH. The system of my machine is Redhat Linux, according to some blog's description, only need yum update zsh (or yum upgrade zsh? )。 But the hints I've tried to get are "package zsh-4.2.6-5.el5.x86_64 already installed and latest version", and it's estimated that Yum's source configuration on my machine is too narrow, The Yum source in the configuration is not the latest package. The machine is common, I still do not go to modify Yum source. Instead, download the latest installation package for zsh and manually make the installation yourself.

Download & Unzip:

wget http://sourceforge.net/projects/zsh/files/zsh/5.0.2/zsh-5.0.2.tar.bz2/download

tarxvjf zsh-5.0.2.tar.bz2

cdzsh-5.0.2

Compile and install:

./configure

make

sudomakeinstall

Check the effect:

At this time the new version of the ZSH has been installed, but because we./configure did not specify the installation directory, it was installed in the

/usr/local/bin/zsh --version zsh 5.0.2 (x86_64-unknown-linux-gnu)Then input cat/etc/shells will output 1 of those, note that before installing a new version of Cat/etc/shells is not the last line in the output! 3. The issue of configuring the egg pain came, we entered zsh in the command line or the original old version zsh was called, note at this time the old version in/bin/zsh, the new version in/usr/local/bin/zsh. I want the state is I input zsh command is the new version of Zsh is called, of course you can input/usr/local/bin/zsh, so very inhuman ~ ~ This thought is to modify the environment variable can solve this problem, various modifications ~/.BASHRC./bash_profile, Still failed to achieve the goal. Reference to a similar issue that modifies the Python version. Do the following: 1) Rename/bin/zsh. MV/BIN/ZSH/BIN/ZSH-4.2.6-BK. Back up, maybe someone else will use this old version. 2) Soft connection. sudo ln-s/usr/local/bin/zsh./zsh. Ll/bin/can see zsh-/usr/local/bin/zsh* link successful. Now download the input zsh and the new version is called. The only way to get it done is through such a nasty approach. 4. Use Oh my zshoh my zsh is a package that manages the configuration of zsh. There are various backgrounds, themes and so on. This installation is still relatively smooth. sudo wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh--no-check-certificate-o-| shok!! 5. Using zsh now that you have entered zsh on the bash command line, you have come to zsh, and have been well-configured with Oh my zsh and the interface is awesome. Of course, you can configure zsh as the default shell, but it's not very good when you're not familiar with it. In addition, there will be an error message when you start zsh:

/etc/profile.d/tops_bashrc.sh:20:command not Found:complete
/etc/profile.d/tops_bashrc.sh:31:command not found:shopt

I haven't looked into it yet, but it doesn't seem to hinder the use of zsh.

Next, play a good zsh, already oh my zsh.

Resources:

Important to

http://my.oschina.net/fishman/blog/145593

http://zhuanlan.zhihu.com/mactalk/19556676

Https://github.com/robbyrussell/oh-my-zsh

Http://get.jobdeer.com/992.get

Http://www.cnblogs.com/chenzehe/archive/2010/10/20/1856437.html

Http://www.xitongzhijia.net/xtjc/20150312/41102.html

The secondary

Http://www.linuxidc.com/Linux/2012-08/67734.htm

http://blog.csdn.net/chenchong08/article/details/7833242

Z Shell (zsh) Installation-Update-configuration-use

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.