Thursday, October 9, 2014

Change Fedora Hostname

ที่มา -

Change Fedora Hostname for current session.

   On the installation process of Fedora, you named you Fedora machine.  Then one Monday morning you decide to change the hostname to something else.  The step by step procedure below show the simples way to change hostname on Fedora machine temporary.

1.  Display your fedora box hostname by execute the hostname command.
[root@localhost ~]# hostname

2.  To change Fedora hostname execute the hostname command as example below.
[root@localhost ~]# hostname

Please note: That with the hostname command, the hostname only for the session only... the hostname reset back to the previous state after you reboot the system.
Change Fedora hostname permanently.

   On Fedora, to change the hostname permanently you need to edit the network configuration files.  The step below show the way to change hostname by using network configuration tools, and then verify the changes on the hostname configuration files.

1.  Backup the network configuration files:
[root@localhost ~]# cp -pr /etc/sysconfig/network /etc/sysconfig/network.bak

2.  Display the hostname configuration file:
[root@localhost ~]# cat /etc/sysconfig/network

3. Modify hostname
[root@localhost ~]# vi /etc/sysconfig/network

4. Reboot fedora

No comments:

Post a Comment

Popular Posts