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

Oracle 11g EX on Centos 6 x64 vps

We describe how to install Oracle 11g Express on Centos 6 x86_64 Openvz VPS. First of all you...

Autorun in Linux

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

Sendmail [25: Connection refused] fix

If you can't receive email from the outside and got next error:  (Delivery Status Notification...

Usefull linux tools

please note: for installing some toosl you ned to connect EPEL repo first. htop -extened version...

Pptpd on Centos 6

How to install pptpd server on Centos 6 NOTE than pptpd is potentially unsecure and the tunnel...