90.8k views
4 votes
What is the command to display the user name with which youhave logged in?

User Apricot
by
5.3k points

1 Answer

4 votes

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.

User Niana
by
5.6k points