Skip to main content

How to rename Linux Hostname

CentOS:

Logon to server via putty
Type      vi /etc/hosts      Enter
Press     I
Rename machine and Press escape press Shift colon
Type   wq!      Enter
Type   vi /etc/sysconfig/network   enter
Press i
Rename machine and Press escape press Shift colon
Type   wq!      Enter
service network restart
chkconfig network on
If you want to reboot the server type    init  6
 
*****************************  
Ubuntu:
sudo vim /etc/hostname

Press     I
Rename machine and Press escape press Shift colon
Type   wq!      Enter
Sudo reboot


********************************************  

Comments

Popular posts from this blog

Installing Nagios 4 on Ubuntu 14 04 LTS

Open Source firewalls

1. Endian Community Firewall -  http://www.endian.com/en/community/overview/ 2. pfSense -  https://www.pfsense.org 3. IPCop -  http://www.ipcop.org/ 4. Zentyal -  http://www.zentyal.org 5. IPFire -  http://www.ipfire.org