•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

Change Hostname Centos 7?

  • Home
  • Client
  • Qa Forum
  • Change Hostname Centos 7?

Posted By: sun | 1 Replies | Last Reply On: Oct 03, 2017 05:52:22

How to change hostname in Centos 7? 

Psychz - Amol

Votes: 0Posted On: Oct 03, 2017 05:52:22
 

"Hostname" is the name of your device that the network identifies with. The hostname is stored locally in the file "/etc/hostname". It is mapped to the network for communication. Please follow the following steps to change the hostname of your system.

 

1. Check in your hostname by running the command "hostname" on your terminal.

2. Edit the "/etc/hostname" file in which the hostname is stored in your system. Provide any hostname of your choice. You can use the following command to edit the file.
(Note: You will need root permission to edit the file)

 

vi /etc/hostname

(Note: In this case, we are using the "vi" editor to edit the file. However, you can choose any text editor of your liking.)

 

3. Once you have saved the file with your new hostname, run the command "hostname" to confirm. The new hostname should be displayed on the screen.

4. Check the "/etc/hosts" file and edit the hostname same as in "/etc/hostname". The "hosts" file maps the hostname to IP address. Hence, it is very important that you edit the hostname in the file. Please edit the hostname mapped with the IP address "127.0.1.1". 

5. Any changes made in the files do not take effect until the system is rebooted. So, please reboot the system for the changes to take effect.

Was this reply helpful?

Related topics

  • CentOS 7: "CALL IT RED HAT 7 LITE"
  • How to set or change user passwords with ldappasswd?
  • How to change user password in Linux?
  • How to change the password through Remote Desktop (RDP)
  • How to change cpanel password from WHM?
  • How to configure an IP range on Centos 7?
  • Setup VPN on CentOS 8
  • Yum Update Not Working on Centos 7
  • How To Run Kubernetes on Psychz Networks Bare Metal Servers
  • Upgrade Centos 6 to Centos 7
  • Operating System Installation through client area
  • Top Hosting Control Panels For Linux
  • EasyApache 4: better than ever?
  • In Comparison: FreeBSD VS Linux
  • Open Source Proxy Server Solutions
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801