rename the host

I have a usb stick with linux Mint on it. The last time I booted it, I noticed there were updates available, so I tried to update. I expected the update to go to the usb drive. It failed because of missing or unavailable files. When I rebooted to Tumbleweed, I saw that the konsole prompt is now “prexy@mint” Previously, the prompt was the model of the computer.

How do I restore the old setting?

Change it as you like

sudo hostnamectl set-hostname <foo>

Thank you. But its not quite what I expected. I ran the command and the prompt came back as prexy@mint. Thinking it was a sudo vs. su issue, I issued the su command, gave my password and the prompt came back with the change I previously entered as sudo. When I exit su, the prompt goes back to prexy@mint.

Am I asking the wrong question?

prexy@mint:~> sudo hostnamectl set-hostname den
[sudo] password for root:  
prexy@mint:~> su
Password:  
**den:/home/prexy #** exit
exit
prexy@mint:~>

Close the existing terminal and you will see it has taken effect. Also you can observe

hostname
cat /etc/hotsname

I didn’t notice the difference by closing the terminal. But, a reboot brought up the correct prompt. I presume closing the terminal without the reboot would have done the trick! Thanks for the info!

That should have said to open a new terminal. Then you would have seen it.

Yes. Sorry I didn’t think of it. When I did a zypper dup, the subsequent reboot showed the correct setting. Thanks for the help!