Tagged: /etc/hostname, /etc/hosts, change antiX hostname, hostname
- This topic has 1 reply, 2 voices, and was last updated Mar 1-1:28 am by Robin.
-
AuthorPosts
-
March 1, 2023 at 12:11 am #100812Member
dukester
I’m trying to setup the nn newsrewder.
It chokes because my hostname is simply antixbox
It wants a FQDN hostname.
I used sudo hostname=antixbox.org
My hostname got changed for the session, but firefox quit working.
My terminals quit working. I thought I had hosed the system.I went to a virtual terminal, logged in and halted the system.
My original hostname is back.So how do I change the hostname without trashing the system? TIA
--
dukesterMarch 1, 2023 at 1:28 am #100814MemberRobin
::You need to change the hostname in two places in the proper order, otherwise you might easily lock yourself out of the system.
I did it successfully this way:
1.) edit the file /etc/hosts using either geany or leafpad.
ADD the line
myname 127.0.0.1
without removing the existing entry:
antix1 127.0.0.12.) Then REPLACE the very line in the file /etc/hostname
change from
antix1
to
myname3.) Then again edit /etc/hosts and REMOVE now the original line
antix1 127.0.0.1
keep the new line
myname 127.0.0.1By all means, observe this procedure strictly in the given order. You need root privileges in order to be able to save the files back to disk after editing.
And now, with root privileges enter in Terminal (e.g. roxterm):hostname -F /etc/hostnameThis procedure will change the hostname of your antiX permanently, and even survive a reboot.
(On live system you’ll need to perform a live remaster from antiX control center to keep it.)———-
P.S.: Please keep in mind you NEED to use a valid hostname:„The hostname should be composed of up to 64 7-bit ASCII lower-case alphanumeric characters or hyphens forming a valid DNS domain name. It is recommended that this name contains only a single label, i.e. without any dots. Invalid characters will be filtered out in an attempt to make the name valid, but obviously it is recommended to use a valid name and not rely on this filtering.”
Hostname specification quoted from and further reading at freedesktop.org.
Windows is like a submarine. Open a window and serious problems will start.
-
AuthorPosts
- You must be logged in to reply to this topic.