sethostname doesn't make permanet the hostname

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sethostname doesn't make permanet the hostname

1,308 Views
Ratataplam
Contributor II

I use

 sethostname()

to write my custom hostname on embedded device and works because I don't get back any error and if I read the new hostname with 

gethostname()

 the name is cotrrect, but after hw reboot my hostname go back to old value .

Why? And how can make permament the new value without update any configuration file (e.g. /etc/hostname )?

Thanks

0 Kudos
Reply
0 Replies