Difference between revisions of "Wsl"
Jump to navigation
Jump to search
Line 56: | Line 56: | ||
# Share keys | # Share keys | ||
https://devblogs.microsoft.com/commandline/sharing-ssh-keys-between-windows-and-wsl-2/ | https://devblogs.microsoft.com/commandline/sharing-ssh-keys-between-windows-and-wsl-2/ | ||
+ | |||
+ | |||
+ | ``` | ||
+ | netsh winsock reset | ||
+ | netsh int ip reset all | ||
+ | netsh winhttp reset proxy | ||
+ | ipconfig /flushdns | ||
+ | ``` |
Revision as of 17:03, 23 January 2023
Getting started
Docs
- https://learn.microsoft.com/en-us/windows/wsl/install
- https://learn.microsoft.com/en-us/windows/wsl/basic-commands
Install
curl.exe -LO https://cloud-images.ubuntu.com/wsl/jammy/current/ubuntu-jammy-wsl-amd64-wsl.rootfs.tar.gz wsl.exe --import jammy jammyFolder .\ubuntu-jammy-wsl-amd64-wsl.rootfs.tar.gz # 20.04 and older https://cloud-images.ubuntu.com/releases/ wsl.exe --setdefault jammy wsl.exe -l -v
add sudo user
wsl -d jammy adduser myuser
nano /etc/sudoers.d/myuser
myuser ALL=(ALL) NOPASSWD:ALL
exit wsl --user myuser -d jammy
https://gist.github.com/ScriptAutomate/f94cd44dacd0f420fae65414e717212d?permalink_comment_id=3627426
wsl -d ubuntu-20.04 -u myuser -- bash wsl -d ubuntu-20.04 -- bash
/etc/wsl.conf
[user] default=myuser [automount] options = "metadata"
restart wsl
wsl --shutdown
- https://stackoverflow.com/questions/46610256/chmod-wsl-bash-doesnt-work
- https://superuser.com/questions/1337153/change-home-of-wsl-to-mnt-c-users-yourwindowsuser
https://devblogs.microsoft.com/commandline/sharing-ssh-keys-between-windows-and-wsl-2/
netsh winsock reset netsh int ip reset all netsh winhttp reset proxy ipconfig /flushdns