Skip to content

Instantly share code, notes, and snippets.

@rkaneko
Last active January 11, 2022 16:24
Show Gist options
  • Save rkaneko/d0794aec2c50f9f8a09b to your computer and use it in GitHub Desktop.
Save rkaneko/d0794aec2c50f9f8a09b to your computer and use it in GitHub Desktop.
Installing zsh on CentOS

Installing zsh on CentOS

$ sudo yum install ncurses-devel

$ cd /usr/local/src

$ sudo curl -L http://sourceforge.net/projects/zsh/files/zsh/5.0.7/zsh-5.0.7.tar.gz/download -o zsh-5.0.7.tar.gz

$ sudo tar xvzf zsh-5.0.7.tar.gz

$ cd zsh-5.0.7

$ sudo ./configure && sudo make && sudo make install

# add zsh to login shells
$ sudo -e /etc/shells
# add '/usr/local/bin/zsh' to last line
# /usr/local/bin/zsh

# change some user's login shell
$ sudo chsh rkaneko
New shell [/bin/bash]: /usr/local/bin/zsh

for my env

# for my tmux login shell config
$ sudo ln -s /usr/local/bin/zsh /bin/zsh
@nickaroot
Copy link

nickaroot commented Feb 2, 2019

You need to install gcc/other C compiler too
sudo yum -y install gcc

@kmonsoor
Copy link

kmonsoor commented Oct 24, 2020

for latest Zsh (as of now)

$ sudo curl -L https://www.zsh.org/pub/zsh-5.8.tar.xz -o zsh-5.8.tar.xz

@golkonda
Copy link

golkonda commented Jun 4, 2021

To untar the latest stable version zsh-5.8.tar.xz, below switches are working using tar command.

tar -xvJf zsh-5.8.tar.xz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment