Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

A simialr question Host name on terminal changes when I connect internet : why? But since it was not resolved in my case so I am putting it here and asking in a different way.

The answer given here by chaos did not help me as I could not find the file mentioned in RHEL 6.0 64 bit /etc/dhcp/dhclient.conf

The content of the file:

/etc/sysconfig/network-scripts/ifcfg-eth0

is

DEVICE="eth0"
HWADDR=70:54:D2:22:FA:A6
NM_CONTROLLED="yes"
ONBOOT="no"

. I can see there is no DHCP_HOSTNAME. But Still I am seeing a strange issue here. And the issue is that when I am not connected to internet:

[acme@localhost ~]$

But when I connect to internet:

 [acme@dhcppc9 ~]$

Why it is happening?

share|improve this question
add comment

1 Answer 1

Your dhcp client is getting an answer from your dhcp server with a hostname for your computer and it's your dhcp client that is changing your hostname. Try looking at the options of your client (dhclient or dhcpcd).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.