Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

First of all, this question is not a duplicate of Change computer name of an Ubuntu desktop computerChange computer name of an Ubuntu desktop computer or Change Ubuntu NameChange Ubuntu Name.

I know to change hostname, I need to edit the file hostname and hosts under /etc. No problem with that. The problem is how to change hostname if the system has already booted into the wrong hostname, without a reboot. I.e., to change the hostname on the fly.

This was used to be done with /etc/init.d/hostname.sh, but now, under my Ubuntu 13.10 Saucy, that file is no longer there. How to change the hostname on the fly then?

First of all, this question is not a duplicate of Change computer name of an Ubuntu desktop computer or Change Ubuntu Name.

I know to change hostname, I need to edit the file hostname and hosts under /etc. No problem with that. The problem is how to change hostname if the system has already booted into the wrong hostname, without a reboot. I.e., to change the hostname on the fly.

This was used to be done with /etc/init.d/hostname.sh, but now, under my Ubuntu 13.10 Saucy, that file is no longer there. How to change the hostname on the fly then?

First of all, this question is not a duplicate of Change computer name of an Ubuntu desktop computer or Change Ubuntu Name.

I know to change hostname, I need to edit the file hostname and hosts under /etc. No problem with that. The problem is how to change hostname if the system has already booted into the wrong hostname, without a reboot. I.e., to change the hostname on the fly.

This was used to be done with /etc/init.d/hostname.sh, but now, under my Ubuntu 13.10 Saucy, that file is no longer there. How to change the hostname on the fly then?

Source Link
xpt
  • 8.9k
  • 43
  • 114
  • 168

Change Ubuntu hostname on the fly

First of all, this question is not a duplicate of Change computer name of an Ubuntu desktop computer or Change Ubuntu Name.

I know to change hostname, I need to edit the file hostname and hosts under /etc. No problem with that. The problem is how to change hostname if the system has already booted into the wrong hostname, without a reboot. I.e., to change the hostname on the fly.

This was used to be done with /etc/init.d/hostname.sh, but now, under my Ubuntu 13.10 Saucy, that file is no longer there. How to change the hostname on the fly then?