Hosting How can I modify my VPS's hostname?

  • Please we urge all unregistered users to swiftly register to enable you enjoy loads of benefits rollingout in our community. Be open to opportunities to do good for someone else today. Anything that do not please God in your life has come to distroy you.
banner

AdServersite

Member
Premium User
Nov 24, 2023
115
0
16
33
Abuja Nigeria
I attempted it this way.

Code:
sudo nano /etc/sysconfig/network

and I made changes to this file

Code:
HOSTNAME=myserver.domain.com

However, when I use hostname -f to check, it still does not return the desired hostname.

Could you please tell me how to completely change the hostname on my VPS?
 
I attempted it this way.

Code:
sudo nano /etc/sysconfig/network

and I made changes to this file

Code:
HOSTNAME=myserver.domain.com

However, when I use hostname -f to check, it still does not return the desired hostname.

Could you please tell me how to completely change the hostname on my VPS?
If Nano is set up on your server, you can utilize this extra method.

By using this command

nano /etc/hosts

Modify to anything close to this

As illustrated

105.197.10.132 server.yourdomain.com

Your IP address is 105.197.10.132 in the line above.

I hope it's useful.
 

BSF For Soul Wining Support Donation

Total amount
$0.00
Goal
$1,000.00
Donation ends: