Did you ever imagine that you can update or install Windows Subsystem for Linux with a single command line? It is now officially available, using which you can install WSL easily on your Windows 11.
How to install Windows Subsystem for Linux on Windows 11
Earlier, the process to install Windows Subsystem for Linux is too complicated, involving many packages. You need to work around multiple settings and install WSL on your PC. Microsoft has now eased the process, and it is just a command away.
You can just enter a command and let the command take care of the entire process of installing Windows Subsystem for Linux on your PC. All you need to have is an account with administrative privileges, joined in the Windows Insiders Program on Windows 11.
To install Windows Subsystem for Linux (WSL) on Windows 11,
- Run Command Prompt as an administrator
- copy/paste the command wsl.exe –install and press Enter
- Restart your PC to make the installation ready for use.
To get started, open Command Prompt with administrative privileges from the Start menu and enter the following command, and press Enter.
wsl --install
Now, the command will enable the WSL and Virtual Machine Platform components on your PC, eliminating all the manual steps that will install WSL. Then, it will download and install the latest version of the Linux kernel and then Linux distribution. You will see the status on Command Prompt window. When it is done, restart your PC with Windows Subsystem for Linux (WSL), read to use.
It will take a few minutes to open the WSL for a time after the installation as it needs to decompress files and store it on your PC. When the process is completed, create a user account for your WSL. After that, you would be able to open it in a jiffy.
How to see a list of available Linux distributions
In addition to the command to install Windows Subsystem for Linux (WSL) on your PC, there are a couple more commands that let you see the complete list of Linux distributions that are available to install on your PC.
To see them, open Command Prompt with administrator privileges and type the following command and press Enter:
wsl --list --online
It will show you the list out of which you can choose a version to install using the following command, where you have to replace the distribution name with the one you see in the list.
wsl --install -d <Distribution Name>
This command will stop installing the default version of Linux distribution and start installing the selected one. It can also be used to install additional Linux distributions to the existing installation. To see the Windows Subsystem for Linux status with general information of the configuration, distribution type, default distribution, kernel version, you can use the following command.
wsl --status
It will display all the information about the WSL on your PC.
How to manually update Windows Subsystem for Linux
There are commands available that can be used to update your WSL Linux kernel or roll back and update to the previous one.
To manually update the Windows Subsystem for Linux, type the following command in the Command Prompt and press Enter.
wsl --update
How to rollback Windows Subsystem for Linux
To roll back an update to the previous version, use the following command.
wsl --update rollback
These are the various commands which can be used to install Windows Subsystem for Linux (WSL) on your PC, see the list of available Linux distributions, update or roll back the updated WSL.
These commands are usable not only on Windows 11 but if you are on the Windows Insiders Program and have a preview build of Windows 10 OS (build 20262 or higher), you can use the commands to get all the above functionalities on your Windows 10 PC.
What can I do with Windows Subsystem for Linux?
With Windows Subsystem for Linux installed on your PC, you can use command-line Linux tools and apps along with the existing Windows tools. You can access all the files from the WSL using commands.
How do I manually install WSL?
You can install WSL on Windows 11/10 in two ways. The good-old method where you have to download all the installation packages, enable Virtual Machine Platform components on your pc, etc. Now, if you are on the Windows Insider Program and are in line with the latest builds of Windows 11/10, you can install using a command.
Related read: How to install Windows Subsystem for Linux 2 on Windows.