Skip to content

Instantly share code, notes, and snippets.

@Semo
Last active April 14, 2024 06:20
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save Semo/378fba2516a31f2608f0ad0161a73ab7 to your computer and use it in GitHub Desktop.
Save Semo/378fba2516a31f2608f0ad0161a73ab7 to your computer and use it in GitHub Desktop.
How to install Zsh version 5.6.2 into CentOS 7

How to install Zsh version 5.6.2 into CentOS 7

Given that you have a clean installation of CentOS 7 which was already updated, by you, then you still have some dependencies to install make and install the external Zsh from the source. You must be root to get the stuff done.

Install GCC Development Tools

yum groupinstall "Development tools"

Check if it's working

gcc -v

Get and install ncurses

yum install ncurses-devel

Download the zsh sources

wget https://sourceforge.net/projects/zsh/files/zsh/5.6.2/zsh-5.6.2.tar.xz/download

Untar it

tar -xvJf download

Prepare the loaded sources

cd zsh-5.6.2 ./configure

Make a binary

make

Install the binary

make install

Edit the /etc/shells file to let CentOS know about the Zsh

vi /etc/shells

Insert the next line to the bottom and save it

/usr/local/bin/zsh

Change the system's shell

chsh -s /usr/local/bin/zsh

Done (TM) ;-)

@duzhuoshanwai
Copy link

thank you

@obayit
Copy link

obayit commented Oct 3, 2022

Thanks alot, this works, a little tip: when download zsh replace the version number with the newest version :)

@Semo
Copy link
Author

Semo commented Oct 3, 2022

@obayit Did you try with the newest version and is it running fine on your centos7?

Copy link

ghost commented Jan 26, 2023

@Semo Just tried zsh 5.9 on Centos7 using the above procedure - works! 👍

@Semo
Copy link
Author

Semo commented Jan 27, 2023

@mzelenov-federatedwireless happy to read that. Thanks! :-)

@pplmx
Copy link

pplmx commented May 9, 2023

Installed zsh-5.9 on CentOS Linux release 7.9.2009 (Core). :)

@Semo
Copy link
Author

Semo commented Aug 17, 2023

Thank y'all ;-)

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