How to change hostname permanently without any issues?

So the title says it all.
I set up a hostname while installation which I don’t like now.
Is there any way to change my hostname permanently?

Once again this is far from a technical issue. Post in the correct forums please.

Also a 2 second Google search would have helped.

5 Likes

What I meant is that the al installer only hardcodes the hostname to /etc/hostname and /etc/hosts? Or are there any other places where the installer hardcodes the hostname and has to be changed manually.
Actually, I did a reinstall today and now I don’t like my hostname lol, just like when I posted the question in the first place.

So, if you can specify what exactly al installer does with the hostname info and where it hardcodes, that would be good.
Also, I’m talking about the most recent version of al installer as I just reinstalled today, 23-Dec-2020.
Thanks!

The installer doesn’t do anything unique/special with the hostname. You just need to edit the /etc/hostname file and on reboot everything else will change. Keep in mind the hostname file needs to be a single line - do not hit enter and add a blank line at the end.

1 Like

Probably best to also change /etc/hosts so that the 127.0.1.1 (or the permanent IP address of the machine, if it has one) line matches /etc/hostname. It’s only used if the box has no internet access but this is standard practice for Debian-based distributions and recommended in the official Arch installation guide.

1 Like