Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Is this possible

This is a discussion on Is this possible within the Linux forums, part of the Operating Systems category; Is it possible to change the hostname of a Linux machine? If so what are the steps for doing this. ...

  1. #1
    rachelle is offline Member Array
    Join Date
    Apr 2006
    Answers
    97

    Is this possible

    Is it possible to change the hostname of a Linux machine? If so what are the steps for doing this. If anyone provides me the idea I will also try this out.


  2. #2
    cyrus is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    128
    You can change the hostname on any Linux system with the command ‘hostname‘.

    The syntax is as below:
    #hostname

    Without any parameter it will output the current hostname of the system.


  3. #3
    sammy is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    144
    You can also use hostname on any Linux system with the command ‘hostname‘with parameters as below:
    #hostname –fqd

    The above would output the fully qualified domain name (or FQDN) of the system.

    #hostname NEW_NAME

    The above parameter option would set the hostname of the system to NEW_NAME.


  4. #4
    ashlee is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    108
    If you use a Debian based Linux systems you can achieve Permanent hostname change as follows:

    Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh

    #cat /etc/hostname

    debianadmin

    So on a Debian based system we can edit the file /etc/hostname and change the name of the system and then run

    /etc/init.d/hostname.sh startto make the change active. The hostname saved in this file (/etc/hostname) will be preserved on system reboot


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...