Make your WSL or WSL2 terminal awesome - with Windows Terminal, zsh, oh-my-zsh and Powerlevel10k

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everybody welcome to the digital life and in this video I want to show you how to make your windows subsystem for Linux terminal just awesome and also means two important things for me first it needs to have a nice look and feel so we will change the default colors the default font and so on and second it also needs to have a nice functionality so to do that we will install Windows terminal which is a nice open-source project of Microsoft which is a modern and nice terminal with some great functionalities and we will also install zsh shell on the Linux operating system that will replace our default bash shell so with zsh you can customize a lot of things you can completely change the look and behavior of your shell and we will also have a look at some zsh basics or how to customize that and how to install plug-ins to enhance the functionality of your terminal some of these things will also apply on Linux or Mac OS operating systems especially the zsh shell which is commonly used there but there are a few things and a few steps you need to do in order to make it work properly with Windows and windows subsystem for Linux don't worry I will walk you step-by-step through the whole installation in configuration I also have a small special for you because I will share my personal configuration of Windows terminal and also the CSH so if you want to know that if you want to have a look at that keep watching and we will start right now okay guys so before we start I want to tell you whenever I create a new tutorial or how-to on YouTube I will also write a blog article that I will upload on my home page so whenever you are searching for a specific command I'm using in this tutorial or a link to a documentation or something else you can just have a look at the description of this video and find the link to my written blog article there can look up all the resources all the commands that I'm using and you can just copy and paste them okay so to do a short demonstration I have installed a new Windows 10 virtual machine and I've also installed the windows subsystem for Linux and version 1 so all of these things will also apply to a Windows subsystem for Linux in version 2 so that really doesn't make any difference I've just installed it on this machine and when we open the windows subsystem for Linux you can see this is the default terminal I mean this is working somehow but it really it doesn't look nice it doesn't have any advanced functionality you for terminal application and it really looks boring so let's try to transform this boring terminal into something more sophisticated and we will start with the installation of the Windows terminal so Windows terminal is an open source project of Microsoft and it is a modern and nice terminal application to install that that is very easy just open the Microsoft Store and search for Windows terminal I was following this project for some time even when it was in the preview version now they released the version one though that is actually a final stable version and it's really nice they already have announced to improve the functionalities based on community feedback you can also follow this project on github let me just download this software and showed it to you okay so I have no downloaded let's pin this to the taskbar and when you first open the Windows terminal it will open with a default shell and that is the power shell but you can also open different terminals or shells when you click on the arrow here and you can see you can select you command prompt an Ubuntu shell and also the Ezreal cloud shell so when you click on Ubuntu it's just starting the windows subsystem for Linux and opens a terminal so that actually looks exactly the same like the default terminal but the Windows terminal offers use some features like the tabbing or also some tiling windows that you can just open and do things in parallel so that is really useful I think and you can also customize this application a lot so let me show you how to do that just click on the arrow and you click on settings so now adjacent file will open and you can open this with any text editor now let me just open this with the notepad text editor and you can see this is a configuration file of the windows terminal so if you want to change anything in here you can add changes to the default sections or that will apply to all profiles or you can make changes only to specific terminal profiles note you shouldn't change that identifier here because that is unique for your system so don't overwrite this idea otherwise you will break the windows terminal and it doesn't really work okay so we will have a look at this later so first I want to replace the default and boring bash terminal shell in the Windows operating system and replace this with the zsh terminal so the SH is a nice terminal you can change the look and feel of it you can also install custom themes a way you can actually customize every single bit of this stuff and I want to install the basic zsh shell but let's do this step by step so first we need to install a different font that will render some nice icons files so to do that go to the home page not fonts calm and you can see these fonts actually consists of some icons these are called power line symbols and also other things so they are really cool and have a nice look and feel to do that go to the download section and then you can basically just select a font you like so note that not all of them work very well with the zsh theme I'm downloading later but for example I'm using the enormous nerd font here but you can also try out different funds so let's just try this droid sans' mono nerd font click on download and just open the folder so now we need to extract the archive extract all extract and then we need to install all of these fonts in the windows system so that the windows terminal will actually be able to render these fonts click on install and once they are installed you can select one and you need to note this name here we will need to use this name later in the configuration file so write this down okay now we need to install this H on all windows subsystem for Linux to do that first update all your package sources I also have some packages that can be upgraded but I will do this later just install sudo apt install this H - white and hit enter so this will install the CS h shell and once this is installed we need to replace our default bash shell with a new GH shell we have just installed this can be easily done by installing the Umayyads h extension to do that just copy this command here you can find it on my berlin blog article and hit enter so this is just cloning the oh my Z's H git repository in your personal folder once you have done that it will ask us do you want to change your default shell to this age just enter yes and we will need to enter our password here and now this is installed so this is an easy method to customize the gh shell because when you have just installed the Sh it really doesn't look nice so this is just the default look and feel of this zsh shallow so this is almost more boring than a default better I would say but you can customize almost every thing with it to do that we will install a custom theme that will change the complete look and behavior of this to do that just enter this command here you can also find this in my written blog article and hit enter so this is cloning the power level 10k theme for the DS h terminal now we need to replace our default theme with the new power level 10k to do that we need to edit the Z's HRC file in our personal folder just open a text editor I'm using vim but you can also use Nano if you're not familiar with vim or something else of course and edit in your personal folder the fire dot the zsh RC so when we open this file here's basically our configuration and you can see in the second configuration line here the zsh theme there is a default one Robbie Russell is the default theme so let's replace this with the power level 10k theme if you have downloaded and installed power level in a different folder you of course need to specify this folder here so let's write this file and now we need to reload the terminal so I'm just exiting it and start a new open two terminal and when you have changed the theme and started this the first time there is a configuration wizard so now you can adjust the fonts and check if everything is alright but you can see does it look like a diamond no not really that is because the Windows terminal doesn't render the font that DSH is or power level 10 is using in this terminal so we need to change the Windows terminal configuration and change the default font to the Northland we have just installed to do that just let's quit this window here so so if you have done something wrong you can just reset this and start the configuration with it again let me also show that later first let's go to the settings file and open this with a text edit one and now we need to replace the default fund in our Ubuntu profile so to do that just add a new line yeah and type in font face and now we need to put in the name the exact name we have just looked up in the Northland so this is droid sans mano notch font so don't put a comma at the end so the last line doesn't need to contain a comma otherwise you will get an error let's save this and now you can see a lot of things have changed so this is actually looking a bit better now you can also customize this let's just restart the configuration wizard of Paulette attempt to do that just enter p10 k and you can see with the configure parameter we can run the interactive configuration with that again you can do this all the time when you want to change the look and feel of this theme so let's just do that with configure I should write it correctly of course okay so this now looks like diamonds hope we can just hit enter yes does this look like a lock I think yes so we enter yes this is a logo so that can now happen so some of these logos actually doesn't fit very well but I found all that really doesn't make any difference so you can just enter yes on all that I I didn't had any issues with that so now we can choose do we want the classic logo rainbow look and so on can really use anything you want I mean I like the rainbow most and this year the Unicode and no extra time but you can do anything you like I'm using the slanted here and the sharp one here I like it this way let's just configure that no you can't configure two lines of one lines if you see that in some time that some people are using these two lines look but I don't like it so much I'm using just one line in a compact view and I like many icons I think that really looks nice and let's hit the one for Cronkite's and now you can basically just change the look and feel if you want to place this on every line or just when you're entering a command I'm saying no because I like that look the most just have a look at the different options and select whatever you like or what makes more sense for you but this configuration wizard is really nice apply changes to the SHRC yes so you need to do that and you can see now this look has changed to whatever we have configured here but the default colors actually doesn't look nice to be honest so to change the color schemes you also need to do this in the Windows terminal so just go to settings open this with a notepad and at the end you see something like this you add color schemes to this array so now you need to define all color schemes yourself but as I said at the beginning of this tutorial I already have installed a theme and color scheme that you can use so just open this git repository here excite UK dot files and you can find all my configuration files so I will add much more here so I've just added the windows terminal configuration files I'm using but yeah I try to extend that in the future so to make anything available to you so just have a look at the settings dot Jason and this is my configuration file I'm currently using so you can also see I've done some customizations to the shell to make it transparent so let's also copy these things and we need to place them here so in this windows subsystem for linux part here make sure you remove the comma at the end otherwise it will break and now when you scroll down you can also find my default color schemes I have created myself so that was a lot of work to find out all the colors and probably I will also do some adjustments to them in the future just copy everything and put this into the color scheme so hit an enter and you also need to make sure that you follow the correct syntax or remove the comma at the end but that should work fine so the name of our color scheme is accept just copy this and you can also add this to the Ubuntu terminal here so just type in color scheme exit and save this file so now you can see the colors have changed and that is basically what i'm using my default Windows operating system for my windows subsystem for Linux and version tools so that is basically the same configuration so what is not working as a transparent look here because this is a virtual machine and that probably is because of these graphics drivers issues but I can show you this on my Windows operating system where I've set it up the same way so this is how it looks on my main operating system so when I exit this yeah so on my main Windows operating system it has this transparent look so what I've also changed is this icon here and let me show you how to do that because you can replace these icons with custom ones as well if you want to do that just go back to our test system to change the default icon you need to open your user folder so go to users your user name then go to the app data folder local and search for packages and then you need to search for Microsoft Windows terminal so it should be some where here here my Microsoft Windows terminal open this and then you can go to the roaming State folder and I've just downloaded a simple terminal I can put this here and now let's copy the name of this young coach - terminal dot PNG to change that I can just enter a new line enter icon m/s dash F data make sure these are three slashes roaming and put in the name of the icon click on save and you can see it here's our new icon so this is just a default one can also change the name of this year so many or change the name to this year and save this you see you can just customize anything here so it's really nice so now our terminal just looks better if we now open a new tab you can see the PowerShell is still or default to change that just go to the configuration file copy the identifier of your windows subsystem for linux profile and put this into the default profile here just click on save and let's just close their complete terminal application and open this again and you can see it's now starting with the windows subsystem for linux shell as the default one and that actually looks much better than our boring default terminal on your system you probably will also have the transparent look I unfortunately cannot show here but but it's much better than the d4 terminal so we have changed the look and feel of this but I've also promised you to change the behavior so increase the functionalities with custom plugins and DSH has a lot of great plugins already or built into the Oh mais eh configuration application so let's go to our personal folder and enter the - all my this edge folder and if we enter LS you can see all these folders let's go to the plugins folder and hit LS you can see there are a lot of plugins you can enable so if you want to enable anything here you can just use the name and open your zzh or ceasefire and when you scroll down there is this here plugins equal and then it's loading the get plugin by default and if you enter a space you can enter much more plugins here that are loaded when this terminal opens so that is really nice let me also show you how to install custom plugins because these are just the default ones that comes with the Oh mais eh shell but I've also found a nice plugin that adds a better autocomplete functionality so that is really nice it's based on your history so this is a plug-in here this is really nice just copy the link and you will also find an installation instruction here how to install that you can just use this command here and that will automatically clone the repository and place this in your custom plug-in folder so just copy this here and enter this command here and once this is cloned you need to load this so just open our ZZZ HRC file again let's add the Z's h-dash out of suggestions right this fire and now we need to also reload our terminal again so let's LS or personal folder for example dot or my Z is H and we enter LS again it will auto suggest us our last comment we have used and with the arrow keys you can just complete this so this helps me a lot when using a terminal so this is really nice you can also add many many other plugins just google them find out some interesting things and try them out so this is basically how you extend the boring terminal in transform this into something really awesome you can add so many powerful things you can customize anything you want and I think this H is really nice shell and you can also use this in an easy way with windows terminal and make this work properly with windows subsystem for Linux ok guys so I hope you like this tutorial and you know how to make your windows subsystem for Linux terminal just awesome with these nice extensions so please also leave me a comment if you found out some interesting zsh plugins that I probably should cover on my next videos or you just want to show me what you found out and don't forget to hit the like button so this will help my youtube channel grow and also join our discord server this is still a relatively small community but it gets more interesting when people are joining and just connect with people who share the same interest like you okay guys so thanks everybody for watching enjoy the rest of your day take care of yourself and Su Su [Music] you
Info
Channel: Christian Lempa
Views: 141,158
Rating: undefined out of 5
Keywords: linux, python, cloud, networking, wsl, wsl2, zsh, oh-my-zsh, powerlevel10k, nerd-fonts, nerdfonts, windows, windows subsystem for linux, windows subsystem for linux 2, powershell
Id: 235G6X5EAvM
Channel Id: undefined
Length: 22min 46sec (1366 seconds)
Published: Sun Jul 05 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.