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

nginx

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

Pptpd on Centos 6

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

LXDE + xrdp

How to install Lightweight X11 Desktop Environment (LXDE) on Ubuntu. apt-get update...

Autorun in Linux

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

OpenVPN Access Server

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