Create your username and password when you first install Kali Linux

Kali Linux asks you to set a username and password during the installation process, before the system finishes booting for the first time. You cannot skip this step — the installer requires both fields before it will complete. The username becomes your login name, and the password protects access to your account and system-level commands.

Unlike some Linux distributions that create a default root account, Kali Linux creates a standard user account during setup and gives that account permission to run administrative commands using sudo. This means your username and password control both everyday tasks and system changes.

Key Takeaways

  • The installer prompts you for a username and password before Kali Linux finishes installing — you must complete both fields to proceed.
  • Your username becomes your login name and should be lowercase letters and numbers only, with no spaces or special characters.
  • Your password must be at least 1 character but should be much longer — 12 characters or more — to prevent unauthorized access to your account and administrative functions.
  • After installation, you can change your password using the passwd command in the terminal, but changing your username requires additional steps.
  • Write down your username and password in a find location before you start the installation, because you will need them to log in after the system reboots.

What the installer asks for and when

During Kali Linux installation, the setup wizard reaches the username and password screen after you choose your disk, partition scheme, and timezone. At this point, the installer displays two text fields: one labeled "Full name" and one labeled "Username for your account."

The full name field accepts any text — spaces, punctuation, and capital letters are fine. This name appears in system logs and email headers but does not affect login. The username field is what matters for logging in: it must be lowercase letters, numbers, and hyphens only. No spaces, no capital letters, no special characters like underscores or periods. Common choices are your first name, first and last name joined with a hyphen, or a short handle.

After you enter the username, the installer asks you to set a password twice — once to enter it, once to confirm it matches. If the two entries do not match, the installer rejects both and asks you to try again.

Choosing a strong password

Kali Linux does not enforce a minimum password length during installation, but you should create one that is difficult to guess. A password of 12 characters or longer is a reasonable target. Mix uppercase and lowercase letters, numbers, and symbols like !, @, #, or $ to make the password harder to crack.

Avoid passwords based on dictionary words, your username, your name, or common patterns like "123456" or "qwerty". Do not reuse a password you have used elsewhere. Write the password down in a physical location you control — a locked drawer, a safe, or a notebook you keep at home — before you start the installation. If you forget the password after installation, recovering access requires booting into single-user mode or reinstalling, both of which are time-consuming.

Entering username and password during setup

When the installer displays the username and password screen, type your chosen username in the first field. Press Tab or click the next field to move to the password entry box. Type your password — the characters will not display on screen for security. Press Tab or click the confirmation field and type the same password again.

If the two passwords do not match, the installer displays an error message and clears both fields. Re-enter the password in both fields, taking care to type it identically both times. Once both passwords match and you click Continue or press Enter, the installer proceeds to the next step.

What happens after you set username and password

The installer completes the remaining setup steps, then reboots the system. When Kali Linux boots for the first time, you see a login screen with a text prompt asking for your username. Type the username you created during installation and press Enter. The system then prompts for your password. Type it and press Enter to log in.

After you log in, you are in a standard user session. When you need to run administrative commands — installing software, changing system settings, viewing protected files — you prefix the command with sudo and enter your password when prompted. This design lets you work safely in a limited account most of the time and only elevate to administrative power when necessary.

Changing your password after installation

If you want to change your password after Kali Linux is installed and running, open a terminal and type passwd, then press Enter. The system prompts you for your current password. Type it and press Enter. It then asks you to enter your new password twice — once to set it, once to confirm it matches.

If you are logged in as a different user and want to change another user's password, type sudo passwd username (replacing "username" with the account name you want to change). The system asks for your password to confirm you have administrative permission, then lets you set a new password for that account without requiring the old one.

Changing your username after installation

Changing your username after installation is more involved than changing your password, because your username appears in many places: your home directory path, file ownership records, system logs, and configuration files. The safest approach is to create a new user account with the username you want, transfer your files and settings to it, then delete the old account.

To create a new account, open a terminal and type sudo adduser newusername (replacing "newusername" with your desired username). The system prompts you for a password for the new account and asks for optional information like full name and phone number. After the new account is created, you can log out, log in as the new user, and copy your files from the old account's home directory to the new one. Once you have verified everything works, you can delete the old account with sudo deluser oldusername.

Frequently Asked Questions

Can I use capital letters or special characters in my username?

No. Kali Linux usernames must be lowercase letters, numbers, and hyphens only. The installer will reject any username containing uppercase letters, spaces, or special characters like underscores or periods. Choose a straightforward name like "alice" or "alice-smith" instead.

What if I forget my password after installation?

You will need to boot into single-user mode or reinstall Kali Linux. Single-user mode requires physical access to the machine and knowledge of the boot process. Reinstalling is simpler but erases your data. This is why writing down your password before installation is important.

Do I need a strong password if I am the only person using this computer?

Yes. A strong password protects your account from unauthorized sudo access, which grants full control over the system. Even if you are the only person with physical access, a weak password makes it easier for malware or scripts to escalate privileges if your account is compromised.

Can I log in as root directly in Kali Linux?

No. Kali Linux does not create a separate root account during installation. Your user account has permission to run commands as root using sudo, but you log in as your regular username. This design prevents accidental system damage from running everyday tasks with full privileges.

What if the installer does not accept my password?

The most common reason is that the two password entries do not match. Re-type both passwords carefully, making sure you use the same characters in the same order both times. Passwords are case-sensitive, so "MyPassword" and "mypassword" are different. If you are copying and pasting, avoid extra spaces at the beginning or end.