•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Backup
    • Content Delivery Network
    • Colocation Hosting
    • Dedicated Hosting
    • DDoS Mitigation
    • IP Transit
    • Private Cloud
    • Wavelength
  •  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
    • Dedicated Servers
    • Colocation
    • Private Cloud
    • DDos Protection
    • IP Transit
    • CDN
    • Backup
  • 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?
  • Is Centos 8 the last stable OS release?
  • Setup VPN on CentOS 8
  • Yum Update Not Working on Centos 7
  • Upgrade Centos 6 to Centos 7
  • How To Run Kubernetes on Psychz Networks Bare Metal Servers
  • 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
Hosting Services
  • Dedicated Hosting
  • Colocation Hosting
  • Backup
  • IP Transit
  • DDoS Mitigation
Support
  • Portal Login
  • Knowledgebase
  • Community
Company
  • About Us
  • Contact Us
  • Network
  • Data Centers
  • Looking Glass
  • Affiliates
  • Reseller
  • Blog
Policies
  • Privacy Policy
  • Acceptable Usage Policy
  • Terms and Conditions
  • Service Level Agreement
Company
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801
Subscribe to Our Mailing List
* indicates required
Copyright © 2023 Psychz Networks, A Profuse Solutions Inc Company