Sign in
Log inSign up
Customize Hyper Terminal in Windows using Oh My Zsh and Powerline Fonts

Customize Hyper Terminal in Windows using Oh My Zsh and Powerline Fonts

Sujay Kundu's photo
Sujay Kundu
·Oct 19, 2020·

6 min read

If you are a developer who is used to linux style - bash terminal for all your development, and when switched to Windows ! feel like a nightmare, this post is for you. Because I will help you get the same experience as you get in you in Linux ! Well Good News is soon, they will be launching a new Windows Terminal, which got all the features inbuilt, which will replace your default Command Prompt :D

We get something like this in the end :

hyper-11.webp

So Let's get started in customizing up our environment ! So this are the steps we gonna follow :

1. Switch to Windows Developer Mode
2. Setup Windows Subsystem for Linux
3. Install Ubuntu from App Store
4. Install Hyper Terminal
5. Install Zsh Terminal
6. Install Oh My Zsh
7. Install Powerline Fonts
8. Install ZSH Syntax Highlighting
9. Selecting the Theme

Switch To Windows Developer Mode

We need to switch to developer mode in windows to make some changes to the current shell.

  1. Go to Settings > Update and Security > For developers ( From Sidenav).

  2. Select the Developer Mode Option and Press Yes !

hyper-1.webp

  1. After the necessary components, you'll need to restart your computer.

  2. Once your Computer Reboots, open Control Panel.

Setup Windows Subsystem For Linux

  1. Click on Programs

hyper2.webp

  1. Click on Turn Windows Features on or off

hyper-3.webp

  1. Check the Windows Subsystem for Linux option and Press Ok.

hyper-4.webp

  1. Once the components are installed on your computer, click the Restart Now button to complete the task.

After your computer restarts, you will notice that Bash will not appear in the "Recently Added" list of apps, this is because Bash isn't actually installed yet. Let's do it now.

Install Ubuntu From App Store

  1. Go to Windows App Store and Search for Ubuntu 18.04 LTS

hyper-5.webp

  1. Open start, do a search for Ubuntu and press Enter.

  2. Create a new Unix User and Password, This account doesn't have to be the same as your Windows Account. Enter the username in the required field and press Enter( you can't use the username "admin")

hyper-6.webp

  1. Done. Now you can use the bash commands in the Ubuntu Bash Shell.

(Tip: In ubuntu bash you can directly move to your Windows Folders using : cd \mnt\c)

Install Hyper Terminal

To use all the customizations, we require a terminal that supports them. So let's install Hyper Terminal, which is built upon Javascript.

hyper-7.webp

Setup Hyper terminal to use ZSH

After you installed Hyper Terminal open %USERPROFILE%/.hyper.js config file and replace line:

shell: '',

with

shell: 'C:\\Windows\\System32\\bash.exe',

Now each time when you will open hyper terminal it’s will be use zsh as default shell environment.

Install ZSH Shell

sudo apt-get install zsh

and open bashrc using nano editor

nano ~/.bashrc`

add

if [ -t 1 ]; then
exec zsh
fi

hyper-8.webp

Install Oh My Zsh

Repo

curl -L raw.githubusercontent.com/robbyrussell/oh-… | bash

hyper-12.webp

Install Powerline Fonts

Repo

  • Download fonts-master

  • We require to change some permissions first. Open the folder using Powershell ins Administrator Mode and type:

SetExecutionPolicy Bypass
  • Press y

Once done Install the fonts using

sudo apt-get install fonts-powerline
.\install.ps1

hyper-9.webp

Install ZSH Syntax Highlighting

Clone the ohmyzsh synta highlighting plugin using this:

git clone github.com/zsh-https://github.com/robbyrus… ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Then edit zshrc file using nano editor :

nano ~/.zshrc

add plugin(git zsh-syntax-highlighting) then after saving do :

source ~/.zshrc

Selecting The Theme

You can use any theme you want. We will be using the very famous Spaceship Theme : For more themes please visit: Oh My Zsh Themes

To Select the Theme for the terminal to use:

Open your terminal and type :

nano ~/.zshrc

and search for the line for the theme and replace it with the theme you want to use:

hyper-14.webp

Install Spaceship Theme

git clone github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"

hyper-13.webp

Now Symlink spaceship-prompt

ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

Done, Restart the terminal and enjoy hacking with your brand new Terminal :D

hyper-10.webp

hyper-11 (1).webp

Thanks for reading, hope you like the tutorial. Do forget to subscribe to my blog for more cool tricks upcoming ! :D

Have a great day :)

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct