cat /etc/hostname

the console show me my ip adress, when i type cat /etc/mailname

it shows me my-ip-adress.internetserviceteam.com

I have no idea if it's a problem or not, but i was lokking through a lot of postfix install tutorials, and there when typing cat /etc/hostname they were geting their site name. Why do i get just a ip-adress? Maybe i messed up something when i set up my dns and domains with the webmin tool (I did that for the first time in my life)?

OS: debian

1 Answer 1


Probably /etc/hostname was created by your hosting provider. If you want to change your hostname you can set it in there, e.g. replace the line currently in there with the machine's name (write bla in there, not bla.example.org). This change will get picked up on reboot by the init script /etc/init.d/hostname.sh (have a look at it, its not too hard). You could also change the hostname at runtime with

hostname bla

but this can lead to inconsistencies with services that already run.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .