find . -name "*:Zone.Identifier" -type f -delete
adduser username
# Open wsl.conf with this
nano /etc/wsl.conf
# ADD THIS
[user]
default=username
# In Powershell with Admin Priviliges
tasklist /svc /fi "imagename eq svchost.exe" | findstr LxssManager
# Grab the returned PID and Open Task Manager with Admin Priviliges
# Search for the svchost.exe containing the PID,
# Right click it and select 'end process tree'
# In powershell
wsl --shutdown
# or
sudo restart-service Lxssmanager
wsl
"wsl2 E: Failed to fetch hatası" veya "connection timed out; no servers could be reached" sorunlarının çözümünü göstereceğim.
sudo touch /etc/wsl.conf komutu ile bu dosyayı oluşturun.sudo nano /etc/wsl.conf komutunu kullanabilirsiniz.)[network]
generateResolvConf = false
Sonra cmd penceresini açıp şu komutu çalıştırıp wsl'i kapatın: wsl --shutdown
WSL2'yi yeniden açın.
sudo touch /etc/resolv.conf komutu ile bu dosyayı oluşturun. .Eğer dosya varsa eskisini sudo rm resolv.conf/ komutuyla silip yenisini sudo touch /etc/resolv.conf komutu ile oluşturun.
Dosyanın içine aşağıdaki DNS adresini bu şekilde yazın.
nameserver 8.8.8.8
Sonra cmd penceresini açıp şu komutu çalıştırıp wsl'i kapatın: wsl --shutdown
WSL2'yi yeniden açın.
sudo apt-get update komutunu çalıştırın.