WSL

list distribution:

1
wsl --list

set default distribution:

1
wsl --set-default <name>

list distribution that can be download with powershell(actually others can be download in microsoft store)

1
wsl --list --online

export virtual OS:

1
wsl --export <distrobute name> path/to/store.tar

import virtual OS:

1
wsl --import <distro name> <path to destination> <path to source> --version 2

delete virtual OS:

1
wsl --unregister <distribution name>

change default user:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
sudo vim /etc/wsl.conf

add:->

[user]

default = <name>
<-

wsl --list --running

wsl --shutdown

wsl

change the path you are while log in:

1
2
3
vim ~/.bashrc

cd ~

wsl2 network connect to windows’

in C:/user/ create .wslconfig file

content:

1
2
3
4
5
6
7
8
9
[wsl2]
memory=8GB
processors=8
[experimental]
autoMemoryReclaim=gradual
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true

command lines homepage

click here to come back to command line homepage.