![]() ![]() Troubleshooting: cat /etc/nf # check contentĬhattr -i /etc/nf # make resolve. In separate WSL shell as root user sudo su - run: sudo systemctl status saned.socket sudo: unable to resolve host aario-debian-pc: Name or service not known saned.socket - saned incoming socket Loaded: loaded (/lib/systemd/system/saned.socket enabled vendor preset: enabled) Active: active (listening) since Thu 08:57:14 CEST 21min ago Listen: :::6566 (Stream) Accepted: 0 C. NOTE: My WSL Distro is Fedora you may need to use a different package manager. Download Packages and Make nf immutable 1 Yes, Might be duplicate of following links Tried both links solutions but didn't worked for me.in script below with actual IPs from step 1. Script loops for 300 second, pausing for 1 second in between. GenerateResolvConf=false" > /etc/wsl.conf A '0' return means it finished without error, anything else(we see it returned 1 in the original error) means there was an exception, if there wasn't an. To Automate this see: Create Windows Scheduled Task for Auto update if grep -q (hostname) /etc/hosts then next else sudo sed -i 's/127.0.0.1 localhost/127.0.0.1 localhost (hostname)/g' /etc/hosts fi The if grep -q says to return the status of the command. Get-NetAdapter | Where-Object | Set-NetIPInterface -InterfaceMetric 6000 Rank Interface Metric every time you reconnect to VPN.Concurrently, in a separate shell, download packages that can make nf immutable. Run a script in bash shell that constantly updates nf. This prevented me from downloading packages that can make nf immutable. Problem: While my pc was connected to the VPN, WSL Network manager kept overwriting /etc/nf. exit (not necessary to reboot for purpose of this test) 2. ![]() Make a (illegal) hostname with a space in it: raspberry pi. I have tried something else, and it worked, e.g. on Build an image derived from ubuntu:16.04 (let this image be myimage, introduce a system user (e.g. I'm trying to run the following command: curl Ĭurl: (6) Could not resolve host: One localhost and one with your hostname: 127.0.0.1 localhost 127.0.1. Then have a look at nano /etc/hosts There you should find two lines. (note the us-west-2 in the second block versus the us-west-1 in the first), and I no longer got the "unable to resolve host" error.I have installed Ubuntu 20.04 LTS on WSL. 2 Answers Sorted by: 4 Have a look at nano /etc/hostname There you should find one line with the name of your machine. # DO NOT EDIT THIS FILE BY HAND - YOUR CHANGES WILL BE OVERWRITTENĪfter creating a new DHCP option set with domain= and applying that to my VPC, once I restarted my EC2 instance, the nf file looked like this # Dynamic nf(5) file for glibc resolver(3) generated by resolvconf(8) As a result, when the machine was started, the EC2 scripts that set up the machine were putting this into my nf file # Dynamic nf(5) file for glibc resolver(3) generated by resolvconf(8) The DHCP Option Set for my VPC was pointing at us-west-1 but my new VPC was in us-west-2. I had this issue when I copied settings from one availability zone to another. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |