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

OpenVPN 2.3.6 on Centos 6

Install Epel repository rpm -Uvh...

nginx

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

Squid with authentication on Centos 6

How to install Squid with authentication on Centos 6 >>Get VPS with current...

Fail2ban

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

Centos 6 Webserver

In this article we will install some software that is useful on a webserver based on...