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

Forward (redirect/nat) traffic with iptables

If you want to redirect/nat some traffic to IP 2.2.2.2 via IP 1.1.1.1, it simply can be done...

LXDE + xrdp

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

Centos 6 Webserver

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

Generating public/private ssh keys

How to generate and use public / private ssh keys This guide is tested on Centos 6 To...

NFS on Centos 6

How to install NFS on Centos 6 yum install nfs-utils nfs-utils-lib Set nfs to start...