Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WSL - Install and configuration guide
- =====================================
- 1) WSL Install : https://docs.microsoft.com/en-us/windows/wsl/install-win10
- #Before installing any Linux distributions on Windows, you must enable the "Windows Subsystem for Linux" optional feature.
- 2) Optional step - Setup Docker desktop with WSL 2 backend: https://docs.docker.com/docker-for-windows/wsl/
- 3) WSL configuration (after wsl install)
- #create symbolic link # Source: https://florianbrinkmann.com/en/ssh-key-and-the-windows-subsystem-for-linux-3436/
- mkdir /mnt/c/Users/user/.ssh
- ln -s /mnt/c/Users/user/.ssh ~/.ssh
- # Create /etc/wsl.conf with the following content. # source: https://gist.github.com/shakahl/8b6c969768b3a54506c0fc4905d729a0
- [automount]
- enabled = true
- root = /mnt/
- options = "uid=1000,gid=1000,umask=22,fmask=11,metadata"
- mountFsTab = true
- options = "metadata"
- [network]
- generateHosts = true
- generateResolvConf = true
- [interop]
- enabled = true
- appendWindowsPath = true
- #Set correct permissions.
- sudo chmod 0644 /etc/wsl.conf
- #Now restart the shell.
- 4) Optional step - disable the beep in bash # Source: https://stackoverflow.com/questions/36724209/disable-beep-of-linux-bash-on-windows-10 you need to uncomment (or add if not already there) the line "set bell-style none" in your /etc/inputrc file.
- 5) Optional Step - Setup an SSH-agent: https://medium.com/@pscheit/use-an-ssh-agent-in-wsl-with-your-ssh-setup-in-windows-10-41756755993e
- or follow this wiki: https://wiki.archlinux.org/index.php/SSH_keys#Keychain
- 6) Other resources i found useful:
- https://stackoverflow.com/questions/24154816/git-bash-could-not-open-a-connection-to-your-authentication-agent
- https://www.reddit.com/r/bashonubuntuonwindows/comments/982une/sshagent_across_multiple_sessions_such_as_in_tmux/
- https://github.com/docker/for-mac/issues/3785
- https://devblogs.microsoft.com/commandline/chmod-chown-wsl-improvements/
- 7) Troubleshooting
- #After restart or logout i sometimes need to enter this command to mount /mnt/c and enable .ssh folder redirect
- sudo umount /mnt/c
- sudo mount -t drvfs C: /mnt/c -o metadata
- 8) Ubuntu with XFCE GUI Setup
- https://github.com/davidbombal/wsl2/blob/main/ubuntu_gui_youtube
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement