change user name

1.Reboot your computer and login as  root

2.Open a terminal and Use blow command to change your username

usermod  -l newname oldname

3.(Optional)Now you already changed your username,but your home folder name still are “/home/oldname”,if you also want to change /home/oldname to /home/newname just run below command
usermod -m -d /home/newname newname

4.Note:Of course you can combine step 2 and step 3 using below command

usermod -m -d /home/newname -l newname oldname

 

 
上一篇:【货币机找零问题的递归算法及其优化】


下一篇:实验四