Score:0

GNU nano 4.8 infinite loop save file

pt flag

I can tell I'm not the first with this issue...

me@PF2DCSXD:/$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

me@PF2DCSXD:/$ sudo nano /etc/resolv.conf

I then get stuck in this infinite loop.

  • Ctrl + X
  • Y Enter
  • It says "[ Error writing /etc/resolv.conf: No such file or directory ]"
  • Ctrl + C

GNU nano 4.8 window


Terminal:

me@PF2DCSXD:/$ ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
ln: failed to create symbolic link '/etc/resolv.conf': File exists

me@PF2DCSXD:/$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory
Score:2
cn flag

The file /etc/resolv.conf is, in all newer Ubuntu versions, a symbolic link, not an actual file. Create it with:

cd
sudo rm -f /etc/resolv.conf 
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

As to your nano question, before saving the file, it must first be written, so the steps are to enter the text you wish, write it with Ctrl+o followed by Enter and finally exit nano with Ctrl+x followed by Enter.

Finally, your file is malformed, the proper term is nameserver, not namespace.

EDIT: In our chat, we determined that systemd, nor bashrc nor nano were working correctly. It is, however, desirable to have internet connectivity in order to download and install fixes. We therefore used vim to create a working resolv.conf. Upon writing and saving the /etc/resolv.conf file in vim, DNS resolution was restored allowing you to update and fix the server.

StressedBoi_69420 avatar
pt flag
`$cat /etc/resolv.conf cat: /etc/resolv.conf: No such file or directory`
StressedBoi_69420 avatar
pt flag
I'll run all new steps again to make sure
chili555 avatar
cn flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/134203/discussion-between-chili555-and-stressedboi-69420).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.