How to Install Windows Subsystem for Linux in Windows 11

How to Install Windows Subsystem for Linux in Windows 11

How to Install Windows Subsystem for Linux in Windows 11 Linux is a family of open-source operating systems. They are based on the Linux kernel and are free to download. Installing WSL was a complex process of manually activating some services and downloading and installing programs without much help from Windows. Microsoft has made it easier than ever to access Linux right from Windows 11. WSL originally provided access to Linux command-line interfaces, which was probably okay for experienced users but was unlikely to make the operating system more accessible to newcomers. That changed, and now it possible to use Linux graphical user interface (GUI) apps in Windows. Before we start please like the video and subscribe for more tech videos like this. It will help us a lot. Here's how to get started with Windows Subsystem for Linux on Windows 11. To install a Linux Subsystem you will need to Launch either PowerShell or Command Prompt as the system administrator. This is most easily done by searching for PowerShell or Command Prompt in the Start menu. Whichever option you choose, you cannot install WSL as a normal user on Windows, so do not press Enter to launch the command line. In the search results, click "Run as administrator". Before we install the Linux subsystem let's talk about some important pieces of information. Ubuntu is a standard Linux distribution that is installed with the Windows subsystem for Linux, but it is not the only Linux "flavor" that supports Windows 11. There are two ways to install alternative Linux distributions with their own default user interfaces, pre-installed utilities, and other features: via the command line and through the Microsoft Store. Enter the following command: wsl --list --online The wsl part of the command indicates that we are using the Windows Subsystem for Linux, the list is a list of supported Linux distributions, and the online specifier indicates the distributions Microsoft offers rather than the ones we already have running on our PC. This command should return a list of distros that can be installed via the command line. To install a distro from this list we can write the following command: wsl --install -d and the name for the distro. Example: If we want to install ubuntu 16 we will write: wsl --install -d ubuntu-16.04 But for now let's install the default linux terminal on Windows. So we will use the command: wsl --install You might bet an error that say: "The requested operation requires elevation If you enter wsl --install and see an error like this one it because you are not running PowerShell or Command Prompt as an administrator, and you will need to do so if you want to install WSL. Please check the first step we showed in the video. Now let's fix this. I have started PowerShell with administrative access. Assuming you launched PowerShell or Command Prompt as an administrator, that command "wsl --install" should automatically enable the services WSL relies on, download the utility, and install everything it needs to function without any further input. It also downloads and installs Ubuntu, a popular Linux distribution that can be found in everything from single-board computers to enterprise-class servers, by default. You will have to wait until all of the processes will finish. For me, it took around a few minutes. I will fast forward this process so you will not have to wait. You can put the video on pause and after you have received this message you can start again. Now the operation has been successful. You will need now to restart the computer. Let's restart the PC. For me, it did also some updates so it took a bit more time to finish. After the updates are done and the PC is restarted the install process for Ubuntu will start. If you get this error it might be possible that you do not have enabled virtualization from the BIOS. You need to check how you can add this to your PC. Now let's restart and see how the process will work if there is no error. Installing is in progress. Now write a username and a password. The Linux system has been installed. In the next part of the tutorial, I will show you how you can run Linux GUI apps and how to install them. We will use Ubuntu as the Linux distribution in this video but you can use any distribution from Windows Store. The ability to run Linux GUI apps requires the Windows Subsystem for Linux 2 integration, which means that you need to have the latest version of the feature and distribution to install and run your applications. If you have WSL2 already installed, then you will need to update the feature. Before installing or updating WSL2, the device will need to be running build 21364 or higher. If you are not, use these steps first to enroll the computer in the Windows Insider Program to upgrade the system to the latest build in the Dev Channel, and then continue with the steps below. Also, as a prerequisite, you also need to install the preview driver to enable a virtual GPU (vGPU) to use hardware-accelerated OpenGL rendering before installing applications. Searching for PowerShell or Command Prompt in the Start menu. In the search results, click "Run as administrator". Type the following command to update the Windows Subsystem for Linux 2 and press Enter: "wsl --update" After this type the following command "wsl --shutdown" to force restart WSL2 and press Enter. Now the system has been updated. Now let me show you an example of how the GUI apps will look on Windows 11. On the PowerShell or CMD write ubuntu. You will be logged into the terminal from ubuntu. If you are the first time using opening ubuntu you can type the following command to update the package distribution "sudo apt-get update"; Press Enter. It will take a bit of time until you get it updated. Now to install a Linux GUI app on Windows 11 write the following command: "sudo apt-get install APP-NAME -y" For the app name, we will use gedit Confirm your Linux account password and press Enter. Now press on Y from the keyboard and hit enter The app will be installed. Please have a bit of patience as this will take a bit of time. Once you complete the steps, the app will install and register in the Start menu, which means that you can launch the app by running the name of the app in the Windows Subsystem for Linux (WSL) console or from the Start menu. Let's open the app. We will type on the command prompt gedit. You see here the app running from Ubuntu. Now let's close it. If we open the start menu we will see on recommended some apps from Ubuntu. Click on More. Here we have the Text Editor we just installed. So if we click it from the start menu it will open without the console. The good news is that the installation process is the same as any other Linux application, so you can follow the developer steps to install virtually any application, such as VLC, Audacity, web admin, etc. So practically you will be able to run any app from Linux in Windows 11. If you want to support us please give us a like and subscribe to the channel for more videos. How to Install Windows Subsystem for Linux in Windows 11 Linux is a family of open-source operating systems. They are based on the Linux kernel and are free to download. Installing WSL was a complex process of manually activating some services and downloading and installing programs without much help from Windows. Microsoft has made it easier than ever to access Linux right from Windows 11. WSL originally provided access to Linux command-line interfaces, which was probably okay for experienced users but was unlikely to make the operating system more accessible to newcomers. That changed, and now it possible to use Linux graphical user interface (GUI) apps in Windows. Before we start please like the video and subscribe for more tech videos like this. It will help us a lot. Here's how to get started with Windows Subsystem for Linux on Windows 11. To install a Linux Subsystem you will need to Launch either PowerShell or Command Prompt as the system administrator. This is most easily done by searching for PowerShell or Command Prompt in the Start menu. Whichever option you choose, you cannot install WSL as a normal user on Windows, so do not press Enter to launch the command line. In the search results, click "Run as administrator". Before we install the Linux subsystem let's talk about some important pieces of information. Ubuntu is a standard Linux distribution that is installed with the Windows subsystem for Linux, but it is not the only Linux "flavor" that supports Windows 11. There are two ways to install alternative Linux distributions with their own default user interfaces, pre-installed utilities, and other features: via the command line and through the Microsoft Store. Enter the following command: wsl --list --online The wsl part of the command indicates that we are using the Windows Subsystem for Linux, the â€Å“listis a list of supported Linux distributions, and the online specifier indicates the distributions Microsoft offers rather than the ones we already have running on our PC. This command should return a list of distros that can be installed via the command line. To install a distro from this list we can write the following command: wsl --install -d and the name for the distro. Example: If we want to install ubuntu 16 we will write: wsl --install -d ubuntu-16.04 But for now let's install the default linux terminal on Windows. So we will use the command: wsl --install You might bet an error that say: "The requested operation requires elevation If you enter wsl --install and see an error like this one it is because you are not running PowerShell or Command Prompt as an administrator, and you will need to do so if you want to install WSL. Please check the first step we showed in the video. Now let's fix this. I have started PowerShell with administrative access. Assuming you launched PowerShell or Command Prompt as an administrator, that command "wsl --install" should automatically enable the services WSL relies on, download the utility, and install everything it needs to function without any further input. It also downloads and installs Ubuntu, a popular Linux distribution that can be found in everything from single-board computers to enterprise-class servers, by default. You will have to wait until all of the processes will finish. For me, it took around a few minutes. I will fast forward this process so you will not have to wait. You can put the video on pause and after you have received this message you can start again. Now the operation has been successful. You will need now to restart the computer. Let's restart the PC. For me, it did also some updates so it took a bit more time to finish. After the updates are done and the PC is restarted the install process for Ubuntu will start. If you get this error it might be possible that you do not have enabled virtualization from the BIOS. You need to check how you can add this to your PC. Now let's restart and see how the process will work if there is no error. Installing is in progress. Now write a username and a password. The Linux system has been installed. In the next part of the tutorial, I will show you how you can run Linux GUI apps and how to install them. We will use Ubuntu as the Linux distribution in this video but you can use any distribution from Windows Store. The ability to run Linux GUI apps requires the Windows Subsystem for Linux 2 integration, which means that you need to have the latest version of the feature and distribution to install and run your applications. If you have WSL2 already installed, then you will need to update the feature. Before installing or updating WSL2, the device will need to be running build 21364 or higher. If you are not, use these steps first to enroll the computer in the Windows Insider Program to upgrade the system to the latest build in the Dev Channel, and then continue with the steps below. Also, as a prerequisite, you also need to install the preview driver to enable a virtual GPU (vGPU) to use hardware-accelerated Open GL rendering before installing applications. Searching for PowerShell or Command Prompt in the Start menu. In the search results, click "Run as administrator". Type the following command to update the Windows Subsystem for Linux 2 and press Enter: "wsl --update" After this type the following command "wsl --shutdown" to force restart WSL2 and press Enter. Now the system has been updated. Now let me show you an example of how the GUI apps will look on Windows 11. On the PowerShell or CMD write ubuntu. You will be logged into the terminal from ubuntu. If you are the first time using opening ubuntu you can type the following command to update the package distribution "sudo apt-get update"; Press Enter. It will take a bit of time until you get it updated. Now to install a Linux GUI app on Windows 11 write the following command: "sudo apt-get install APP-NAME -y" For the app name, we will use gedit Confirm your Linux account password and press Enter. Now press on Y from the keyboard and hit enter The app will be installed. Please have a bit of patience as this will take a bit of time. Once you complete the steps, the app will install and register in the Start menu, which means that you can launch the app by running the name of the app in the Windows Subsystem for Linux (WSL) console or from the Start menu. Let's open the app. We will type on the command prompt gedit. You see here the app running from Ubuntu. Now let's close it. If we open the start menu we will see on recommended some apps from Ubuntu. Click on More. Here we have the Text Editor we just installed. So if we click it from the start menu it will open without the console. The good news is that the installation process is the same as any other Linux application, so you can follow the developer steps to install virtually any application, such as VLC, Audacity, web admin, etc. So practically you will be able to run any app from Linux in Windows 11. 

No comments