The Home windows Subsystem for Linux (WSL) lets builders set up a Linux distribution (similar to Ubuntu, OpenSUSE, Kali, Debian, Arch Linux, and so on) and use Linux purposes, utilities, and Bash command-line instruments instantly on Home windows, unmodified, with out the overhead of a conventional digital machine or dualboot setup.
Associated Publish:
Set up Home windows Subsystem for Linux
Set up WSL
Now you can set up all the pieces you want to run WSL with a single command. Open PowerShell or Home windows Command Immediate in administrator mode by right-clicking and deciding on “Run as administrator”, enter the wsl –set up command, then restart your machine.
wsl –set up
This command will allow the options essential to run WSL and set up the Ubuntu distribution of Linux. (This default distribution could be modified).
Putting in, this will take a couple of minutes...
Please create a default UNIX person account. The username doesn't must match your Home windows username.
For extra info go to: https://aka.ms/wslusers
Enter new UNIX username: kali
New password:
Retype new password:
passwd: password up to date efficiently
Set up profitable!
┏━(Message from Kali builders)
┃
┃ This can be a minimal set up of Kali Linux, you doubtless
┃ wish to set up supplementary instruments. Find out how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/
┃
┗━(Run: “contact ~/.hushlogin” to cover this message)
┌──(kali㉿NETSEC)-[~]
└─$
Arrange your Linux person data
After getting put in WSL, you will want to create a person account and password to your newly put in Linux distribution.
┌──(kali㉿NETSEC)-[/etc/init.d]
└─$ sudo -i
[sudo] password for kali:
┏━(Message from Kali builders)
┃
┃ This can be a minimal set up of Kali Linux, you doubtless
┃ wish to set up supplementary instruments. Find out how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/
┃
┗━(Run: “contact ~/.hushlogin” to cover this message)
┌──(root㉿NETSEC)-[~]
└─# apt replace
Get:1 http://kali.mirror.rafal.ca/kali kali-last-snapshot InRelease [41.5 kB]
Get:2 http://kali.mirror.rafal.ca/kali kali-last-snapshot/most important amd64 Packages [20.3 MB]
Get:3 http://kali.mirror.rafal.ca/kali kali-last-snapshot/most important amd64 Contents (deb) [49.4 MB]
Get:4 http://kali.mirror.rafal.ca/kali kali-last-snapshot/contrib amd64 Packages [112 kB]
Get:5 http://kali.mirror.rafal.ca/kali kali-last-snapshot/contrib amd64 Contents (deb) [274 kB]
Get:6 http://kali.mirror.rafal.ca/kali kali-last-snapshot/non-free amd64 Packages [197 kB]
Get:7 http://kali.mirror.rafal.ca/kali kali-last-snapshot/non-free amd64 Contents (deb) [877 kB]
Get:8 http://kali.mirror.rafal.ca/kali kali-last-snapshot/non-free-firmware amd64 Packages [10.6 kB]
Get:9 http://kali.mirror.rafal.ca/kali kali-last-snapshot/non-free-firmware amd64 Contents (deb) [23.1 kB]
Fetched 71.2 MB in 5s (14.5 MB/s)
All packages are updated.
┌──(root㉿NETSEC)-[~]
└─#
Home windows PowerShell
Copyright (C) Microsoft Company. All rights reserved.
Set up the most recent PowerShell for brand spanking new options and enhancements! https://aka.ms/PSWindows
Loading private and system profiles took 1148ms.
PS C:Usersnetsec> wsl --install
Ubuntu is already put in.
Launching Ubuntu...
To run a command as administrator (person "root"), use "sudo ".
See "man sudo_root" for particulars.
PS C:Usersnetsec> wsl -l -o
The next is a listing of legitimate distributions that may be put in.
Set up utilizing 'wsl.exe --install '.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
Ubuntu-24.04 Ubuntu 24.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.6 openSUSE Leap 15.6
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5
SUSE-Linux-Enterprise-15-SP6 SUSE Linux Enterprise 15 SP6
openSUSE-Tumbleweed openSUSE Tumbleweed
Arrange your Linux person data
After getting put in WSL, you will want to create a person account and password to your newly put in Linux distribution.
WSL Instructions
You’ll be able to checklist your put in Linux distributions and examine the model of WSL every is about to by coming into the command: wsl -l -v
in PowerShell or Home windows Command Immediate.
PS C:Usersnetsec> wsl -l -v
NAME STATE VERSION
* Ubuntu Working 2
kali-linux Stopped 2
WSL helps working as many alternative Linux distributions as you want to set up. This may embody selecting distributions from the Microsoft Retailer, importing a customized distribution, or constructing your individual customized distribution.
There are a number of methods to run your Linux distributions as soon as put in:
- Set up Home windows Terminal (Beneficial) Utilizing Home windows Terminal helps as many command traces as you want to set up and lets you open them in a number of tabs or window panes and shortly swap between a number of Linux distributions or different command traces (PowerShell, Command Immediate, Azure CLI, and so on). You’ll be able to totally customise your terminal with distinctive shade schemes, font types, sizes, background photos, and customized keyboard shortcuts. Be taught extra.
- You’ll be able to instantly open your Linux distribution by visiting the Home windows Begin menu and typing the title of your put in distributions. For instance: “Ubuntu”. This can open Ubuntu in its personal console window.
- From Home windows Command Immediate or PowerShell, you’ll be able to enter the title of your put in distribution. For instance:
ubuntu
- From Home windows Command Immediate or PowerShell, you’ll be able to open your default Linux distribution inside your present command line, by coming into:
wsl.exe
. - From Home windows Command Immediate or PowerShell, you should use your default Linux distribution inside your present command line, with out coming into a brand new one, by coming into:
wsl [command]
. Changing[command]
with a WSL command, similar to:wsl -l -v
to checklist put in distributions orwsl pwd
to see the place the present listing path is mounted in wsl. From PowerShell, the commandget-date
will present the date from the Home windows file system andwsl date
will present the date from the Linux file system.