Wednesday, January 10, 2024

How to install Linux on Windows with WSL - Windows Subsystem for Linux

 WSL on Windows

--------------

Windows Subsystem for Linux currently has several limitations. First, it does not support all Linux applications; it is intended to provide a tool to handle bash and major Linux command-line utilities. WSL does not support Linux graphical user interface (GUI) environments such as Gnome or K Desktop Environment.

How to install Linux on Windows with WSL

https://learn.microsoft.com/en-us/windows/wsl/install


Run Below command in Power Shell ( better to run with Administrator mode )

1. wsl --install

 Note

The above command only works if WSL is not installed at all. If you run wsl --install and see the WSL help text, please try running wsl --list --online to see a list of available distros and run wsl --install -d <DistroName> to install a distro. To uninstall WSL, see Uninstall legacy version of WSL or unregister or uninstall a Linux distribution.

2. Check which version of WSL you are running

wsl -l -v


3. Check version

wsl --version

4. wsl --status

may give sample output like

-------------------------------------------------------------------------------------------------------

Default Distribution: Ubuntu

Default Version: 2

Windows Subsystem for Linux was last updated on 7/7/2023

WSL automatic updates are on.

Kernel version: 5.10.16

------------------------------------------------------------------------------------------------------------

5. help

wsl --help

6. To run as specific user

wsl --user {username}

wsl --user myname

7. Update 


8.To shutdown

wsl --shutdown



https://learn.microsoft.com/en-us/windows/wsl/basic-commands


No comments:

Post a Comment