• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WBXPress.NET

Website Developement Guide

  • apache2
  • nginx
  • mysql
  • php7
  • SSL
  • wordpress
  • genesis
  • caching
  • seo

Error: Unable to Resolve Hostname

Updated on 12th October 2016 Leave a Comment

When you are getting error “Unable to resolve hostname” in your VPS even after changing the hostname from command line, you can solve it by simply restarting the server.

How to change Hostname?

Use the following commands:-

Change hostname:

sudo echo "yourhostname" > /etc/hostname
sudo hostname -F /etc/hostname

Check hostname:

sudo nano /etc/hostname

Edit Hostfile:

sudo nano /etc/hosts

You need to change the corresponding text just after 127.0.1.1 to “yourhostname”.

Final Check:

hostname

If the output gives “yourhostname”. you are done.

Troubleshooting:

Whenever you run a command using sudo you are getting an error which displays, “Unable to resolve hostname ..“.

Solution:

Restart VPS from command line by typing the following command.

sudo reboot

This will solve the issue.

Filed Under: troubleshooting Tagged With: ubuntu

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Most Popular Posts

  • Remove/ Defer Render-blocking JavaScripts
  • Customizing Genesis eleven40-pro Theme
  • Free Genesis Child Theme by WBXPress
  • Host Multiple Sites with SSL in Ubuntu 18.04
  • 25 Ways to Boost Website Traffic that Really Work

Recent Comments

  • Ruhul on Customizing Genesis eleven40-pro Theme
  • Priya Agarwal on Customizing Genesis eleven40-pro Theme
  • mimi roy on Remove/ Defer Render-blocking JavaScripts
  • danish choudhary on Customizing Genesis eleven40-pro Theme
  • Radhe on Customizing Genesis eleven40-pro Theme

Copyright © 2021 · Powered by WordPress · Log in