In-Depth WSL2 Terminal Customization (OhMyPosh + Windows Terminal!)
3K views
Jul 14, 2022
Learn how to customize your terminal like a pro. The Complete WSL 2 Course on Udemy: https://www.udemy.com/course/the-complete-wsl2-course/?referralCode=416CFE2149DDEA06F34E Article: https://www.ceos3c.com/wsl-2/windows-terminal-customization-wsl2-deep-dive/#part-1-install-zsh-on-wsl2 Stamps: 00:00 Intro 00:40 Terminal Customization ⮘-=[⭐All important links in one place⭐]=-⮚ ↬ https://linktree.stefanrows.com ⮘-=[⭐Book a one-on-one Mentoring Session⭐]=-⮚ ↬ https://calendly.com/stefanrows/ ⮘-=[⭐All the stuff I use | Stefan's Amazon Store⭐]=-⮚ ↬ https://www.amazon.com/shop/ceos3ctutorials ⮘-=[⭐Join this channel to get access to perks⭐]=-⮚
View Video Transcript
0:00
Oh, hey
0:14
What are you guys doing here? I just took a little break and now you are here
0:24
Oh, I remember. I promised you to deliver that WSL2 customization. video last week, but I didn't
0:33
So, well, that explains why you hear now. So we might as well do it
0:38
So let's go. All right, guys, let's dive right into this. As always, I provide a written tutorial on Seosak.com that you can open up while following
0:50
through with this tutorial. Just head over to Seosac.com and search for the article
0:55
Or just click in the link in the video description below to open that up
0:59
Since this is a three-part series now we pick up where we left off if you want to check out the other videos where we were learning how to install Windows Terminal with WSL2 as well as Windows Terminal basic customization for Windows Terminal where we don't go into any depths with ZSH and stuff like this
1:22
And this is the third part of the series where we will cover more in-depth customization using Oh My Posh
1:27
initially I wanted to show you guys how to use oh my set as age
1:32
which is like a all in one framework using set as age but I just discovered oh my posh through a comment
1:41
on an article that I've written about Windows terminal on my blog and somebody pointed out to check out
1:48
oh my posh and I did check it out and I really really liked it
1:53
I think it's basically a similar thing than or like oh my status age. It doesn't come with all those or with the installation routine that
2:03
all my status age provides. But I really liked it because it's clean, it's easy to install and
2:10
there are a ton of themes that you can choose from and all of them look really, really great
2:15
So I thought, why not show you guys something newer that you might have not seen yet
2:19
Because Omisatis Age has been out there for quite some time and probably a lot of you have
2:24
seen it already. So I thought, let's show you guys something new
2:27
So in today's video, we will look at modifying this terminal to something more beautiful
2:34
And of course, we will also install SATASH. Setus H is a different shell than bash
2:40
It's, in my opinion, once you start using ZSH, there is no way back to using regular bash
2:45
And I think once you start using it, you will understand why things like auto suggestions and stuff like this
2:51
which we will also cover in this video, are just far too convenient to not use them
2:57
I'm definitely all the way in Zed-S-H as of now. And yeah, this is just a little intro to this
3:05
Let's get right on with that. All right. So as I said, I recommend you to open up this article while you're following through this
3:12
tutorial simply because you can go ahead and you can copy and paste the command and the
3:17
syntax that I'm going to use throughout this video. Now, let's get right started with that
3:23
So the first part is install ZSH on WSL2. This is a vanilla Ubuntu 2004 installation that I just spun up
3:32
It just looks like this with the translucent background and stuff like this
3:37
Because I set my Windows terminal up to use that per default
3:42
And this is actually where we stopped the last video. So we can pick right off there
3:47
Okay, so the first thing obviously is pseudo-apped update. Actually, let's follow through with my own tutorial so we can see that it's actually working, right
3:54
So we do a little copy of pasting here. We're going to paste it in there, then we enter the password, of course, and make sure that our repository is up to date
4:03
Then we go and do install ZSH. So we do pseudo-apt install SETSH minus Y to save us an additional click
4:12
And then we have that installed. The next thing we are going to do is we are going to make SETISH the default shell
4:19
And let's do that. There we go. It requires another password entering
4:25
And once we have done that and we actually restart our shell and I just do that by closing this one and
4:32
Reopening it that should do it then we will end up in this selection where we can choose from a couple of options here and as I have written in the article
4:40
You go for option two which is the default option Which creates a default
4:46
SetusH or status hrc config file that we will need to use in a second a clear screen here and I see the into our main director to continue on So the next thing is installing Oh My Posh And you can go to the Oh My Posh website and follow through with their installation routine
5:06
But I've written it down for you here. So you can just as well copy and paste it right from here
5:11
It's exactly the same that they have on their documentation. So choose whatever fits you better
5:16
I'm going to copy it right out of here. So we do this. Boom. This is basically going to download the repository from their GitHub and all the themes
5:30
So this is downloaded. Next thing we do is we give some permissions. Boom
5:35
And the next thing we do is we install unzip because we are going to need that in a second
5:41
And you can also go ahead and copy all of those commands at once, but I want to go through it step by step
5:47
Okay, time for cleaning up. Let's clear up the screen here. And then we do some new directory that's called Poth themes
5:56
Then we W get the latest seams from their website. And as you can see, guys, I'm doing the same that you should do
6:03
I'm just copy and pasting stuff from the article. And this is what I'm going to do
6:08
Moving forward in the future, I will always provide, if applicable, a written article for you guys
6:13
You can easy follow along with my tutorials when I'm doing the videos for them
6:18
Let me know how you like that approach in the comments below please
6:22
Next one, another permissions set for those themes. And then we remove the zip file right here
6:33
Did we just do the right thing? Something just happened. Yeah, no, there we go
6:38
Okay, let's make this bigger so you can actually see something there
6:43
But I was just copy and pasting stuff anyway until now. All right, next up, we need to insert
6:48
some fonts and they recommend those fonts they use those fonts in their theme
6:53
if you go to the oh my posh website and you search for fonts by the way I really
6:58
like this kind of website where this is like the tailwind documentation all of this
7:03
I think it's GitHub pages actually I'm not sure but that you can just search stuff
7:07
and you're directly there so this is really cool it says here oh my posh was designed
7:12
to use nerd fonts so and they specifically use or they recommend the Mislow
7:17
so LGM NF font and once you click on this link you download the zip file I
7:22
provided the link for you here of course this is the link to nerd fonts and this
7:26
is the link to the Mieslo font thingy and then you just simply open up this file and
7:33
unzip it and install it I'm going to show you how by the way I just installed
7:37
Windows 11 yesterday and I'm blown away by how beautiful it is and how fast it
7:42
is compared to Windows 10 so let's just take a second here and appreciate
7:47
How much effort Microsoft put into making Windows 11 more beautiful? And we have all those rounded edges here like on Mac
7:54
Really like that. Just a quick side note. Okay. Then you click into the folder
7:58
Once you have it downloaded, you just right click. And you do unzip somewhere
8:03
Extract all. I did not even install any other 7 zip or something
8:08
Then you click in there. And what I did is just I selected all with Control A
8:13
And then I right click and click install. It's installing all the MISLO LG or whatever
8:17
whatever that font name is, and it installs it right into your system
8:21
and then you have that available to you. Now, the next thing you need to do is we need to set this font to be used in our Windows terminal
8:30
So we do that by clicking on the settings thing here, and then we select the appropriate Ubuntu distribution
8:38
so make sure you select the right one down here. You can also go ahead and change that in the default profile
8:42
but for now we are going to use this one down here. Alright, then we go, I think it's appearance. Yes, it is appearance. And here you can double check the settings that I'm using. I'm using the Tango Dark color scheme
8:55
Or, yeah, it's a color scheme, right? And then we change the font phase and you have to click on show all fonts down below here. And then you select the appropriate font. So I'm using the Mislow-LGM nerd font. As you can see, I use that per default already. So I have it set up everywhere. If you want to do this acrylic thing, I explain it
9:15
the previous tutorials, but just in case you didn't do them, you know. You can set the cursor to vintage to have it looking exactly like I have it
9:23
And the important part then is to enable acrylic and set the acrylic opacity to 0%
9:30
And then you click on save. And once we click on save, we have the Mieslo fonts set up for that
9:38
Okay, you can also obviously choose any other kind of font that is supported with that. If you don't like this one, there are a plethora of fonts
9:45
as a choice as you can see there. Let see where we are in the tutorial I think yeah that the part with the funds So I explained it here too And then we are going to activate oh my posh Okay to do that we need to use nano So we do nano
10:01
Squiggly thing forward slash point, Cells H.R.C. And I'm going to make it bigger again for you because I always forget and you never fail to remind me of that
10:11
I'm not showing you a terminal that is sufficiently big. Okay. And then we just
10:17
scroll down all the way to the bottom until we reach the bottom using our arrow key
10:22
and then just go ahead and copy and paste this both lines from the website right there
10:28
or you just write it there manually if you will and then you just right click and
10:33
that paste it in and then you go where are we yeah then you go up once and then you just
10:39
make a space here just to make it properly properly formatted you know and then you
10:44
press control oh you press enter you press control X to leave nano
10:50
That's also written here probably 100 times throughout this article. So then to actually activate that, we need to do source, set us HRC, and boom, we already have that oh my posh theme, the default theme that is shown to us in the actual oh my posh tutorial
11:12
We have that already activated. You can see. And of course, now we have a little bit of a space problem
11:17
going on here because that's how it's meant to be looking. If you are fine with that default
11:22
theme, feel free to take off now, but I would actually recommend you to stay until we install
11:30
the ZSH auto suggestions anyway because this is a really cool thing. So if you do want to change
11:37
the theme, which is the next part in the written tutorial, you can browse all the themes by copy
11:42
this line of, copying this line of code right into your terminal. This is a simple for loop that
11:47
goes through all the team files that are in this OMP JSON format and you just paste it in
11:54
there and then boom you get all the themes and how they actually look inside of your terminal
11:59
which I found pretty cool it's a really nice thing look at this is like a raster
12:04
a Jamaican thing Jamaican theme looks pretty cool but let's let's follow through with this
12:10
tutorial that we are on the same page there so to change the theme it's super super
12:14
easy. Probably there is even an easier way but this is the way I do it. So we do again
12:19
a nano and we do status HRC and then we go again all the way down to the bottom. And you
12:26
probably guessed it by now but if we want to change the theme to some other theme, the only thing
12:31
we do is we change the name of the theme file here. So in this case I think I choose the half-life
12:37
theme. Oh shit this doesn't work. Okay. So we choose the half-life theme here
12:44
because Mr. Freeman needs some appreciation. So half minus minus life. dot omp.jason is the only thing I changed
12:55
It's the name. Control O, enter, control X, to get out of there
12:59
And then we do another source. And if we would have SETISH auto suggestions activated already
13:05
then we would have a lot of less to type. Now this is the thing
13:10
When you change this out of some reason, it doesn't work for me anymore. like it kind of I don't know what it does but I need to go ahead and restart my
13:19
Windows terminal and then it's applied and we can see this nice lambda sign here
13:23
from Half-Life and that we are in the folder is a pretty minimal shell but it
13:29
gets the point across I think okay guys I think we are already in a good spot and
13:34
this is a pretty nice minimal shell so we have more space I can make the
13:38
terminal even bigger for you and then let's continue on so part six is installed
13:43
more themes for oh my posh I personally haven't searched for other themes out of the
13:49
default themes but I'm sure there are some themes out there that you could utilize
13:53
and how you would install them is very easy you would just cd into this post themes
14:01
folder and in there you do an alS and you see all the themes let's say you would like to clone
14:09
another theme from GitHub the only thing you would do here is clone this
14:13
file is an example file what I put in here that's already existing in here in fact
14:17
let's our m 365 princess and let's assume it's not here and then you can just simply
14:27
clone that right into this directory and if we did it do that repository oh there's some typo in there
14:36
I think okay I have to correct that whatever it would just pull it down from the repository
14:43
and it would put it would pull it in here So I think you get the point It really easy So you just search some other team and you get cloned Unless of course it is a OMP file that you can download or clone
14:56
but you need to put that fall into this filer and that's it. You could also manually go ahead and attach a 365, Princess, OMP, JSON
15:08
or you could just use directly nano to create it. It was one step extra we didn't need to have
15:13
and you just paste this JSON data in here data and then you save it and that would be the same outcome in the end
15:22
alright now to the fun part let's install set as age auto suggestions I explained it here what it does and stuff like this
15:30
so we simply do the official instructions on how to install it which means
15:34
Git cloning this thing down to our system and then again we do a nano
15:40
setus hrc which should be somewhere here there we go and then we need to add some additional code down to the bottom
15:49
and since i like to keep my things organized i commented it for you already so you need to copy that
15:55
and and then again paste it in to the bottom and because we pay attention to proper formatting of
16:01
our stuff we are going to give a little space in oh shit that was not what i wanted
16:07
there we go we put a little space in there and then again control oh enter control x to leave
16:17
and that should work unless you restart your terminal once again as i said sometimes source is
16:24
working sometimes it doesn't but if you go ahead now and you see those are already the auto
16:29
suggestions showing up it already remembers basically where we have been before and it suggests
16:35
us things and if we do that we can also you know get clone it would pull that up again and the more
16:43
you work with status age auto suggestions the more it learns from your behavior for example i'm using
16:48
a ton of like on my actual shell i do a lot of development so i see the into the same folders
16:55
very often and as soon as i type cd it already suggests me where it where it wants me or where it
17:02
things I want to go and this is really useful if you do work a lot with your terminal
17:07
By the way, this is also oh my posh. It's another theme. You find that in the theme selection when you go to their website
17:14
So as I said, guys, this is at least in my opinion, it's really useful
17:18
It's a really useful tool. Definitely I like to have a beautiful shell
17:22
It makes it somehow more pleasant to work with the terminal. I don't like to look at the freaking like a default terminal with a black background that is
17:31
boring. I like it more when it looks visually pleasing. And of course ZsA. Auto Suggestions is a great
17:39
tool that allows you to be more productive in your terminal and I've been using it ever since I
17:45
started using it basically. You can also go ahead and check out the All My Posh website and check
17:50
out the different customizations you can still do. There's a ton of things you can modify even with
17:55
the default themes. You can change colors from each or every element that they have in there
17:59
there's a whole part on configuration on their website which I won't cover in this video because it would be
18:05
ridiculously long to do that it's really easy to modify because it's all JSON data
18:10
so you can just almost say data data again that's not good I don't want to fall into that
18:16
so yeah I think you get the gist of it and I think it's a pretty awesome tool and oh my posh is great
18:24
and as I said if you really would like to have another
18:28
tutorial on all my Zsatis H, just let me know and I will provide that too
18:32
There are a ton of cool ZSH themes out there as well, but this particular repository from
18:40
Oh My Posh, I think they have really beautiful themes that work right out of the box and
18:45
I think why not use that? Why not try it out, right? That being said, I'm not sure what I'm going to do next with the WSL2 tutorial series because
18:55
we basically covered almost everything there is to know. If you have any other topics you want covered in this regard, let me know in the comments below
19:02
Don't forget to give this video a thumbs up if you enjoyed it, of course. And subscribe to the channel if you haven't already, because 92% of my viewers are not subscribed yet
19:13
which is kind of a tragedy, which also is kind of normal, but whatever
19:18
If you want to just hit that subscribe button. And I hope to see your guests back in the next video
19:23
Thanks for watching. Until then, have fun with all my posh and a very beautiful
#Computer Education
#Programming