• Register
Welcome to Ubuntu-MM Q&A, Ubuntu Linux ႏွင့္ ပတ္သက္သမွ် သိခ်င္တာ ေမးပါ။ မေမးခင္ ေမးၿပီးသား ရွိမရွိ ရွာပါ။ အေမးရွိၿပီး အေျဖမရွိေသးပါက ေမးခြန္းကို Vote ေပးခဲ့ပါ။

How to change current username in ubuntu?

0 like 0 dislike

Hello all,

I want to change my current username in ubuntu16.04 lts but when i run 

$ usermod -l newusername oldusername 

usermod: user   username is currently used by process pid.

so i want to know How could i change my username .

Thanks,

asked May 19 in Beginner by Lar May See (120 points)

3 Answers

0 like 0 dislike
use with sudo bash or sudo su
answered May 20 by kokoye2007 (3,690 points)
Thanks Your help .But Still show me is  username is currently used by process pid .I use sudo bash and sudo su both of .Do i need to kill the process id?

I have no idea.
0 like 0 dislike
If you want to change current user,
1.Change new user name
$ sudo usermod -l new_username current_username

2.move home dir.
$ sudo mv /home/current_username /home/new_username

3.change home dir
$ sudo usermod -d /home/new_username new_username
answered May 21 by Thura (610 points)
0 like 0 dislike
why not login from root or make a new sudo user (roottwo) and using (roottow) form change old user name to new username
answered May 29 by kokoye2007 (3,690 points)

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
...