Set hostname

Set host name on Centos:

/etc/sysconfig/network

 

HOSTNAME="mycomputer"


/etc/hosts wrote:

127.0.0.1 mycomputer.mydomain.local mycomputer

 

check it with

hostname 
hostname --fqdn
hostname -a

 

Was this answer helpful?

 Print this Article

Also Read

NFS on Centos 6

How to install NFS on Centos 6 yum install nfs-utils nfs-utils-lib Set nfs to start...

How to check connectivity/network speed of your VPS

If you concerned about network speed of your vps you can test it by downloading some test...

Adding a new disk drive to Centos 6

Installing a new HDD The disk drives in Centos is named hd* or sd*. In system with only one...

DDoS

Diagnostic To display how many http connections are open at the moment, enter: netstat |...

Autorun in Linux

To set a script to start at boot in CentOS, add it into /etc/rc3.d/S99local. For example:...