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

Security tips for Linux server

1. Use only  strong passwords for all accounts , especially for root. Always use a secure root...

Epel Centos

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

Pptpd on Centos 6

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

OpenVPN Access Server

§  Install OpenVPN Access Server Be sure that you are using a clean system and no...

Clear swap in Centos

Print memory usage [root@localhost]# free -m              total       used       free...