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

Centos 6 Webserver

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

FFmpeg on Centos 6

Install repo and ffmpeg # rpm -ihv...

nginx

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

Epel Centos

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

CSF

ConfigServer Security & Firewall (CSF) is a powerful iptables configuration tool....