Wednesday 14 September 2016

How to change the HOSTNAME using command line


















How to modify the hostname ( hadoop to kalyan)

1. Open /etc/hostname file using below command

sudo gedit /etc/hostname

2. Modify the /etc/hostname file with new hostname

update hadoop to kalyan

3. Save the /etc/hostname file

4. Open /etc/hosts file using below command

sudo gedit /etc/hosts

5. Modify the /etc/hosts file with new hostname

update hadoop to kalyan

127.0.0.1    localhost
127.0.0.1    kalyan

6. Save the /etc/hosts file

7. Execute below command to reflect the hostname changes

sudo service hostname restart

8. Re-Open the Terminal

9. Verify the new hostname using below command

hostname





Share this article with your friends.

No comments :

Post a Comment

Related Posts Plugin for WordPress, Blogger...