How to change the Hostname in Linux - Linux Tech Solutions

Share on :

How to Change Hostname in Linux

Hostnames are human-readable nicknames that correspond to the address of a device connected to a network. They are used by various naming systems, e.g., Network Information Service (NIS), Domain Name System (DNS), Server Message Block (SMB) and the meaning of hostname varies according to the naming system used. A hostname meaningful to a Microsoft NetBIOS workgroup may be an invalid Internet hostname.

Hostnames are typically used in an administrative capacity and may appear in computer browser lists, active directory lists, IP address to hostname resolutions, email headers, etc.

Firstly check the hostname of your machine.

[email protected] # hostname
To check that the hostname is static or not and other details about your hostname.

[email protected] # hostnamectl

Then change it accordingly you want.

[email protected] # hostnamectl  set-hostname
[You can give any name to hostname]

Again check the hostname
[email protected] # hostnamectl

Hostname is changed Successfully

Share on :

You may also like...

1 Response

  1. thewindowssolution says:

    This was really good article. For more windows problems and solutions, you can checkout thewindowssolution

Leave a Reply

Your email address will not be published. Required fields are marked *