• Welcome to Web Hosting Forum - A Web Hosting Community for Webmasters.
 

Recommended Providers



WordPress Hosting

Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress

WordPress Hosting Divi WordPress Theme
WPZOOM
Bluehost WordPress Hosting

Forum Membership

Forum Membership

How to change Linux hostname permanently

Started by Chris, October 30, 2019, 05:02:15 PM



Chris

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?

Kailash

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/


WordPress Hosting