When I connect to Linux 18 I get this name@server-Belkin ~> How can I remove "name"? and change it to other name
-
1The format is username@hostname:current-working-directory, so that is probably the username you chose. – user535733 Oct 03 '19 at 15:46
-
yeah a now but i want change the username – john Oct 03 '19 at 15:49
-
1Change the username everywhere? Or just change the prompt string in terminal? – user535733 Oct 03 '19 at 15:52
-
2i wante to change name everywhere , i find to change hostname but i don t find how to change user name – john Oct 03 '19 at 16:01
-
@john Ubuntu, or Lubuntu? Please click [edit] and remove the tag if it's Ubuntu; if it's really Lubuntu you are using, please update the subject line accordingly. – K7AAY Oct 03 '19 at 17:46
-
Linux 18 = mint. Not Ubuntu. Did you mean 18.04? – Rinzwind Oct 03 '19 at 17:52
1 Answers
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.

- 17,202