How to Change a Hostname in RedHat Linux

  • Print this article

Each computer or server in a network has an IP address (e.g. 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.


    • 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
      In this example '' is the current hostname. Delete it and type a desired new hostname instead. For example, "".

    • 6

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

    • 7

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

    • 8

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

Related Searches



You May Also Like

Related Ads

View Mobile Site