Easy Steps to Change Your Username on Linux
While working on Linux operating system, username is of utmost importance. Some consumer oriented operating systems such as Windows Vista and XP sometimes allow sole user to log on to the desktop without asking for any username and password. However Linux doesn’t offer such convenience (except for KDE which apparently does). Every user has to type his/her username and password before he/she is allowed to login into the desktop or shell.
Sometimes it so happens that you feel a need to change your username. There may be several distinct reasons why people tend to change their username. Some might get bored by using the same one for a long time while others might find their username unattractive.
Whatever might be the reason, to get your username changed in Linux you need to follow the below mentioned command:
usermod -l new login name old login name
In the command above, replace the “new login name” by new username that you would like to apply in future. In place of “old login name” you need to type the existing username which you are looking to change.
In case of NIS accounts, you need to give some additional commands for maintaining an accurate copy of consumer account across the computer network. The following commands must be used.