The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Talk:Windows Subsystem for Linux"
(→user setup: set it up as it's own file instead) |
(→user setup: clean up hostname from when loaded in from sudo) |
||
Line 52: | Line 52: | ||
}} | }} | ||
* delete hostname process from init so wsl root stays named from windows | |||
{{console|body= | |||
###i## rc-update del hostname boot | |||
}} | |||
* set the user to be loaded by default | |||
{{file|name=/etc/wsl.conf|desc=switch user loaded by default|body= | {{file|name=/etc/wsl.conf|desc=switch user loaded by default|body= | ||
[user] | [user] | ||
Line 57: | Line 63: | ||
}} | }} | ||
*restart wsl | * restart wsl | ||
{{console|body= | {{console|body= | ||
%PowerShell>% C:\> wsl --terminate funtoo | %PowerShell>% C:\> wsl --terminate funtoo | ||
}} | }} |
Latest revision as of 14:34, April 12, 2024
https://docs.microsoft.com/en-us/windows/wsl/wsl-config
- copy debian kernel to windows system:
cp /boot/kernel-debian-sources-x86_64-6.4.13_p1-r1 /mnt/c/Users/*your user name*/
- gwsl in the microsoft store can run graphical applications that are installed.
Xming uses ssh x11 forwarding to render x11 under windows:
Bind USB to WSL
to attach usb devices to wsl you need to add usbipd.
root # emerge usbip
using scoop to fetch 7z git etc in powershell.
i propose that we use https://scoop.sh/ package management for windows in our WSL tutorial. it cleans things up, and reduces hunting for packages on the web. it's basically apt/text synaptic for windows powershell in windows mode.
- install git & 7z in powershell:
PowerShell> # Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser PowerShell> # Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression PowerShell> # scoop install git
now we should be able to pull stage tarballs from git servers also from powershell. 7z is bundled with git as scoop uses 7z to decompress archives hosted on their git package repos.
- to show git man page under powershell:
PowerShell> # C:\Users\paul> git
- working example of the code shift:
PowerShell> # .\scoop\apps\7zip\current\7z.exe x stage3.tar.xz
user setup
- setup a privileged user
root # useradd funtoo root # gpasswd -a funtoo wheel root # emerge sudo root # echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/wheelnopass
- delete hostname process from init so wsl root stays named from windows
root # rc-update del hostname boot
- set the user to be loaded by default
/etc/wsl.conf
- switch user loaded by default[user]
default=funtoo
- restart wsl
PowerShell> # C:\> wsl --terminate funtoo