DEV Community

MyeongGeun Jo
MyeongGeun Jo

Posted on

How to install zsh(Oh My Zsh) and zsh-autosuggestions on ubuntu 18.04

Sometimes on your coding journey, you might get to a point where you just get frustrated with all the development environment setup bulls#$@ that cost you valuable time.

Some might install automation tools, others might use source code control. Me, wanting to try out something new, stumbled upon a very sleek looking cloud IDE called goormIDE.

Trying it out, I found out that goormIDE is an easily configurable cloud IDE that is very customizable and easy to use for beginners (like myself).

This post will cover how we can use goormIDE to easily install zsh(Oh My Zsh) and zsh-autosuggestions on ubuntu 18.04.

I will try out new things with this goormIDE and write more about them in the near future.

Create a new container

  1. Enter the name of your container image
  2. Select blank on the stack option image

Install Oh My Zsh

Once you are in the container, there will be a terminal in the bottom of the IDE. (The interface is similar to that of VSC.)

  1. Update the package.

    $ apt-get update && apt-get -y upgrade
    
  2. Install git-core, zsh, fonts-powerline

    $ apt-get install -y git-core zsh fonts-powerline
    
  3. Install Oh My Zsh

    $ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    Cloning Oh My Zsh...
    Cloning into '/root/.oh-my-zsh'...
    remote: Enumerating objects: 1158, done.
    remote: Counting objects: 100% (1158/1158), done.
    remote: Compressing objects: 100% (1121/1121), done.
    remote: Total 1158 (delta 19), reused 1104 (delta 19), pack-reused 0
    Receiving objects: 100% (1158/1158), 772.34 KiB | 1.07 MiB/s, done.
    Resolving deltas: 100% (19/19), done.
    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 the shell...
    Shell successfully changed to '/usr/bin/zsh'.
    
         __                                     __
    ____  / /_     ____ ___  __  __   ____  _____/ /_
    / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
    / /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
    \____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                        /____/                       ....is now installed!
    Please look over the ~/.zshrc file to select plugins, themes, and options.
    p.s. Follow us on https://twitter.com/ohmyzsh
    p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh
    
  4. Setting profile to load at startup.
    Click [goormide]-> [Preferences] on the top menu. Add zsh at the end of the editor on the right side of [Terminal]-> [Profile].
    image

  5. Check your a terminal.
    Yeah, I know its not big of a deal, but its something, isn't it?
    image

Install zsh-autosuggestions

  1. Install the zsh-autosuggestions

    $ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    
  2. Add plugin in ~/.zshrc

    $ vi ~/.zshrc
    ...
    plugins=(git)
    plugins=(zsh-autosuggestions) # Add this line. under the "plugins"
    source $ZSH/oh-my-zsh.sh
    
  3. Refresh the terminal.
    Click the tiny refresh icon on the left side of the terminal tab.

  4. Enter ls
    Then you can see that -al is automatically printed.
    image

That's all for now, many tutorials like this might pop up in the near future, after I'm done exploring goormIDE.

The online IDE seems pretty flexible, and it offers pretty good specs for a free tier, so you might also want to check it out.

I found out that they also have a subreddit (Not a lot of people though) I will be staying here, so that I could help others with goormIDE (if I can)

Link:Β https://ide.goorm.io
Reddit:Β https://www.reddit.com/r/goormIDE/

Top comments (0)