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

Mistakenly I erased everything that was in nano hosts

$
0
0

so I'm a newbie, I got wsl and installed Ubuntu 22.04 and saw someone having his username plus a cool name for the host username@hostname... So I was like "cool I want to do the same" ... I tried to change it, and I ended up erasing everything that was in nano hosts... So I said "ok don't panic, just may be rebooting 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

And then I said "uhmm what if I uninstall and isntall again"

... Nope, still got the same problem... Can someone help me please ;(

Edit: ok, so I was on the terminal and I typedSudo nano hosts

Then I saw a list:27.1.1.0 localhost27.1.1.0 hostname.something(this the one that I erased to change it for a new name) hostname

There were a few more lines of code bellow, probably needed but after I erased that and press control + X to get out... Then the whole hosts folder is completely empty ... I tried sudo reboot and then the errores that I wrote above just started to appear ;(And I don't know how to reset it so the nano hosts folder is completely back to normal...
The distro I'm using is Ubuntu 22... Wsl 2


Viewing all articles
Browse latest Browse all 2795

Trending Articles



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