Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.