How to install Oh My Zsh on Ubuntu 14

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.

Source

https://github.com/robbyrussell/oh-my-zsh/

Install

  • Eduardo Martins Pinto

    Thanks!
    Works to me.

  • 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="

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值