I know it's a Very Dumb Question; I just can't find a general answer that works.
I want to stop calling all the machines on my LAN localhost.localdomain, and give them distinctive names. I have found two or three ways of doing so; but they don't stick.
The only way that really works, for me at least, is to think of it (and be ready) while doing a fresh install. When anaconda asks me whether to use dhcp, I can click on manual, type in a name, click back to using dhcp, and that name lasts.
I'm not even sure now whether it's mere logging out and back in, or just actual reboots that do it, but in a location subject to longer power failures than the UPSs I can afford will ride out, I get enough reboots, too (alas!).
One other way that I've tried is to use system-config-network, and edit the configuration of eth0; but that seems to be little more than a pacifier. I want something that shows up in the prompts, and that I can use in ssh and scp, without having to look up IP numbers on the router all the time -- especially since not all LAN machines are on one floor.
Clue, please? Pretty please?
Beartooth wrote:
I know it's a Very Dumb Question; I just can't find a general answer that works.
I want to stop calling all the machines on my LAN localhost.localdomain, and give them distinctive names. I have found two or three ways of doing so; but they don't stick.
The only way that really works, for me at least, is to think of it (and be ready) while doing a fresh install. When anaconda asks me whether to use dhcp, I can click on manual, type in a name, click back to using dhcp, and that name lasts.
I'm not even sure now whether it's mere logging out and back in, or just actual reboots that do it, but in a location subject to longer power failures than the UPSs I can afford will ride out, I get enough reboots, too (alas!).
One other way that I've tried is to use system-config-network, and edit the configuration of eth0; but that seems to be little more than a pacifier. I want something that shows up in the prompts, and that I can use in ssh and scp, without having to look up IP numbers on the router all the time -- especially since not all LAN machines are on one floor.
Clue, please? Pretty please?
Hi Beartooth,
I don't use dhcp so this answer may not apply; however, all of my machines set their hostnames in /etc/sysconfig/network:
HOSTNAME=box1.example.com
hth, :m)
Hi,
On Mon, Sep 29, 2008 at 10:27 PM, Beartooth Beartooth@swva.net wrote:
I know it's a Very Dumb Question; I just can't find a generalanswer that works.
I want to stop calling all the machines on my LANlocalhost.localdomain, and give them distinctive names. I have found two or three ways of doing so; but they don't stick.
The only way that really works, for me at least, is to think ofit (and be ready) while doing a fresh install. When anaconda asks me whether to use dhcp, I can click on manual, type in a name, click back to using dhcp, and that name lasts.
I'm not even sure now whether it's mere logging out and back in,or just actual reboots that do it, but in a location subject to longer power failures than the UPSs I can afford will ride out, I get enough reboots, too (alas!).
One other way that I've tried is to use system-config-network,and edit the configuration of eth0; but that seems to be little more than a pacifier. I want something that shows up in the prompts, and that I can use in ssh and scp, without having to look up IP numbers on the router all the time -- especially since not all LAN machines are on one floor. From above description, I guess you want a hostname resolution to IP address.
That you can do by editing '/etc/hosts'. After adding hotname/IP pair you can use host names. Not sure you want something else.
Thanks, Anoop
Clue, please? Pretty please?-- Beartooth Staffwright, PhD, Neo-Redneck Linux Convert Fedora 8 & 9; Alpine 1.10, Pan 0.132; Privoxy 3.0.6; Dillo 0.8.6, Galeon 2, Epiphany 2, Opera 9, Firefox 2 & 3 Remember I know precious little of what I am talking about.
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Beartooth wrote:
I know it's a Very Dumb Question; I just can't find a general answer that works.
I want to stop calling all the machines on my LAN localhost.localdomain, and give them distinctive names. I have found two or three ways of doing so; but they don't stick.
The only way that really works, for me at least, is to think of it (and be ready) while doing a fresh install. When anaconda asks me whether to use dhcp, I can click on manual, type in a name, click back to using dhcp, and that name lasts.
I'm not even sure now whether it's mere logging out and back in, or just actual reboots that do it, but in a location subject to longer power failures than the UPSs I can afford will ride out, I get enough reboots, too (alas!).
One other way that I've tried is to use system-config-network, and edit the configuration of eth0; but that seems to be little more than a pacifier. I want something that shows up in the prompts, and that I can use in ssh and scp, without having to look up IP numbers on the router all the time -- especially since not all LAN machines are on one floor.
Clue, please? Pretty please?
Three files can affect the system name.
The name seen in the prompt is from the hostname command, which gets set from: /etc/sysconfig/network HOSTNAME=
When your system connects to the network, it can tell the network which name it wants to be known as. This name, which dynamic DNS servers can receive from the DHCP service, are configured in the network configuration script, such as: /etc/sysconfig/network-scripts/ifcfg-eth0 DHCP_HOSTNAME=
Programs on your local system use a consistent method to look up IP addresses and associated host names. In most cases, the local /etc/hosts file is consulted first, and then DNS or other services. Therefore, some applications on your system, like sendmail, can get hostname from: /etc/hosts
These three files/methods cover %99 of user systems, and are very likely all you would need to look at.
Good Luck!
On Mon, 29 Sep 2008 11:19:54 -0600, Phil Meyer wrote:
I Beartooth wrote:
I know it's a Very Dumb Question; I just can't find a general answer that works.
[....]
Clue, please? Pretty please?
Three files can affect the system name.
The name seen in the prompt is from the hostname command, which gets set from: /etc/sysconfig/network HOSTNAME=
OK, I changed that one on this machine.
When your system connects to the network, it can tell the network which name it wants to be known as. This name, which dynamic DNS servers can receive from the DHCP service, are configured in the network configuration script, such as: /etc/sysconfig/network-scripts/ifcfg-eth0 DHCP_HOSTNAME=
That one already had the name I wanted.
Programs on your local system use a consistent method to look up IP addresses and associated host names. In most cases, the local /etc/hosts file is consulted first, and then DNS or other services. Therefore, some applications on your system, like sendmail, can get hostname from: /etc/hosts
Two very odd things. First nano -w doesn't make it obvious to me (though perhaps it should) how much is one line, how much another :
GNU nano 2.0.6 File: /etc/ hosts
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
I have no idea where that 6 comes from, nor what it's doing there.
Second, if I open Computer > Filesystem > /etc with nautilus, I don't see hosts at all! The search button or search tool on my panel finds 81 files whose name contains "hosts", one of which is indeed /etc/ hosts; but clicking on that does get it in gedit, which looks much the same :
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
Is what begins with "::1" really a different line, then, than the 127.0.0.1 line?
Also, it doesn't say not to edit that line, just not to delete it. Do I want to change "localhost" (without the 6) there??
These three files/methods cover %99 of user systems, and are very likely all you would need to look at.
Good Luck!
Thanks! I've got a feelin' I'm gonna need it ...
Beartooth wrote:
On Mon, 29 Sep 2008 11:19:54 -0600, Phil Meyer wrote:
I Beartooth wrote:
I know it's a Very Dumb Question; I just can't find a general answer that works.
[....]
Clue, please? Pretty please?
Three files can affect the system name.
The name seen in the prompt is from the hostname command, which gets set from: /etc/sysconfig/network HOSTNAME=
OK, I changed that one on this machine.
The change will take effect upon the next reboot.
When your system connects to the network, it can tell the network which name it wants to be known as. This name, which dynamic DNS servers can receive from the DHCP service, are configured in the network configuration script, such as: /etc/sysconfig/network-scripts/ifcfg-eth0 DHCP_HOSTNAME=
That one already had the name I wanted.
Programs on your local system use a consistent method to look up IP addresses and associated host names. In most cases, the local /etc/hosts file is consulted first, and then DNS or other services. Therefore, some applications on your system, like sendmail, can get hostname from: /etc/hosts
Two very odd things. First nano -w doesn't make it obvious to me (though perhaps it should) how much is one line, how much another :
GNU nano 2.0.6 File: /etc/ hosts
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
I have no idea where that 6 comes from, nor what it's doing there.
Second, if I open Computer > Filesystem > /etc with nautilus, I don't see hosts at all! The search button or search tool on my panel finds 81 files whose name contains "hosts", one of which is indeed /etc/ hosts; but clicking on that does get it in gedit, which looks much the same :
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
Is what begins with "::1" really a different line, then, than the 127.0.0.1 line?
Also, it doesn't say not to edit that line, just not to delete it. Do I want to change "localhost" (without the 6) there??
These three files/methods cover %99 of user systems, and are very likely all you would need to look at.
Good Luck!
Thanks! I've got a feelin' I'm gonna need it ...
It looks like your 'hostname' was not in /etc/hosts, so don't change it. :) Mostly folks with fixed IPs or servers mess with /etc/hosts and then forget they did it. :)
Yes, those two localhost lines are required: 1 for IPv4 and 2 for IPv6
Good luck!
--- On Mon, 9/29/08, Beartooth Beartooth@swva.net wrote:
From: Beartooth Beartooth@swva.net Subject: Re: VDQ : machine names?? To: fedora-list@redhat.com Date: Monday, September 29, 2008, 9:21 PM On Mon, 29 Sep 2008 11:19:54 -0600, Phil Meyer wrote:
I Beartooth wrote:
I know it's a Very Dumb Question; I just
can't find a general
answer that works.
[....]
Clue, please? Pretty please?
Three files can affect the system name.
The name seen in the prompt is from the hostname
command, which gets set
from: /etc/sysconfig/network HOSTNAME=
OK, I changed that one on this machine.
When your system connects to the network, it can tell
the network which
name it wants to be known as. This name, which
dynamic DNS servers can
receive from the DHCP service, are configured in the
network
configuration script, such as: /etc/sysconfig/network-scripts/ifcfg-eth0
DHCP_HOSTNAME=
That one already had the name I wanted.
Programs on your local system use a consistent method
to look up IP
addresses and associated host names. In most cases,
the local
/etc/hosts file is consulted first, and then DNS or
other services.
Therefore, some applications on your system, like
sendmail, can get
hostname from: /etc/hosts
Two very odd things. First nano -w doesn't make it obvious to me (though perhaps it should) how much is one line, how much another :
GNU nano 2.0.6 File: /etc/ hosts
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
I have no idea where that 6 comes from, nor what it's doing there.
Second, if I open Computer > Filesystem > /etc with nautilus, I don't see hosts at all! The search button or search tool on my panel finds 81 files whose name contains "hosts", one of which is indeed /etc/ hosts; but clicking on that does get it in gedit, which looks much the same :
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
Is what begins with "::1" really a different line, then, than the 127.0.0.1 line?
Also, it doesn't say not to edit that line, just not to delete it. Do I want to change "localhost" (without the 6) there??
These three files/methods cover %99 of user systems,
and are very likely
all you would need to look at.
Good Luck!
Thanks! I've got a feelin' I'm gonna need it ...
-- Beartooth Staffwright, PhD, Neo-Redneck Linux Convert Fedora 8 & 9; Alpine 1.10, Pan 0.132; Privoxy 3.0.6; Dillo 0.8.6, Galeon 2, Epiphany 2, Opera 9, Firefox 2 & 3 Remember I know precious little of what I am talking about.
--
as I remember, MySQL had a mind of its own and remembered localhost.localdomain
There is a place in network configuration to change the machine name.
I'll follow your posts and learn!
fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
On Mon, 2008-09-29 at 21:21 +0000, Beartooth wrote:
Two very odd things. First nano -w doesn't make it obvious to me (though perhaps it should) how much is one line, how much another :
GNU nano 2.0.6 File: /etc/hosts
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
I have no idea where that 6 comes from, nor what it's doing there.
The 6 is for IPv6 addresses.
The instructions that came at the top of the hosts file were always crap. Quite often, the system had modified the hosts file before you ever read it, so the instructions were just plain wrong. And now, since IPv6 is being accommodated, there's *two* lines that ought to be left alone.
Your hosts file should have the following two lines in it, without anything else in them:
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
And if you do have your machine hostname and domain name in the hosts file, then it should *NOT* be stuck into either of those lines. It should be separate, and with the LAN IP address you associate with it.
e.g. 192.168.1.20 twenty.localdomain twenty mailserver
The format is numerical IP address, white space, full domain name, white space, then any aliases for that domain name (such as the short machine name, and any alternative names you use for it, all separated by white space).
Second, if I open Computer > Filesystem > /etc with nautilus, I don't see hosts at all! The search button or search tool on my panel finds 81 files whose name contains "hosts", one of which is indeed /etc/hosts; but clicking on that does get it in gedit, which looks much the same :
I can't imagine why Nautilus doesn't display it, unless it is displaying it and not where you're looking (e.g. perhaps the sorting order of the list isn't by filename).
Beartooth
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6
The line beginning ::1 is the equivalent to 127.0.0.1 for the migration to internet protocol version 6. Forward looking but not applicable to most networks at the moment.
Robert McBroom