Create a gist now

Instantly share code, notes, and snippets.

@tsabat /zsh.md
Last active Sep 17, 2017

What would you like to do?
Getting oh-my-zsh to work in Ubuntu

Prereq:

apt-get install zsh
apt-get install git-core

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh

and then you change your shell to zsh

chsh -s `which zsh`

and then restart

sudo shutdown -r 0

This problem is explained in depth in this issue

ryancole commented Jan 7, 2012

it looks like you're changing the shell to bash, instead of zsh. is this because of some thing oh-my-zsh does, or is this a typo?

Owner

tsabat commented Jan 13, 2012

changed. thanks.

Worked perfectly, thanks!

Thanx for share. Worked perfectly n i loved the git friendly default theme !!

Worked perfectly thanks

I love you !

You have to have "zsh" installed on Ubuntu first... Then it works :)

apt-get install zsh

You also need to have git installed obviously

Sometimes it is difficult to make it run in ubuntu, so I use
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
then
chsh -s which zsh
and after that restart it
sudo shutdown -r 0

Asmmund commented Mar 7, 2013

Thanks for your method! It's what i needed!

Asmmund commented Mar 7, 2013

on one of the machines had to run
sudo apt-get install zsh
before following these footstepts

digitup commented Apr 30, 2013

Thank you very much. It works as expected :-). If you don't have git installed it should be installed as well:
sudo apt-get install git

Hey, I just needed to run firstly sudo apt-get update
πŸ‘

For whatever reason, chsh -swhich zsh``didn't work for me butchsh -s /bin/zsh did. It might have just been a coincidence, but give it shot if you are having trouble.

Thanks! It works well..
πŸ‘

tmaffia commented Jan 7, 2014

Thanks for this!

Naatan commented Jan 14, 2014

Any reason you chose to include a "restart" step in this? You seem to have properly fixed it in https://gist.github.com/tsabat/1498393/422c7e4488c5dfc616b8e9c58f142c9d2cb44621 but then changed it back to restart. I don't really see why this would be necessary and it kind of promotes bad practice.

Lujaw commented Feb 13, 2014

awesome !! worked like a charm.. thanks for sharing the information..

Thanks

We have some revised install instructions now on http://ohmyz.sh/

sgsheg commented May 6, 2014

Thanks!

Thanks!

rebooting the machine is not necessary. just log out and back in!

Can you give the exact details? I can't find them on the ohmyzsh site.

:) Thanks!

thanks

n1 :)

iovino commented Aug 24, 2014

Thanks! This is working on Raspbian - Debian Wheezy too.

rands0n commented Sep 15, 2014

πŸ‘

Thank you!

Bshally commented Oct 21, 2014

Great resource! 10/10, would curl again.

kimly commented Nov 20, 2014

thanks

It's perfect! Works like a charm!

πŸ‘

Perfect πŸ‘

Thanks (y)

Thanks

It's worked, thanks! ✌️

thanks

iPoul commented Feb 26, 2015

For some odd reason i can't change directory with it.

δΉˆδΉˆε“’~

aguidis commented Mar 18, 2015

nice thanks

igregson commented Apr 4, 2015

nearly 2 years later, this approach still works.

many thanks :)

If you need to setup zsh for concrete user you can run:

sudo chsh -s $(which zsh) username

http://superuser.com/a/231736

adiazpy commented May 6, 2015

Great! Also works on Raspberry Pi 2

sadfuzzy commented May 7, 2015

thanks a lot! πŸ‘

Thanks!

fes300 commented Jun 7, 2015

thanks, been on that for a while

Thank you! Thumbs up!!!

Thanks πŸ‘

erinwan commented Aug 2, 2015

Thank you!

Thanks

maciao commented Sep 28, 2015

love you ! !!!

ltongues commented Oct 3, 2015

Awesome!

Thanks πŸ‘

fisher commented Nov 21, 2015

man, you don't need to reboot, just to relogin after chsh /facepalm

This was all I needed to do.

apt-get install -y zsh git-core
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

maciao commented Dec 2, 2015

thanks & Love u <3 !!

Thank you! Worked perfectly!

Thanks!

Thank you. :)

Cool, Thanks πŸ‘

It works with Xubuntu.

Note that I got an error when I typed: wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh

But I ignored the error and went on. It ended up working.

This is a pretty good YouTube clip on how one guy uses Zsh: https://www.youtube.com/watch?v=m07MiM6rmMc

Krijger commented Feb 12, 2016

Thanks for the nice Gist

Thanks

Worked like a charm, thanks a ton!

Thanks!

Thanks!

Thanks!

But,In the fact, It did not need to use sudo shutdown -r 0 to reboot. Just Logout then Login.

Thanks!

adnnn commented Mar 12, 2016

I couldn't change directory and then I ran this and everything worked fine.

apt-get install -y zsh git-core
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Thanks!!!

@adnnn - this worked like a charm - thanks!

vpakg commented Apr 6, 2016

Just as a side note, if you don't want to restart your machine (last step), you should be able to execute zsh with exec zsh

Thanks Captain !!!

hasangilak commented May 5, 2016 edited

for anyone who has a problem with chsh -s 'which zsh', this answer will work fine
http://askubuntu.com/a/660014

Thanks, works in Raspbian (Raspberry Pi)

Oh man. It works! Thank you so much!

rezayds commented Jun 27, 2016

Thanks man!

luizs81 commented Jul 5, 2016

Just in case if someone else is trying to add this in a "Vagrant bootstrap file"

http://stackoverflow.com/questions/25763017/install-oh-my-zsh-on-a-vagrant-box-as-part-of-the-bootstrap-process

kas commented Aug 3, 2016

Awesome! Thanks. Works on Ubuntu Mate 16.04.1

Works great!

gazatem commented Sep 7, 2016

great job!

Thank you!

Thanks!

chaicko commented Oct 3, 2016

Excellent!

Thanks! Installed on Bash on Ubuntu on Windows

yar00001 commented Oct 9, 2016

If you are hear to replace zsh with default bash IN WINDOWS 10, add this to your ./bashrc file:

# Launch Zsh
if [ -t 1 ]; then
exec zsh
fi

IOpuk commented Oct 14, 2016

Thanks!

Works like a charm! :)

Many thanks ! Works perfectly !

Webysther commented Jan 26, 2017 edited

For docker debian based:

bash -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

Thanks the author and everyone here!
I need to have git and zsh installed before doing so. Plus, log out does not work for me, but restart does well.
πŸ‘

Worked like a charm. Thanks!

How to rollback to "vanilla bash" :) ?

joelcn commented Mar 7, 2017

well done mate, nice tutorial, simple and useful

Thanks:)

dazjavier commented Apr 25, 2017 edited

Thanks! Works in Ubuntu Gnome 17.04

atilkan commented May 13, 2017 edited

You don't need any of this. Go to official sites and read people. It is simpler and explains well.
http://ohmyz.sh/
https://wiki.ubuntu.com/ChangingShells

Good one. Thank you. πŸ‘

deyvin commented Jul 18, 2017

Thanks!

Hepic commented Sep 11, 2017

Thank you !

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