Ask Your Question
0

Change user ID from terminal

asked 2016-11-17 06:24:22 -0600

jdelsolar gravatar image

Hi there:

my username is as follows:

jvelarde@jvelarde ~]$

and i want to change is to:

PC1@jvelarde ~]$

I use fedora23, thanks for the support

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-11-17 06:55:39 -0600

fcomida gravatar image

updated 2016-11-17 06:56:15 -0600

Your username is jvelarde, the prompt is showing your username and hostname that seems to be jvelarde too. Use hostnamectl to set, display, manipulate the hostname. Then prompt will show something like jvelarde@PC1 edit ~/.bashrc to change how prompt is displayed. Have a look here: http://www.linuxselfhelp.com/howtos/Bash-Prompt/Bash-Prompt-HOWTO-2.html

edit flag offensive delete link more

Comments

And if you are running Gnome, and want to change your hostname (shown in bash behind the @), then click on Settings --> Details.

Of you really want to change your username from jvelarde to PC1 (what i doubt), you can use a graphical program called system-config-users.

florian gravatar imageflorian ( 2016-11-17 10:32:42 -0600 )edit

Thanks for your answer but: i have this:

jvelarde@jvelarde ~]$

and i want this:

PC1@jvelarde ~]$

jdelsolar gravatar imagejdelsolar ( 2016-11-17 13:04:24 -0600 )edit

I went to the graphical interface to change the required fields, and now can't log into the computer.

HELP hahahaha

jdelsolar gravatar imagejdelsolar ( 2016-11-17 13:35:38 -0600 )edit
0

answered 2016-11-17 16:53:24 -0600

ssieb gravatar image

You can use the command usermod -l newuser olduser to change the username. But you will probably want to change the home directory as well, so use usermod -l newusername -d /home/newusername oldusername and then do mv /home/oldusername /home/newusername.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-11-17 06:24:22 -0600

Seen: 630 times

Last updated: Nov 17 '16