The officially official Devuan Forum!

You are not logged in.

#1 2017-06-11 13:04:30

spartrekus
Member
Registered: 2017-04-30
Posts: 132  

How to change the Hostname in DEVUAN ?

Hello,

How to change the Hostname in DEVUAN ?

Probably the method echo "mynewpcname" > /etc/hostname with after a reboot, is not the official one wink

thank you

Offline

#2 2017-06-11 19:27:27

greenjeans
Member
Registered: 2017-04-07
Posts: 434  
Website

Re: How to change the Hostname in DEVUAN ?

spartrekus wrote:

Hello,

How to change the Hostname in DEVUAN ?

Probably the method echo "mynewpcname" > /etc/hostname with after a reboot, is not the official one wink

thank you

well that's how I do it, it actually says in the man page for hostname, that editing etc/hostname is the only way of permanently changing it.


https://sourceforge.net/projects/vuu-do/
Vuu-do GNU/Linux, minimal 64 and 32 bit Devuan-based openbox and mate systems to build on, maximal versions if you prefer your linux fully-loaded.

Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#3 2017-06-11 20:13:57

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,858  

Re: How to change the Hostname in DEVUAN ?

Change it permanently:

echo "mynewpcname" > /etc/hostname

(or open it in your favorite root editor)

Change it now:

hostname mynewpcname

Then log out and log in again. No need to reboot.

And if the old name is in /etc/hosts, change it there, too.

Offline

#4 2017-06-18 17:13:50

spartrekus
Member
Registered: 2017-04-30
Posts: 132  

Re: How to change the Hostname in DEVUAN ?

fsmithred wrote:

Change it permanently:

echo "mynewpcname" > /etc/hostname

(or open it in your favorite root editor)

Change it now:

hostname mynewpcname

Then log out and log in again. No need to reboot.

And if the old name is in /etc/hosts, change it there, too.


I do this way too wink thanks for confirming me....
However on a PI III B, the above method does not work.

About Hostname: SystemD is ugly, isn't it??

Plus, So, it means the following:  This page would need a small update.
https://wiki.debian.org/HowTo/ChangeHostname

Last edited by spartrekus (2017-06-18 17:14:30)

Offline

Board footer