Divi WordPress Theme

How to change Linux hostname permanently

Topic: How to change Linux hostname permanently  (Read 1585 times)

Offline Chris

  • Junior Guru
  • **
  • Posts: 81
  • iTrader: +0/-0
    • View Profile
How to change Linux hostname permanently
« on: October 30, 2019, 05:02:15 PM »
I have changed my Linux server’s hostname using hostname command as follow:

hostname my-newhostname.com

But the problem is, whenever I reboot my server, it is reverting to old hostname again. How can I set permanent hostname?
VPS Hosting - AccuWebHosting

Offline Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 655
  • iTrader: +153/-0
    • View Profile
Re: How to change Linux hostname permanently
« Reply #1 on: October 30, 2019, 05:03:29 PM »
hostname command will not change your server’s hostname permanently. If you have latest Linux operating system (systemD based OS), you can do it using hostnamectl command. For complete details, you can refer our following blog post:

https://www.webhostingdiscussion.net/blog/how-to-set-or-change-hostname-in-linux/
Shopify Divi WordPress Theme
Tags:

Redirect the sub-domain on the Linux server (cPanel/WHM)

Started by KailashBoard How Tos

Replies: 0
Views: 10565
Last post July 04, 2007, 11:01:49 AM
by Kailash
How to find processes running by particular user on Linux server

Started by KailashBoard Linux

Replies: 2
Views: 13044
Last post April 02, 2014, 12:14:34 PM
by Rick
command to edit/remove cron job (crontab) on Linux server

Started by KailashBoard cPanel/WHM

Replies: 7
Views: 97291
Last post July 21, 2010, 11:34:10 AM
by webhosting.am
check PHP and MySQL version through shell (SSH) on Linux Server

Started by KailashBoard cPanel/WHM

Replies: 10
Views: 74441
Last post January 11, 2019, 07:18:59 PM
by rubyatiy
command to restart http with SSL on cPanel Linux

Started by KailashBoard cPanel/WHM

Replies: 0
Views: 6652
Last post July 30, 2007, 12:21:02 PM
by Kailash