Skip to main content

fixing hostname issues

To change the hostname, the following has to be completed:

add the following to `/etc/wsl.conf`

[network]
hostname = <hostname>
generateHosts = false

after that, replace all instances of hold hostname in /etc/hosts

sudo sed -i "s/ws1-win/ws1-deb/g"  /etc/hosts
# reboot wsl, dont just reboot the vm
wsl --shutdown