Cyberithub

How to Install Oh My ZSH on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

In this article, I will take you through the steps to install Oh My ZSH on Ubuntu 20.04 LTS. Oh My Zsh is a free and open source framework for managing Zsh configuration. This framework is managed by community of developers and programmers. The usage of Oh My ZSH framework makes developers life super easy as it comes bundled with thousands of helpful functions, helpers, plugins, themes and what not. You can take the detailed tour of this framework on its official website. It can easily be installed on any Linux and UNIX platform but here we will only see the steps to install on Ubuntu 20.04 LTS System.

 

Important Features

  • It includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc).
  • It includes 140+ themes to make your day.
  • It has an auto-update tool to keep up with the latest updates from the community.
  • It has provided the ability to add custom plugins and themes.

 

How to Install Oh My ZSH on Ubuntu 20.04 LTS (Focal Fossa)

How to Install Oh My ZSH on Ubuntu 20.04 LTS (Focal Fossa)

Also Read: How to Install Rancher on Ubuntu 20.04 LTS [Step by Step]

Advertisements

Step 1: Prerequisites

a) You should have a running Ubuntu 20.04 LTS System.

b) You should have sudo or root access to run privileged commands.

Advertisements

c) You should have apt-get, curl or wget utility available in your Server.

 

Step 2: Update Your Server

In the first step, you need to sync all the installed packages with the latest available versions from the default Ubuntu repo and upgrade the required packages by using sudo apt-get update && sudo apt-get upgrade command as shown below.

Advertisements
cyberithub@ubuntu:~$ sudo apt-get update && sudo apt-get upgrade
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:5 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease
Get:6 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:7 https://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
Hit:8 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu focal InRelease
Hit:9 http://download.opensuse.org/repositories/home:/selmf/xUbuntu_20.04 InRelease
Get:10 https://repo.protonvpn.com/debian stable InRelease [2,519 B]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,745 kB]
Hit:12 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
...................................................

 

Step 3: Install ZSH

In the next step, you need to install ZSH package from default Ubuntu repo as a prerequisite package for Oh My ZSH using sudo apt-get install zsh command as shown below.

cyberithub@ubuntu:~$ sudo apt-get install zsh
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
zsh-common
Suggested packages:
zsh-doc
The following NEW packages will be installed:
zsh zsh-common
0 upgraded, 2 newly installed, 0 to remove and 21 not upgraded.
Need to get 4,450 kB of archives.
After this operation, 18.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
...................................

 

Step 4: Install Oh My ZSH

You can install Oh My ZSH package on Ubuntu 20.04 LTS System by using either of the below method.

Advertisements

a) Using curl utility

If you have curl utility available in your System then you can visit GitHub and download and install the latest framework version by using below installation script.

cyberithub@ubuntu:~$ sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Cloning Oh My Zsh...
remote: Enumerating objects: 1298, done.
remote: Counting objects: 100% (1298/1298), done.
remote: Compressing objects: 100% (1252/1252), done.
remote: Total 1298 (delta 26), reused 1265 (delta 26), pack-reused 0
Receiving objects: 100% (1298/1298), 1.06 MiB | 5.51 MiB/s, done.
Resolving deltas: 100% (26/26), done.
From https://github.com/ohmyzsh/ohmyzsh
* [new branch] master -> origin/master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Already on 'master'
/root

Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc.

Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] Y
Changing your shell to /usr/bin/zsh...
Shell successfully changed to '/usr/bin/zsh'.

         __                                   __
   ____ / /_    ____ ___  __ __    ____ _____/ /_
 / __ \/ __ \  / __ `__ \/ / / /  /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ /   / /_ (__)  / / /
\____/_/ /_/ /_/ /_/ /_/\__, /  /___/ ____/_/ /_/
                       /____/                      ....is now installed!


Before you scream Oh My Zsh! look over the `.zshrc` file to select plugins, themes, and options.

• Follow us on Twitter: https://twitter.com/ohmyzsh
• Join our Discord community: https://discord.gg/ohmyzsh
• Get stickers, t-shirts, coffee mugs and more: https://shop.planetargon.com/collections/oh-my-zsh

➜ ~

b) Using wget utility

If you have wget utility available in your System then you can visit GitHub and download and install the latest version by using below installation script.

cyberithub@ubuntu:~$ sudo sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
--2022-04-21 21:45:25-- https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh
Resolving raw.github.com (raw.github.com)... 2606:50c0:8002::154, 2606:50c0:8001::154, 2606:50c0:8000::154, ...
Connecting to raw.github.com (raw.github.com)|2606:50c0:8002::154|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh [following]
--2022-04-21 21:45:26-- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8000::154, 2606:50c0:8003::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16963 (17K) [text/plain]
Saving to: ‘STDOUT’

- 100%[============================================================================>] 16.57K --.-KB/s in 0.001s

2022-04-21 21:45:27 (19.9 MB/s) - written to stdout [16963/16963]

Cloning Oh My Zsh...
remote: Enumerating objects: 1298, done.
remote: Counting objects: 100% (1298/1298), done.
remote: Compressing objects: 100% (1252/1252), done.
remote: Total 1298 (delta 26), reused 1265 (delta 26), pack-reused 0
Receiving objects: 100% (1298/1298), 1.06 MiB | 1.14 MiB/s, done
..........................................................

 

Step 5: Check ZSH Version

After successful installation, you can check ZSH version by using zsh --version command as shown below.

➜ ~ zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)

 

Step 6: Update Oh My Zsh

If you would like to use the latest version of this framework then you can choose to update it by using omz update command as shown below. In our case, we are already using the latest version so no further updates to install.

➜ ~ omz update
Updating Oh My Zsh
        __                                   __
 ____  / /_    ____ ___   __ __   ____ _____/ /_
/ __ \/ __ \ / __ `__ \  / / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ /   / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, /  /___/____/_/ /_/
                       /____/

Oh My Zsh is already at the latest version.

To keep up with the latest news and updates, follow us on Twitter: https://twitter.com/ohmyzsh
Want to get involved in the community? Join our Discord: https://discord.gg/ohmyzsh
Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh

 

Step 7: Uninstall Oh My ZSH

Once you are done using the framework then you can choose to uninstall oh My ZSH from your System by using either of the below method.

a) Using curl utility

If you have curl utility available in your System then just like installation, you can also uninstall the framework by using below uninstallation script.

cyberithub@ubuntu:~$ sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/uninstall.sh)"
Are you sure you want to remove Oh My Zsh? [y/N] y
Removing ~/.oh-my-zsh
Found ~/.zshrc -- Renaming to /root/.zshrc.omz-uninstalled-2022-04-21_21-40-52
Looking for original zsh config...
No original zsh config found
Switching your shell back to '/bin/bash':
Thanks for trying out Oh My Zsh. It's been uninstalled.
Don't forget to restart your terminal!

b) Using wget utility

If you have wget utility available in your System then you can choose to uninstall the framework by using below uninstallation script.

cyberithub@ubuntu:~$ sudo sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/uninstall.sh -O -)"
--2022-04-21 21:46:42-- https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/uninstall.sh
Resolving raw.github.com (raw.github.com)... 2606:50c0:8002::154, 2606:50c0:8001::154, 2606:50c0:8000::154, ...
Connecting to raw.github.com (raw.github.com)|2606:50c0:8002::154|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/uninstall.sh [following]
--2022-04-21 21:46:43-- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/uninstall.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8000::154, 2606:50c0:8003::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1194 (1.2K) [text/plain]
Saving to: ‘STDOUT’

- 100%[============================================================================>] 1.17K --.-KB/s in 0s

2022-04-21 21:46:44 (27.1 MB/s) - written to stdout [1194/1194]

Are you sure you want to remove Oh My Zsh? [y/N] y
Removing ~/.oh-my-zsh
Found ~/.zshrc -- Renaming to /root/.zshrc.omz-uninstalled-2022-04-21_21-46-48
Looking for original zsh config...
No original zsh config found
Switching your shell back to '/bin/bash':
Thanks for trying out Oh My Zsh. It's been uninstalled.
Don't forget to restart your terminal!

Leave a Comment