Setting system hostname

A very simple question I am sure, but I can't seem to solve it…

My new install of debian small didn't seem to have a hostname set by default, and in installing apps, many are squaking that I don't have a hostname set. So, I tried to set it manually (to localhost, which is fine I assume), but it doesn't seem to hold across reboots. I have added 127.0.0.1 to the hosts file, and created a /tec/HOSTNAME file with localhost in it, but no dice. Any advice?

2 Replies

Not sure about debian. Check for a /etc/sysconfig/network file and be sure there is a hostname= somewhere

Got it figured out. Needed to add localhost to the /etc/hostname file.

Thanks!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct