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

Fail2ban

Fail2ban scans log files (e.g. /var/log/apache/error_log) and bans IPs that show the...

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

nginx

How to install nginx on Centos Add nginx repo first. To add it, create the file...

Squid+Privoxy+Tor

How to install squid with tor [NOTE: According to vpsget.com AUP/TOS you can use private proxy...

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