Oh My Zsh
if failed act follows:
curl -OL https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
bash install.sh
Oh-My-Zsh is an open source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, and themes.
The benefit of this shell are the highly customizable themes. The themes can offer you easy to read details that are related to the current context of what you’re doing.
Many themes display the current Git repo and branch for the current directory.
Note: You will likely need to restart the computer to finish this install.
Usage
Here’s a good tutorial on customizing Oh My Zsh.
http://code.tutsplus.com/tutorials/how-to-customize-your-command-prompt–net-24083
Install
The website states that you should run curl -L http://install.ohmyz.sh | sh
to installzsh
but it’s not that simple if you have a fresh install of Ubuntu 14. In order to runOh My Zsh
you have to first install zsh
and git
.
sudo apt-get update
sudo apt-get install zsh
sudo apt-get install git-core
Now you can install Oh My Zsh.
sudo curl -L http://install.ohmyz.sh | sh
Install Errors
If you saw an error massage like one of the following chsh: option requires an argument
orPassword: chsh: PAM: Authentication failure
then the script is having trouble setting ZSH as the default shell.
You can resolve this problem by running the install script manually.
rm -fr .oh-my-zsh/
curl -L http://install.ohmyz.sh > install.sh
sh install.sh
On some Linux platforms you have to run
bash install.sh
instead ofsh install.sh
.
Still Can Not Install ZSH
Let’s make sure ZSH is installed now.
whereis zsh
zsh: /bin/zsh /usr/bin/zsh /etc/zsh /usr/bin/X11/zsh /usr/share/zsh
If ZSH isn’t found then remove the .oh-my-zsh
folder from your home folder and start over again.
If ZSH is found then the install script is failing to change the default shell. You can set ZSH as the default shell manually for the current user with this command.
sudo chsh -s $(which zsh) $(whoami)
After using
chsh
you might have to log out and log back in again to see the changes persist.
If ZSH is installed correct, but chsh
is not working to set it as the default. You cancarefully set the shell manually for your user account.
sudo nano /etc/passwd
Find the line with your username:
username:x:1634231:100:Your Name:/home/username:/bin/bash
and replace bash with zsh:
username:x:1634231:100:Your Name:/home/username:/bin/zsh
If none of the above has worked for you. Please post a comment below and share how you resolved it.
Eduardo Martins Pinto
Thanks!
Works to me.
Mathew Foscarini
You’re welcome. Let me know of any other must have tools.
Ryekee
There are some errors in first codeblock:
Original:
sodu apt-get update
sodu apt-get install zsh
sudo apt-get git-core
Correct:
sudo apt-get update
sudo apt-get install zsh
sudo apt-get install git-core
xincyberbit
You don’t need to add sudo with the command,
$ sudo chsh -s `/bin/zsh`
Because, it will change the default shell of rot. To change the shell for your account, you just need to give the same command without sudo. It will save you from editing the /etc/passwd file
Cheers,
Adeyemi
i made the mistake of using the command and it has affected my root shell. How do i revert it
xincyberbit
Hi Adeyemi, you can revert it back, by again using the command,
$ sudo chsh -s ‘/bin/bash’
chsh – change shell, it will assign again the bash shell to the root user.
Mario Junior ✓ᵛᵉʳᶦᶠᶦᵉᵈ
Many thanks! <img src="https://s.w.org/images/core/emoji/2/svg/1f600.svg" alt="