•  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 : "RED HAT 7 LITE IT를 CALL"
  • 어떻게 설정하거나 ldappasswd와 사용자 암호를 변경하려면?
  • How to change user password in Linux?
  • How to change the password through Remote Desktop (RDP)
  • How to change cpanel password from WHM?
  • 어떻게를 CentOS 7 IP 범위를 구성하는 방법?
  • 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
  • Linux의 경우 최고 호스팅 제어 패널
  • EasyApache 4 : 이전보다 더 나은?
  • FreeBSD의 VS 리눅스 : 비교
  • 101 OpenStack은 : 당신이 필요가있는 무엇을 알
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