On 10/27/23 07:50, Greg Wooledge wrote:
On Fri, Oct 27, 2023 at 07:29:20AM -0400, Pocket wrote:
On 10/27/23 07:12, gene heskett wrote:
I tried to change just this machine to see how its done, and managed to
get all the right answers, which did not affect my local network since I
generally use the alias name for an ssh or sshfs login, but on a reboot
its all gone.  So how the heck do we do that so it survives a reboot?

*What* is "all gone"?  Show us commands and their output, and then explain
why the output is not what you expected.

/etc/hosts

If you're using short-form hostnames like this:

unicorn:~$ hostname
unicorn

then yeah, that's all you need.  If you're using long-form hostnames
(with dots in them), then you also need to configure /etc/hostname.

I use the short-form hostnames, so mine is simply:

unicorn:~$ cat /etc/hostname
unicorn

Couldn't be simpler, really.

.
You saw my hosts entry in the last post, but again
192.168.71.3    coyote.home.arpa        coyote
but after a reboot, domainname returns none, and the /etc/domainname file has been deleted. As in not visible to an ls of /etc. hostname works as it should. My hosts file is all long form, dotted names with a trailing alias. So I just sudo edited /etc/domainname, and entered "home.arpa\return" and wrote the flle.
results:

gene@coyote:/etc$ sudo nano domainnane
[sudo] password for gene:
gene@coyote:/etc$ domainname
(none)
gene@coyote:/etc$ cat domainname
cat: domainname: No such file or directory
now I see the typu. sudo mv to fx the files name. but even with a corrected filename visible to an ls:
gene@coyote:/etc$ domainname
(none)
gene@coyote:/etc$ cat domainname
home.arpa

I'd reboot again, but that, by the time I get everything remounted and my system fully operational, takes me entering my pw about 20 times. when done I am logged into 6 other machines via an ssh -X login to each, and I've a sshfs file transfer link setup to each so mc can copy work output around. Then I can go to work.

Why was the domainname I set and could see with a cat, deleted by a reboot? Seems to be the question for the day... I sure didn't delete it. But it was gone after a reboot. Seems to me there ought to be a PERMANENT way to do this. Now, even if the file exists, its ignored.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis

Reply via email to