Thursday , April 25 2024
Home / Linux / How to Change Hostname in centos

How to Change Hostname in centos

$ vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=newHostName

and:

$ vi /etc/hosts

127.0.0.1 newHostName
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

and then rebooting the system

About v.shakya

I am V.Shakya, Software Developer & Consultant I like to share my ideas, views and knowledge to all of you who come across my website. I am young, enthusiastic, highly motivated and self disciplined person. I completed my studies in Master of Computer Application and currently giving my technical expertise to one of the Big IT company. I have more than fifteen years of experience in vast field of Programming , Designing and Development of websites and various software's.

Check Also

Installing the latest MySQL 5.6 on Amazon Linux using official repos

Installing the latest MySQL 5.6 on Amazon Linux using official repos Below are the process/steps …

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.