PDA

View Full Version : server name?


thdinh
22nd December 2007, 12:48
Hi,
I have installed a server fedora 8, itś everything ok on this state, but I forgot what did I put down the serverś name.
have we got any command to display a server name or not? I am a newbie with linux.
My server has 2 nic cards, one connect sto my cable, and one configure swith static Ip address for LAN at home, they are working fine.
following the instruction, need to add a line onto config file something like this:
server1.example.com, but I donīt know my server name.
Anyone would help me, I will appreciate for this.
Thanks very much in advance and have a greate Christmas and a happy new year.
Regards.
TD

edge
22nd December 2007, 13:16
The command(s) are hostname and hostname -f

Both commands should give you the same server name back.

badgerbox76
21st January 2008, 00:02
To change the hostname

sudo nano /etc/hostname
and
sudo nano /etc/hosts


Then restart your network services or restart your system

sudo /etc/init.d/./networking restart
or
sudo shutdown -r now


Then check the hostname

hostname
and
hostname -f


Hope this helps.