Zoyinc
  • Home
  • Contact
  • Categories
    • CD Archiving
    • GIMP
    • Linux
    • MythTV
    • Open Media Vault
    • Technology
    • VMware
    • WordPress
    • YouTube
  • About


Rename a CentOS 7 host

By

Tony

,

September 9, 2019

Simple and official way to rename a host:

hostnamectl set-hostname centos7-base.cantabrian

Then restart the host.

You should find the new name is reflected in the file:

/etc/hostname

Note: You only need to edit “/etc/resolv.conf ” if you are changing workgroups or domains.

Get hostname details

You can use hostnamectl to get other details by running:

hostnamectl status

Which gives:

Static hostname: centos7-base.cantabrian
Icon name: computer-vm
Chassis: vm
Machine ID: 71c11ed5c0aa41ad909ab96d4c6ad395
Boot ID: a7f1d108ceae42e796e43ea0cd249e6b
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.27.2.el7.x86_64
Architecture: x86-64

 

Additional stuff

These are things that I need to do when I rename my centos7-base VM. They may or may not apply to you.

AWStats

Update the “HostAliases” section in the config file:

/etc/awstats/awstats.www.zoyinc.com.conf

 

 

 

Related

CentOS 7 base VM for WordPress and MythTV
CentOS 7 + PHP 7.2 + Python 3.6 + Apache 2.4
Low Disk Space on “boot”
CentOS 7 VM for WordPress and MythTV – Post install setup
Recent

  • AlmaLinux GUI – no taskbar or application shortcuts

    AlmaLinux GUI – no taskbar or application shortcuts

  • AlmaLinux 9.5 base VM

    AlmaLinux 9.5 base VM

  • Reset Kodi thumbnails

    Reset Kodi thumbnails

  • Set default settings values in Kodi skins

    Set default settings values in Kodi skins

  • Add/Remove/Reset music/video libraries in Kodi

    Add/Remove/Reset music/video libraries in Kodi

  • Zoyinc Kodi skin on Sony TV

    Zoyinc Kodi skin on Sony TV

  • [L] – WordPress UAM Locked Post

    [L] – WordPress UAM Locked Post

  • Import Pictures and Videos – images not previewed

    Import Pictures and Videos – images not previewed

  • Find My Train

    Find My Train

  • WordPress style name not visible

    WordPress style name not visible

About Zoyinc

  • Contact Us
  • Zoyinc Disclaimer
  • Google Search Console
  • Privacy Policy
  • Site Statistics
  • Login

Apache Auckland Backup CD CentOS Centos7 Children Configuration Debian Error ESX ESXi Fedora Firewall Install Josh Kids Kodi Linux MariaDB MySQL MythTV New Zealand OKD OMV Open Media Vault OpenShift PHP Player Python RAID RedHat Red Hat Rip School Setup SMB SonicWALL Spark tags Train Trains VLAN VM VMware Weaver Windows WordPress YouTube

Powered by

This site is licensed under a Creative Commons Attribution 4.0 International License.