If you are running Ubuntu on Windows WSL (Windows Subsystem for Linux) and wondering how to change hostname permanently then follow all steps mentioned below. Once hostname is changed, if you get "unable to resolve host
: Name or
service not known" then follow the step #4 for the fix.
Unable to resolve host