Is there a way to have a different hostname on WSL than the actual Windows PC name?
Is there a general way of doing this or is it specific to each distro (Ubuntu vs Debian for example)?
Note : A similar question has been answered here but the answers are either specific to Ubuntu, or just about changing the Windows PC name. I'm more interested in changing the WSL hostname without changing the Windows PC name
I tried
- hostname [newname] command, added to .bashrc (requires root)
- tried hostnamectl (fails)
- tried adding hostname = [hostname] in /etc/wsl.conf (doesn't work on Debian)