server name?

Discussion in 'Technical' started by thdinh, Dec 22, 2007.

  1. thdinh

    thdinh New Member

    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
     
  2. edge

    edge Active Member Moderator

    The command(s) are hostname and hostname -f

    Both commands should give you the same server name back.
     
  3. badgerbox76

    badgerbox76 Member

    To change the hostname
    Code:
    sudo nano /etc/hostname
    and 
    sudo nano /etc/hosts
    
    Then restart your network services or restart your system
    Code:
    sudo /etc/init.d/./networking restart
    or
    sudo shutdown -r now
    
    Then check the hostname
    Code:
    hostname
    and 
    hostname -f
    
    Hope this helps.
     

Share This Page