Skip to content

CentOS hostname

Alexandru Zbarcea edited this page Jan 21, 2015 · 2 revisions

Table of Contents

Hostname Change

CentOS 7

# hostnamectl status
(...)

# hostnamectl set-hostname raisin.farm.net

Check the host name again (Close the session and open new session using putty or console)

# hostnamectl status
   Static hostname: raisin.farm.net
         Icon name: computer
           Chassis: n/a
        Machine ID: 33064014f0044839ab77dcfadd576710
           Boot ID: d50180e0afc4499284c8c0d568f84352
    Virtualization: other
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-123.13.2.el7.x86_64
      Architecture: x86_64

CentOS 6

 vi /etc/sysconfig/network  (Centos 6)

References