kali linux
Read Time:2 Minute, 13 Second

In this post, we are gonna tell you how to change the username in Kali Linux, This tutorial is very simple and can be achieved with simple commands

There are so many reasons to choose a username, but sometimes we choose a username that does not look good, there is nothing to worry about, we can change the username at any time, Let’s see how we can change the username for the Kali Linux

The good thing about Kali Linux is it asks for a non-root user account during the installation steps, but in some cases, we have to create a low privileged user account

how to change username and password in kali linux

I have installed the Kali Linux Machine using Virtualbox so this post deals with how to change username in kali linux VirtualBox,

Firstly you have to log in with the Root account to create a user or delete users and do some privileged operations with your machine

After Login, I am going to create a new user account, In case if you have forgotten your Kali Linux username you can reset it by following our tutorial on How to reset Kali Linux Password

 

how to change username in kali linux

If you are logged in then typing the command whoami will return the current user info, and to add a new user you have to use useradd command along with the desired username

To create a new user account, we have to type the following command where we have chosen testuser as a username

sudo useradd -m testuser

after typing this command a new user account will be created with low-level system privileges, we can verify the user account by switching to the user account

su testuser

Then  whoami

to set the password for the account we will use the following command

sudo passwd username

In our case, we set the username with testuser, Now it will prompt you to set the Password for the user, choose the password for the account and you may restart your machine and login with that account

Note that to change the username we have created a new user account in our machine, but you don’t have to do so, Now its time to change the username for that account, for that we have to type the below command

change the username for kali linux

usermod -l newusername oldusername

 

in our case, we have testuser as an old user account name and newuser as the new user account, after typing the command the username will be changed, you can verify by switching the user

change user kali linux

Hope you guys learnt how to change username in kali linux, if you face any problem then let us know

About Post Author

Indian Cyber Troops

Indian Cyber Work For Nation's Wellness And Nation's Security We Share new and unique things with you Jai Hind Jai Shri Ram