Setup Terminal for Windows
I recently moved to a Windows environment, Windows 10 to be exact, and trying to set up a Unix terminal. Since Windows is not Unix based, things can be a bit difficult...
There's a simpler way to use Unix commands on Windows, called Git Bash, but I wanted to have a pretty terminal with themes using oh my zsh (...and to torture myself)
There are many articles online for how to set up zsh on Windows, I am listing the steps below that worked for me...
Install Windows Subsystem for Linux
Control Panel=>Programs=>Turn windows features on and off- Check the checkbox for
Windows Subsystem for Linux - Wait for install to finish and restart computer
Install Linux
- Go to
Microsoft Store - Search for
LinuxThere are many flavors of Linux to choose from, I'm usingUbuntu 18.04LTS(LTSstands forLong Term Support)
Install Hyper terminal
Install Powerline Font for Windows
- Go to Powerline Fronts Github Page
- Download the repo as
ZIP - Extract the zip file
- Run
PowershellasAdministratorand navigate to the extracted fonts folder -
To install all the fonts using the provided script, run the following command
as AdministratorusingPowershell:powershell -ExecutionPolicy Bypass .\install.ps1This command temporarily set the
ExecutionPolicyin order to execute a foreign script, you can double check yourExecutionPolicyremains unchanged by usingGet-ExecutionPolicy, default isRestricted
Configure Linux
- Launch your installed Linux. (If it's the first time, you will need to set a username and password)
- Install
ZSHby usingsudo apt-get install zsh - Open your bash profile,
nano ~/.bashrc - Add
bash -c zshto the top of the file. ctrl + oto save the file,ctrl + xto exit nano- Install
Oh My Zshusingsh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" - Default theme of
Oh My Zshisrobbyrussel, but another popular one isagnoster. You can change it by editing the~/.zshrcfile.
Configure Hyper
- Launch
Hyper - Open
Preferences(ctrl + ,orRight clickon the terminal window and selectPreferences) -
Look for
pluginsand edit:plugins: [ "verminal", "hyperpower", "hyper-search", ]verminalis a terminal theme for hyper,hyperpowergives your terminal a little pop, andhyper-searchgive you a search window on the Terminal (ctrl + shift + fin Windows), you can search for them to see what they do -
Look for
fontSizeand put the following above it:verminal: { fontSize: 14, fontFamily: "Source Code Pro for Powerline" }Remember the
Powerlinefonts we installed earlier? You can choose any of them -
Look for
shelland edit the following:shell: 'C:\\Windows\\System32\\bash.exe', -
Look for
shellArgsand edit the following:shellArgs: ['--login', '-c', 'zsh'], - Restart
Hyper, and if everything is configured correctly, enjoy your shiny new terminal! 🎉🎉🎉
One issue I find while using Windows Subsystem for Linux is the configuration difference for developing NodeJS, I have a seperate article talking about that
Thanks for reading!