How to Change a Hostname in RedHat Linux

  • Print this article

Each computer or server in a network has an IP address (e.g. 195.17.23.0) that is a crucial part of the Internet protocol. In addition, a computer has a human assigned name (hostname) that is easier to memorize and use than a numeric IP address. Changing a hostname in RedHat Linux requires editing a system configuration file.

Instructions

    • 1

      Right-click on Desktop and click "Open [new] terminal" in the pop-up menu.

    • 2

      Type "su" (press "Enter"). Type "<root password>" followed by pressing "Enter" to get superuser (root) privileges.

    • 3

      Type "cd /etc/sysconfig" and press "Enter."

    • 4

      Type "nedit network" and press "'Enter" to open the file for editing.

    • 5

      Find the line in the file that starts with HOSTNAME and looks like
      "HOSTNAME=greenapple.phys.edu"
      In this example 'greenapple.phys.edu' is the current hostname. Delete it and type a desired new hostname instead. For example, "HOSTNAME=peach.phys.edu".

    • 6

      Click "File >Save" to save the file. Then click "File >Exit" to exit nedit.

    • 7

      Type "hostname <new_host_name>" (for example, "hostname peach.phys.edu") and press "Enter."

    • 8

      Type "reboot" and press "Enter" to reboot the computer.

Related Searches

References

Comments

You May Also Like

Related Ads

Featured
View Mobile Site