rename username ubuntu 20.04
usermod -l <newname> -d /home/<newname> -m <oldname>
rename username ubuntu 20.04
usermod -l <newname> -d /home/<newname> -m <oldname>
change username ubuntu
# -l changes login name
# -d changes home directory
# -m copies over contents from old home directory
usermod -l <newname> -d /home/<newname> -m <oldname>
# NOTE: will not work if you are currently logged on as user
# - workaround by temporarily enabling root account and running above command there
# [sudo passwd root]
# - after root account has been used to change username lock it using
# [sudo passwd -l root]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us