WSL - Windows Subsystem for Linux?
WSL

WSL - Windows Subsystem for Linux?

WSL (Windows Subsystem for Linux )?

Linux is a widely used operating system and is quite important for developers.?

There are times when you might need to have both operating systems – Windows and Linux – either for work, study, or even just experimentation. Luckily, Windows provides a convenient utility for using Linux alongside Windows. This utility is called WSL (Windows Subsystem for Linux). Its recent version is WSL2.?

It's a compatibility layer in Windows10/11 that allows you to run a Linux environment directly on a Windows machine without the need for a virtual machine or dual-boot setup. With WSL, you can run native Linux command-line tools and utilities directly on Windows, enabling developers to work seamlessly across both Windows and Linux environments.?

WSL is a great utility to use Linux on a native Windows machine. It gives room for learning specially to those who are just starting out.?

WSL

Advantages of using WSL???

There are some advantages of WSL over a traditional VM setup:??

  • The setup for WSL is simple and not time consuming.??
  • It is light weight compared to VMs where you have to allocate resources from the host machine.??
  • You don't need to install any ISO or virtual disc image for Linux machines which tend to be heavy files.??
  • You can use Windows and Linux side by side.

How to Install WSL [Specific Linux Distro] on Windows 10?

Step 1: First, enable the 'windows subsystem for Linux' option From windows settings.?

  • Go to Start & Search for 'Turn Windows features on or off'.???
  • Check the option 'Windows Subsystem for Linux'.?
  • After pressing ok it will take some time for setup.?
  • Once setup is done -> restart the pc.?

Windows Subsystem for Linux

Step 2: Open Command Prompt as an administrator and run below command?

  • wsl --list –-online?????????????????? # to list the online available Linux distros
  • wsl --install -d <DISTRO-NAME>????# To install a specific distro

Ex: wsl --install -d Debian?????????? # to install Debian version

  • wsl --update????????????????????????? # to Update WSL to the latest version
  • wsl -l -v???????????????????????????? # Check the status of WSL

Command For WSL Installation

Once installation of Ubuntu is complete, you'll be prompted to enter your username and password.?And, that's it! You are ready to use Ubuntu.??

user name and password prompt

Cross verify using wsl -l -v command

check WSL Version

Upgrade Existing WSL1 Distributions to WSL2

If you have existing WSL1 distributions and you want to convert to WSL2, you can do so:?

Step1: Enable Virtualization: Make sure virtualization is enabled in your computer's BIOS settings. Access your BIOS setup by restarting your computer and entering BIOS (usually by pressing F2 or Del during boot).?

Step2: wsl --set-version <distribution name> 2?

Upgrade WSL1 2 WSL2


要查看或添加评论,请登录

社区洞察

其他会员也浏览了