![]() ![]() # Host addressesĪs you can see, my system hostname is trendoceans-HUB1, but here “SHEN” is still appearing, which makes a system print error about the hostname being incorrect. The output shows the main culprits lie here. ![]() Once you know the machine-name or hostname from /etc/hostname, you can proceed to /etc/hosts to find the existence of your machine name in the respective file. Like in my case, it is “trendoceans-HUB1”. ![]() Once in a while, you will encounter the above error after making changes to /etc/hostname, and fixing this issue is no more complicated than a few simple steps.įirst and foremost, find your current machine’s hostname, which you can do by running the following command: $ cat /etc/hostname Fix: Sudo Unable to Resolve Host Name or Service Not Known Error So, let’s learn how to fix the sudo unable to resolve host name or service not known in your Linux system. However, after restarting your system, when you invoke the sudo command, you encounter an error message that states “sudo: unable to resolve host your-hostname: name or service not known.” Getting error sudo unable to resolve host name or service not known after executing the sudo command, then read these steps to fix it up.Īs you know, while installing a new operating system like Debian, Ubuntu, or any other Linux distribution, installers ask you to set the hostname.Īt that time, most users kept the default hostname.īut later, you decided to change the hostname to some meaningful text, which can help you identify your system easily, and to do that, you may have followed this article or directly mentioned the new hostname in the /etc/hostname file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |