Answer:
echo %username%
whoami
Step-by-step explanation:
In windows the command used to display user name which you have logged in is echo %username%.Note that it is only for windows platform only .It works on all released windows platforms.
There is another command whoami it tells the domain name also along with the username.
You have to write all these commands on the command prompt.