Customize the default identity displayed by Ubuntu WSL.
By default, commands such as:
whoami
and:
hostnamectl
may display names associated with the original WSL/Windows setup.
This guide explains how to change the Linux username and hostname safely.
Check the current Linux username:
whoami
Example:
chukwuemeka-peter-eze
Check the current hostname:
hostname
Example:
DESKTOP-2EB2GUA
You can also inspect the hostname configuration:
hostnamectl