Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-09-2012, 08:21 AM   #1
LQ Newbie
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
linode ping returned hostname

i have an linode VPS server, when i do a ping command it returns the ugly linode hostname, how can i make the ping return my changed hostname like this
Old 08-09-2012, 08:44 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,986
Blog Entries: 14

Rep: Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187Reputation: 1187
The first question is from where are you doing the ping? It is on this system you'd need to address the answer.
The second question would be where is the name coming from? You'd examine the below for that.

When you run commands for networking they typically interrogate /etc/nsswitch.conf for "hosts" line to see where to get the name. Often that will show something files first then dns second (and maybe nis or other things).

If you have access to the resolver (e.g. DNS BIND) the best place would be to change it there. Since this is a cloud based system I'm not sure if they give you that level of access. If not it may be a request you can make of the Linode folks. Failing that you could update /etc/hosts and so long as "files" is first in nsswitch.conf it will read the name from hosts before it does from whatever follows.

Note that commands such as "dig", "nslookup" and "host" are designed to read the name server so will ignore /etc/hosts when replying but most other commands will honor nsswitch.conf including ping.
Old 08-09-2012, 10:35 AM   #3
LQ Newbie
Registered: Nov 2006
Location: Bahrain
Distribution: Linux Mint
Posts: 1

Rep: Reputation: 0
Originally Posted by dassio View Post
i have an linode VPS server, when i do a ping command it returns the ugly linode hostname, how can i make the ping return my changed hostname like this
I believe the ugly Linode hostname you mention is the rDNS hostname set within your Linode manager. Log in to your manager, choose the Linode's dashboard and check the "Remote Access" tab. If you find the ugly Linode hostname in the "Public IPs" section, you may change it by clicking on the "Reverse DNS" link and set to anything you want.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC13 install can ping by hostname, ssh by hostname fails jeffk42 Linux - Networking 4 11-14-2011 11:27 AM
BIND9 SLOW ping when ping by hostname dschuett Linux - Networking 10 02-02-2011 04:17 PM
hostname command returned (none) sigmacunfu Linux - Newbie 5 09-25-2006 11:18 PM
can ping ip but not hostname mrbabis Linux - Networking 17 06-07-2006 12:26 PM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration