Installing Oh My ZSH in Ubuntu Cloud Server and Setting it as default shell is tricky. Here is how we can use Oh My ZSH in few steps. There are different types of Unix Shell or Shell – as we wrote about before. We usually use Oh My ZSH on Mac with iTerm2 and Homebrew Package Manager. Also, it is possibly important to learn about the $PATH. When OS X was Mac OS X, it was actually a BSD variant. After many things happened, it became pure UNIX and name changed to OS X. GNU Linux has some differences with Mac OS X and OS X. There is a Wheel Group in OS X or Pure UNIX variants. If the Package Manager remains unaltered, the commands actually remains quite closer.
Understanding Things for Installing Oh My ZSH in Ubuntu Cloud Server
The steps for installing Oh My ZSH in Ubuntu Cloud Server is not very difficult. The difficult part, at least for the common users is the understanding the difference between two shells. When we login (typing the username and password) either via console – sitting in front of the machine or remotely via ssh, .bash_profile
is executed to configure the shell. But, if we open xterm
inside Gnome or KDE environment, then .bashrc
is executed before. For evoking that .bashrc
we can also run a new bash instance by typing /bin/bash
in a terminal – this is why in shell scripts that /bin/bash
is usually written. Due to compilation, in Mac OS X (not OS X), .bash_profile
is read in any situation – this is an exceptional situation among the whole UNIX breed. ~/.profile
file is for setting environment variables or executing login scripts on OS X or Mac OS X, but oddly they are not created by default. When we open iTerm2 on OS X with Homebrew, it reads the ~/.zsrc
file. In OS X, we can use the source
command, but Ubuntu will not understand the source
command. There are advantages of using Oh My ZSH over bash, it is extremely similar to bash but does lot of extra works like typographical correction. Oh My ZSH receives frequent updates, we get prompt on OS X. Bash probably rarely receive updates. You can expect on Oh My ZSH :
1 2 3 | zsh: correct 'aptg-et' to 'apt-get' [nyae]? # official website # http://ohmyz.sh/ |
Installing Oh My ZSH in Ubuntu Cloud Server
We need to install old zsh
first and git-core
:
---
1 2 | sudo apt-get update && sudo apt-get install git apt-get install zsh && apt-get install git-core |
Then install OH My ZSH :
1 2 3 4 5 6 | wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh # set oh my zsh as default shell chsh -s `which zsh` # do a soft reboot sudo shutdown -r 0 # reboot command ends a session... |
There was a reported problem with regex and Ruby :
1 | https://github.com/robbyrussell/oh-my-zsh/issues/227#issuecomment-825773 |