Add zsh installation examples and reorganise the section

Marc Cornellà 2016-12-21 16:21:04 +01:00
parent 295cef1ad9
commit 6c6a27a9a4

@ -2,24 +2,70 @@
Oh-My-Zsh is a framework for [Zsh](http://www.zsh.org), the Z shell.
- In order for Oh-My-Zsh to work, Zsh must be installed.
- In order for Oh-My-Zsh to work, Zsh must be installed.
- Please run `zsh --version` to confirm.
- Expected result: `zsh 4.3.9` or more recent
- Additionally, Zsh should be set as your default shell.
- Please run `echo $SHELL` from a new terminal to confirm.
- Expected result: `/bin/zsh`
- Expected result: `/bin/zsh` or similar
## Installing Zsh
## Install and set up zsh as default
If necessary, follow these steps to install Zsh:
1. There are two main ways to install Zsh
- with the package manager of your choice (_e.g._ `sudo apt-get install zsh`) or
- from [source](http://zsh.sourceforge.net/Arc/source.html), following
- with the package manager of your choice, _e.g._ `sudo apt-get install zsh` (see [below for more examples](#howto-install-zsh-in-many-platforms))
- from [source](http://zsh.sourceforge.net/Arc/source.html), following
[instructions from the Zsh FAQ](http://zsh.sourceforge.net/FAQ/zshfaq01.html#l7)
2. Verify installation by running `zsh --version`. Expected result: `zsh 4.3.9` or more recent.
2. Verify installation by running `zsh --version`. Expected result: `zsh 4.3.9` or more recent.
3. 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 use `chsh`. If that's the case [you'll need to use a different procedure](https://www.google.com/search?q=zsh+default+without+chsh).
4. Log out and login back again to use your new default shell.
5. Test that it worked with `echo $SHELL`. Expected result: `/bin/zsh`
4. Log out and login back again to use your new default shell.
5. Test that it worked with `echo $SHELL`. Expected result: `/bin/zsh` or similar.
## HowTo install zsh in many platforms
### macOS
```sh
brew install zsh zsh-completions
```
Assuming you have [Homebrew](http://brew.sh/) installed. If not, most versions of
**macOS** ship zsh by default, but it's normally an older version.
**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 **
### Ubuntu, Debian & derivatives
```sh
apt install zsh
```
If you don't have `apt`, the recommended package manager for end users
[[1]](http://askubuntu.com/a/446484)
[[2]](http://askubuntu.com/a/775264)
[[3]](https://help.ubuntu.com/lts/serverguide/apt.html)
[[4]](http://www.howtogeek.com/234583/simplify-command-line-package-management-with-apt-instead-of-apt-get/)
, you can try `apt-get` or `aptitude`.
[Other distributions that apply](https://en.wikipedia.org/wiki/List_of_Linux_distributions#Debian-based) include:
Linux Mint, elementary OS, Zorin OS.
### OpenSUSE
```sh
zypper install zsh
```
### Arch Linux
```sh
pacman -S zsh
```
### Add yours
If you know a platform that is not covered, edit this page and add it!