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

Autorun in Linux

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

DDoS

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

Epel Centos

Some packages are missing from the base repository. This guide shows how to install RHEL EPEL...

Dovecot /postfix with Roundcube WebUI

Following guide was tested on CentOS 6. Install epel repository: wget...

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...