WSL means Windows Subsystem For Linux. You can use linux on Windows and execute its commands. In this blog, we will see wsl commands and Ubuntu Installation.
Check Before Installation
You need to have Windows 10 (version 2004 and later) and Windows 11
WSL Installation
It is easy to do this via one command
wsl --install
By using this command, you can install wsl features and Ubuntu.
Maybe, you want to install a specific distribution of Ubuntu.
wsl --install -d <any-ubuntu-distribution>
If you want to download the list of linux distributions.
wsl --list --online
wsl -l -o
You can also see whether the distributions you installed are working or not.
wsl --list --verbose
Updating WSL and Checking Its Version
wsl --version
wsl --update
More Options About WSL
You can check options by using below the command.
wsl --help
Removing a Distribution
You can delete your distribution, but you should be careful because most things related to the distribution you want to delete will be removed.
Please check the reference: Removing a Distribution
wsl --unregister <installed-distribution>
Limiting WSL’s Resource Usage
First of all, you need to create a wslconfig file as below, but this is available in wsl 2 distributions.
C:\Users\UserName.wslconfig
If you want check the versions of your distributions.
wsl -l -v
Finally, your linux distribution is ready. You can install vscode, dockerize your app and write code.
You can look these:
1 - Basic Info About WSL
2- Advance Settings Configuration
Top comments (0)