• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

How do I change the hostname?

E

ergos

Guest
Hi all,
how can I change the hostname of my box from localhost.localdomain to something different?

Thanks in advance,
Filippo

(running plesk 8.0.1)
 
In your control panel, click on "Server" then "Server Preferences" - you'll see where you can change the hostname. What I normally do then is through SSH do:

#hostname new.host.name

This works for RedHat and CentOS.
 
Another side note, after you issue the shell command, your active console wont update by itself. Typically, the command "reset" will reset your SSH console, allowing any changes to show properly. (I.e. your new hostname will appear as NewHostname@~: instead of OldHostnaame@~:..

Just a bit of a quick fix, keeps from having to log back in and log back out...

-John
 
Using the hostname command doesn't make the change permanent (reboot and it's changed back). Also it doesn't update the configuration of qmail and some other apps (I believe).

Better change it through Plesk, as that also updates files like /etc/sysconfig/network (to make the change permanent after reboots, which you can do yourself as well, of course) and /var/qmail/control/me. Probably more...
 
Back
Top