Installing Zsh - dimensi0n/oh-my-zsh GitHub Wiki
Oh-My-Zsh is a framework for Zsh, the Z shell.
- In order for Oh-My-Zsh to work, Zsh must be installed.
- Please run
zsh --versionto confirm. - Expected result:
zsh 5.1.1or more recent
- Please run
- Additionally, Zsh should be set as your default shell.
- Please run
echo $SHELLfrom a new terminal to confirm. - Expected result:
usr/bin/zshor similar
- Please run
If necessary, follow these steps to install Zsh:
- There are two main ways to install Zsh
- with the package manager of your choice, e.g.
sudo apt-get install zsh(see below for more examples) - from source, following instructions from the Zsh FAQ
- Verify installation by running
zsh --version. Expected result:zsh 5.1.1or more recent. - Make it your default shell:
chsh -s $(which zsh)
- Note that this will not work if Zsh is not in your authorized shells list (
/etc/shells) or if you don't have permission to usechsh. If that's the case you'll need to use a different procedure.
- Log out and login back again to use your new default shell.
- Test that it worked with
echo $SHELL. Expected result:/bin/zshor similar. - Test with '$SHELL --version'. Expected result: 'zsh 5.1.1' or similar
Try zsh --version before installing it from Homebrew. If it's newer than 4.3.9
you might be OK. Preferably newer than or equal to 5.0.
brew install zsh zsh-completionsAssuming you have Homebrew installed. If not, most versions of macOS ship zsh by default, but it's normally an older version. Alternatively, you may also use MacPorts
sudo port install zsh zsh-completionsapt install zshIf you don't have apt, the recommended package manager for end users
[1]
[2]
[3]
[4]
, you can try apt-get or aptitude.
Other distributions that apply include: Linux Mint, elementary OS, Zorin OS, Raspbian, MX Linux.
zypper install zshpacman -S zshxbps-install zshdnf install zshTo install the package:
pkg_add zshTo install the package:
pkg install zshTo install the port:
cd /usr/ports/shells/zsh/ && make install cleanTo reduce memory usage, optionally enable zsh-mem options with
make configbefore running "make install".
sudo yum update && sudo yum -y install zshInstall the zsh package using the installer. Unfortunately Cygwin doesn't have a standard command line interface.
The easiest way to change the default shell is to set your SHELL user environment variable. Search for "Edit Environment variables for your account" to bring up the environment variables window, create a new variable named "SHELL" and give it the value "/usr/bin/zsh/".
Alternatively: Open Cygwin (in BASH) then type:
sudo nano ~/.bashrcOnce the .bashrc file is open, add this line to the very top:
exec zshClose and save the file. Close and reopen Cygwin. It will execute the command every time you load the terminal and run your zsh shell.
eopkg it zshemerge app-shells/zshIf you know a platform that is not covered, edit this page and add it!
