|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do I globally change my host name?
When I first installed my RedHat Linux 8 I had my DSL connection active. After the install I noticed that it automatically assigned a host name based on my ISP connection. Now when ever I log in or need to reference my host name I faced with the following name:
ip96.dhcp86.ptldor0.nwlink.com I really don't want to live with such a long host name. I don't know what host name would have been assigned if I had left the DSL connection disconnected during the install process. Does anyone know, short of having to re-install my RH Linux, how I can globally change my host name to a name of my choosing (a much shorter name)? Thanks, Dean |
|
#2
|
|||
|
|||
|
to change your hostname, type "hostname blah"
Allthough your hostname IS what the ISP gives you.
__________________
</stuff> |
|
#3
|
|||
|
|||
|
Thank you Trellph. However, this seems to only change the host name temporarily. Upon reboot this assignment goes away. The "Welcome to" login screen still shows the long host name.
In the past, someone had a post recommending going to the Main Menu/System Setting/Network and doing an edit under the Hosts tab. I can assign an alias however it's only an alias, and does not substitute the long host name for the shorter alias in the Welcome login screen. Also, if I'm setting up my own server and want my own shorter host name, it seems I'm still stuck with the long host name the ISP provides. I'm not an experienced Linux user, but I am continuing my education in Linux, but still have a lot of gaps to fill in yet. I'm sure there's something that will allow me to do this, I just don't know what yet. Thanks again, Dean |
|
#4
|
|||
|
|||
|
/etc/HOSTNAME
usually this is where yr hotname is stored. |
|
#5
|
|||
|
|||
|
Thanks for the reply Frymaster. I didn't find anything called "hostname" in the /etc directory, however I did find a file with my host name in it called "hosts" in the /etc directory. Unfortunately there is a warning in this file to not delete this line (I assume this also means editing as well), "...or various programs that require network functionality will fail."
I think I'm stuck with the very long host name, until I can purchase a domain name. Although, I'm not sure that this is necessary with a workstation (non-server) setup. dean7 |
|
#6
|
||||
|
||||
|
Hmm. I've never seen this problem, and I also have dynamically assigned hostnames via my PPPOE ADSL provider.
/etc/hosts is kind of like a global DNS override thing. You can use it to map IPs to names, it isn't used to set your hostname (AFAIK). You should be able to set your hostname in the /etc/sysconfig/network file. Whatever you set it to, be sure to put that same hostname on the 127.0.0.1 line in your /etc/hosts file to make sure your loopback interface is setup properly for your new domain name. Taking these steps should make a permanent change. And you don't need a FQDN for a workstation. |
|
#7
|
|||
|
|||
|
Okay Hero Zzyzzx, this sounds promising.
I went to my /etc/sysconfig/network file, and it had the following in it: NETWORKING=yes HOSTNAME=localhost.localdomain What would I type below the current HOSTNAME line to indicate that my HOSTNAME is also something other than "localhost.localdomain"? Or would I overwrite it with my desired (new) host name? Here is my /etc/hosts file content starting after the comment lines: 127.0.0.1 localhost.localdomain localhost ip9.dialup.dhcp84.nwlink.com Lemma Lemma is the name I would like to show up instead of the "ip9..." name. It's showing up here because I added this as an "alias" name in the Main Menu/System Setting/Network configuration utility (in Gnome) and entering it under the Hosts tab. However I found that an alias is just what is says it is, and does not replace the longer "ip9..." name. Also, what would I put in my "/etc/hosts" file? Do I replace the "localhost.localdomain" after the HOSTNAME in the /etc/sysconfig/network file with "Lemma", and then replace "ip9.dialup.dhcp84.nwlink.com" in the /etc/hosts file with "Lemma"? I would be very thankful if you would show me what to enter in these files. Thank you for you help. Dean Last edited by Dean7 : June 9th, 2003 at 11:39 PM. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > How do I globally change my host name? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|