Nastavení default uživatele
https://www.tenforums.com/tutorials/128152-set-default-user-windows-subsystem-linux-distro-windows-10-a.html
sudo su - apt update apt upgrade apt install vim rsync ssh
port 2210
%sudo ALL=NOPASSWD: /etc/init.d/ssh start
Put to the shell:Startup folder bat file with the content:
powershell.exe "& 'C:\Windows\System32\bash.exe' -c 'sudo /etc/init.d/ssh start'"
Start WSL on boot without login
https://www.reddit.com/r/bashonubuntuonwindows/comments/1716np4/start_wsl_on_boot_without_login/
I found that you have to keep a WSL session (started by wsl.exe, some process that's invoked by SessionLeader in pstree) running, otherwise WSL simply quits after some time. My solution (WSL2 on Windows 11): (optional) enable systemd in /etc/wsl.conf (for starting various services automatically, such as sshd, cron, rsyslogd, etc.) get nircmd fom https://www.nirsoft.net/utils/nircmd.html write a batch which has: @start /b \path\to\nircmd.exe execmd wsl ~ Use Task Scheduler to start the batch (when system starts)
Po spuštění nového terminálu příksazem bash se objeví hláška „No installed distributions when there are indeed distros installed“
Pomohlo zastavit a znovu spustit službu pod kterou běží WSL.
net stop LxssManager net start LxssManager
wslconfig /list /all Windows Subsystem for Linux Distributions: Debian (Default)
Kromě funkce WSL je potřeba zapnout funkci Platforma virtuálního počítače
To fix the WSL install error 0x80370114
https://github.com/Microsoft/WSL/issues/3054#issuecomment-705991287