FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Getting username in cmd

 


RiCtee
How do you get the currently logon user's name in the command line. I know there is a way, but forgot Rolling Eyes . It's a variable / command / something....
badai
for windows:
echo %username%

for un*x:
whoami
RiCtee
Owh...as easy as that. Thanks.
billgertz
You can also learn other global system variables by typing set on the command prompt.

e.g.

C:\set [press ENTER]
bcarasco
Also, there is a graphical interface to view/set environment variables.
Control Panel -> System -> Advanced -> Enviroment Variables...

System Variables are available for every user;
User Variables are available for just the current user.
Reply to topic    Frihost Forum Index -> Computers -> Computer Problems and Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.