Windows Terminal: Finally!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
- Now this is an application that I'm really excited to share with you. Microsoft have recently released their Windows Terminal application. This is fantastic, especially in combination with WSL version two. This is a free application available in the Microsoft Store written by Microsoft that allows you to interact very easily with Windows PowerShell, the Windows command prompt, as well as your virtual machines running within WSL version two. It also allows you to do many other things, such as SSH-ing to servers or routers or switches. Or Telnet-ing to those devices. You can actually configure it to SSH from Windows or use one of your virtual machines running within WSL version two to SSH to devices. Fantastic development from Microsoft. It's really nice to see how thing's have changed at Microsoft, and how they are now releasing open source applications such as Windows Terminal. But rather than me just talking about this application, let me demonstrate what's possible. Let me show you how to configure this. How to change options such as copy and paste. How to add a background image and many other things. Okay, let's get started. (energetic music) Now in this demonstration I'm using this Windows 10 laptop. I'm controlling it using VNC from my Mac. That just makes it easier to do the recordings, but I'm doing everything on this Windows 10 laptop. Now in the bad old days, if you wanted to SSH to a server or to a device, you could use an application such as Putty. Windows didn't have SSH built into it. So I'd have to use an application like Putty to SSH to, in this example, a Cisco router. I have to accept the public key and then I'll be able to log in as an example, to my Cisco router. So as you can see here, show version shows me that I'm connected to a Cisco1941 router. You do something similar if you wanted to SSH to a Umbuntu server, as an example. This software is really, really old, and hasn't been updated for many, many years. Now Microsoft has started supporting SSH within Windows 10. So if I open up a command prompt and type ssh, I could actually SSH directly to a device. So, I could use a basic command prompt like this to SSH to a device. But notice I have a traditional command prompt or CMD prompt running here. If I want to use PowerShell, I'd open up a separate terminal and now I have PowerShell running. But I don't have a tabbed solution. Well, that's until very recently. As mentioned, Microsoft have released the Windows Terminal application. This allows you to run PowerShell, Command Prompt, and various other terminal connections in a tabbed application. So, as an example, this is Ubuntu 20.04 running within WSL version 2. Here's Unbuntu 1804. So the command lsb_released -a shows me that this is Ubuntu 1804. So notice, Windows PowerShell, Command Prompt, this is the traditional Command Prompt that's been around in Windows for many, many years. IP config shows my IP address on my Windows 10 laptop, as an example. Here I've got Ubuntu 20.04 running within WSL version two. And here I've got 1804. But you can customize this application very easily by going to Settings. I've opened up the settings.json file within Visual Studio code and notice many, many options are available here for customization. And you can click on the links within that json file to see the documentation for Windows Terminal and how to configure, for instance, global settings, or profile settings, or color schemes, or key bindings and a whole bunch of other things. So the documentation explains very clearly how you can configure things but I'm gonna demonstrate some of these options now because I want to show you that you can also use Windows Terminal to SSH to network devices. In this example I'm gonna SSH to a Cisco Nexus device hosted by Cisco in the cloud. So, I am SSH-ing from here in the UK to probably somewhere in the US where this device is hosted. So, as an example, show version shows me that this is a Nexus 9000v. I added that myself, and I'll show you in a moment how to do that. So, by clicking on this little down arrow, I can add a whole bunch of options to Windows Terminal. You could, as an example, connect to Azure. I could Telnet to a device. So, this is using Windows to Telnet to a router. Now Generally you don't want to use Telnet because it's insecure. The passwords can be hacked. But I wanted to show you that it is possible to use Telnet within this application. So, I'm SSH-ing to a Nexus device. I'm Telnet-ing to a Cisco router. I could SSH to a Cisco router. And notice here, I've done some customization where I'm showing an icon or a picture. So I can log in to the Cisco router. Which is a Cisco1941 router within Windows Terminal. That SSH session is using Windows, but you can actually do very clever things. As an example here, I'm going to use Ubuntu 20.04, which is a lightweight virtual machine running within WSH version two running on Windows to SSH to the same router. So I'm using Ubuntu now to SSH and not Windows. So, this session is SSH-ing from my Windows laptop to a Cisco router. This session is using an Ubuntu virtual machine running WSL version two. It's actually this 20.04 LTS Ubuntu virtual machine running within WSL version two to SSH to the Cisco router. A whole bunch of options are available here. No longer do you need to use Putty. You can use this free tabbed application from Microsoft to make SSH or Telnet connections to routers, switches, servers, et cetera. This application supports a whole bunch of key strokes. So, as an example, Control + Shift + W closes tabs. So, Control + Shift + W. Notice I'm closing my tabs. And I've only got PowerShell now. I can open tabs by using this number. So, as an example, Control + Shift + 1 opens PowerShell but Control + Shift + 2 opens this Windows PowerShell using customized colors. Hence, I've called it MyColors. I've customized the colors. Control + Shift + 3 would open up a Command Prompt as an example. So, notice this is traditional Command Prompt. And I can do the same thing to open any one of these other sessions. So, Control + Shift + 9. I'm SSH-ing to a Cisco 1941 router. I've also customized the prompt with an image on the bottom right here, and I could log in to my Cisco router. I can also use Alt + Shift + Plus to open the default application which in my example is PowerShell and open Windows this way. Alt + Shift + W will open another window that way. Control + Shift + W will close the tab, so I'll go back to my original tabs. Once again, in the settings, I can specify a whole bunch of options including the default profile that gets opened when I use those keystrokes. So, what's gonna be opened when I press Alt + Shift + Plus? It's going to be PowerShell because notice this guid is the default profile that gets opened. I can create multiple profiles. This is a default one. This is my default PowerShell over here. And I'll just close some of these tabs. Here is the Windows PowerShell with MyColors. The default versus MyColors. And what I did, is I created this. So, I simply copied the default. This is in json formatting, so this is a nice way to learn json as an example. I simply copied that and then I created this, and notice I changed the name to this. That's what's displayed over here. The command I'm gonna run is powershell.exe. I'm not hiding this tab. The color scheme is different to the default color scheme. I'm using Campbell Powerhell color scheme. And you can see all those details once again, in the documentation. So, under Profile settings, you can see what the unique identifier is, what the executable is that's gonna be run, as an example CMD. You can see dropdown setting options. Such as the name, the icon used. So, once again, going back in here the icon that I used is test.ico in the temp directory. Now I simply used a darker icon here. Now, that's just to show you an example. You probably want to use something better than that. But notice this little icon is showing as a darker icon because that's what I selected over here. ColorScheme is Campbell Powershell. So hence, the color is blue rather than black. Lots of customization options. The reason that this shows as the second option in the dropdown is because it's in the second place in the json file. So it's Windows PowerShell and then Windows PowerShell MyColors. Then it's the default Command Prompt. And then we have dynamic entries. These were created dynamically because I'm using WSL version two and I installed these operating systems. So, as an example, if I search for Ubuntu, I have Ubuntu, I have the Ubuntu 20.04 LTS app and I have the Ubuntu 18.04 LTS app. I got these from the Microsoft Store, which is where you get Windows Terminal. Windows Terminal is free. So if you just search for Windows Terminal, you'll be able to download this. It's only about 6MB in size, so very, very small. Mine's already installed here, as you can see, so I can simply launch it. But, all you need to do is click Get, and then click Install to install this application very easy to install. So these are dynamic entries. These are virtual machines running within WSL version two. Windows terminal is automatically updated because I installed these applications. I've also got the default of Azure and then here I've got my own entries that I created. Such as SSH-ing to a Cisco Nexus device. So, back in Windows Terminal, click on the down arrow here, notice SSH to Cisco Nexus. I've specified the name of this entry as well as the tab title. The command that I'm running here is SSH-ing to a device on the internet. This is a Cisco device, once again, hosted by Cisco, on port 8181. That is literally using the ssh command that is available in Command Prompt. So this is a Windows SSH to that device. Here I'm doing something very similar. I'm SSH-ing to a Cisco 1941 router. So, back in Windows Terminal, notice that's this entry. But what I'm also doing here is specifying the command which is ssh, and I'm adapting the security protocol used. Cisco devices use older encryption algorithms so I'm telling Windows Terminal to SSH to that device using aes256 encryption. The user name is wsl2 and this is the IP address of my router. If you don't specify the cipher used, the connection will be refused. So you have to specify the cipher here. I've also specified the background image, which is temp\1941v3.jpg. So, that's this little image here. That is the image that's displayed when I open up that tab. So, SSH to 1941 router. Notice, there's the image. The SSH session is permitted even though an older cipher is used. I'm not stretching the image. If I didn't specify that option, the image would be stretched across the terminal. I'm putting it in the bottom right and I'm specified how opaque that image is. This is in a value of 0 to 1. And this is another reason why I really like Microsoft Visual Studio. Notice it gives me options. So, if I press Enter here and double inverted commas, notice I see all the options that are available to me. And I can simply add them. Much easier than trying to do this in notepad or something else. Here I've got an Ubuntu SSH connection. So, notice here I'm starting WSL. This is not using SSH in Windows. This is using SSH within this Ubuntu virtual machine running within WSL. So, I'm running Ubuntu. I'm SSH-ing to the device. And notice I'm specifying my algorithms, such as diffie hellman, group1 shal 1. I'm specifying the encryption, which is aes128. Specifying my user name and the IP address of the device that I'm gonna SSH to. So, once again with Cisco devices you need to specify your ciphers otherwise the connection is refused. And lastly I've got a Telnet session to that router. Notice the command used is telnet and the IP address of the device. So, Windows Terminal gives you a lot of options. Once again, I'm SSH-ing to a Cisco router here. I've specified a background image. From this PowerShell I've changed the colors. I've also changed the icon. In this example I'm using an Ubuntu virtual machine running within WSL version two to SSH to a Cisco router. So many options available in this application. And I'm only just talking about some of the options. There are many, many options available. Have a look in the documentation if you want to customize this even more and learn about options that you can change. One more that I'll mention, which I forgot, is I wanna copy text when it's selected. Because I'm used to doing that with Putty. By default, that's set to false. But notice here, I just copy this and then right-click. It's automatically copied and pasted. So, select it to copy. Right-click to paste. That works because I set Copy On Select to true. There are many, many options available in this application, but I'm hoping that this gives you a taste of what's possible. Now, if you've enjoyed this video, please don't forget to like it. Please don't forget to subscribe to my YouTube channel. And please click on the bell to get notifications. I'm David Bombal and I want to wish you all the very best. (energetic music)
Info
Channel: David Bombal
Views: 391,675
Rating: undefined out of 5
Keywords: windows terminal, powershell, microsoft, windows subsystem for linux, new windows terminal, microsoft build, windows 10, windows, terminal, wsl, command prompt, wsl2, linux, wsl 2, ubuntu, vscode, command line, ubuntu 20.04, linux on windows, windows subsystem for linux 2, microsoft windows, wsl 1, ubuntu on windows, windows bash, windows update, windows 10 wsl 2, #wsl2, windows subsystem, ubuntu linux, how to install wsl2, windows 10 linux, subsystem for linux, wsl 2 windows 10
Id: uWNpXOT-Zbo
Channel Id: undefined
Length: 17min 4sec (1024 seconds)
Published: Fri Jun 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.