hostname
I have fedora2 core installed and I need to change the hostname from localhost.localdomain to another, still maintaining the 127.0.0.1 or the other IP that my network adapter has, but I can I do it???
The last time I've tried this, gdm gave me an error with gnome and it had problem loggin |
You need to have localhost.localdomain and localhost pointing to 127.0.0.1. You can also point your hostname there or to another IP on another interface.
|
But can I have 2 diferentes hostname for 127.0.0.1?
Can I have 1 hostname for 127.0.0.1 and another one diferent hostname on the same machine with a diferent IP number, not another machine, but the same machine? If so does will fedore continues to login for the localhost.localdomain has it does in this moment? att julio thanks for the other reply |
Quote:
Josh |
I want to make a server providing web-services with GRID
|
To change the hostname I think u need to edit 2 files. The 1st is etc/hosts , edit it with vim but LEAVE the the localhost.localdomain alone just TAB then add what u want ie if u want the name 2 b redhat9.redhat.com just add the redhat9, save and exit.Then I think its vim /etc/sysconfig/network and change the line that says localhost.... to redhat9.redhat.com save and exit. Then to see the host name change press CTRL D at the prompt(NO GUI) and the host will change, no reboot required.
|
You are using Red Hat, so the file that declares your hostname is
/etc/sysconfig/network This will be persistent thru re-boots You can set it temporarily with the command hostname hostname host1.mydomain.com You will need to log off and on to see the results. |
Quote:
127.0.01 localhost.localdomain localhost myname Or you can do: 127.0.0.1 localhost.localdomain localhost 192.168.0.2 myname The "real" hostname will continute to be whatever is reported by the hostname command, which is initially set by the config files specific to your distro. |
change localhost name for logon
I just want to change then name of "localhost" to my nickname to show at log on. Without changing any configuration since I really dont know much about my network config. since I get my IP detected automatically from the LAN.
|
The system's hostname is derived normally from the entry in Red Hat's /etc/sysconfig/network file.
You can bind a hostname to 127.0.0.1 as well. Edit your /etc/hosts file and do something like this: We will assume a hostname such as host1.example.com 127.0.0.1 localhost.localdomain localhost host1.example.com host1 |
All times are GMT -5. The time now is 03:01 AM. |