6

When I connect to Linux 18 I get this name@server-Belkin ~> How can I remove "name"? and change it to other name

john
  • 63
  • 1
  • 4

1 Answers1

8

COMPUTER NAME CHANGE

First, run sudo hostnamectl | grep hostname and confirm that's the name of the PC you want to change.

Next, run sudo hostnamectl set-hostname whatever where whatever is the name you wish to use henceforth.

Confirm the change was effective with sudo hostnamectl | grep hostname to see the change was effective.

When I check the man page for hostnamectl, I can't see if it require elevated priveleges, so you may be able to do it without the sudo.

USER NAME CHANGE

Set the "root" account password with sudo passwd root then log out with exit and log in using the "root" account and the password you just set.

Change the username and the home folder to the new name that you want with usermod -l <newname> -d /home/<newname> -m <oldname>

Return the root account to its usual unreachability with passwd -l root then logout with exit.

Login with your new username.

K7AAY
  • 17,202