Home > Operation and Maintenance > Linux Operation and Maintenance > How to change username in linux

How to change username in linux

青灯夜游
Release: 2023-01-05 16:10:38
Original
80233 people have browsed it

How to modify the username in Linux: 1. Enter the terminal, execute the "su -" command, enter the password, and obtain root permissions; 2. Execute "usermod -l new username old username" or "groupmod - n New Username Old Username" command to modify the username; 3. Restart the computer.

How to change username in linux

The operating environment of this tutorial: Red Hat Enterprise Linux 6.1 system, Dell G3 computer.

How to change the user name in Linux

(Assume that the old user name is test and you want to change it to the new user name love)

1. Enter the terminal, enter: su - Enter, then enter the password to obtain root permissions. As shown below:

Enter: usermod -l love -d /home/love -m test and press Enter . As shown below:

or enter: groupmod -n love test and press Enter . As shown below:

#3. Restart the computer and the user name has been modified.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to change username in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template