Sometimes, we need to change the hostname of machines. Hostname is just like our name which is a name assigned to machines. For changing the hostname of a machine, we need root access.
We can change the hostname through several ways. One of the method to change the hostname is listed below.
In linux OS, almost every configuration are present inside some files.
The hostname is configured in the following file
/proc/sys/kernel/hostname
If we change the value in this file with some other name, the hostname will be changed.
So for changing hostname of a machine, edit the /proc/sys/kernel/hostname file and add the desired hostname.
We can change the hostname through several ways. One of the method to change the hostname is listed below.
In linux OS, almost every configuration are present inside some files.
The hostname is configured in the following file
/proc/sys/kernel/hostname
If we change the value in this file with some other name, the hostname will be changed.
So for changing hostname of a machine, edit the /proc/sys/kernel/hostname file and add the desired hostname.
No comments:
Post a Comment