Answers for "change current username linux"

8

linux change username

# login as root and make sure that there are no active processes for user
usermod -l NEW_USERNAME OLD_USERNAME
# if user is running kill user w the following command
userUID=$(id -u OLD_USERNAME) && pkill -U $userUID
Posted by: Guest on May-05-2020
2

linux change prompt to current user

# environment variable PS1 to customize prompt
# \u current user
export PS1="\u : "
#example
username:
Posted by: Guest on June-12-2021
0

Command to Change Users in a Linux

$ sudo -u <user> <command>
Posted by: Guest on April-10-2022

Code answers related to "change current username linux"

Browse Popular Code Answers by Language