Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2795

I erased everything that was in my hosts file

$
0
0

So I'm a newbie with WSL and Ubuntu 22.04.

I saw someone with a prompt with the username plus a cool name for the host (username@hostname...). So I tried to do the same, but I ended up erasing everything that was in the hosts file. I tried:

sudo nano /etc/hosts

Inside, I saw something like:

127.1.1.0 localhost127.1.1.0 hostname.something # I changed this one# and some additional lines

After I erased that and pressed Ctrl+X to get out, the whole hosts folder is completely empty.

So I said, "Ok don't panic. Maybe just reboot everything?"

sudo reboot

... and these errors appeared:

system has not been booted with systemd as init system (pid 1). can't operate. failed to connect to bus: host is down, fail to talk to init daemon

So then I decided to try reinstalling, but I still have the same problem.

I don't know how to reset it so the hosts file is completely back to normal. How can I get everything inside hosts back to where it was, because right now it's just an empty file.


Viewing all articles
Browse latest Browse all 2795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>