FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
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.
Related topics

Windows Vista - Official Thread
Updating phpbb
Windows Tips&tricks!
Getting paid online?
Top 14 Humor of Getting married

Other Forums
751 Useful Windows XP Files
London is getting nailed with terrorists
Manchester United getting Americanized!!!!!!
Marketplace Blacklist! - Read to avoid being scammed!

Must cpanel be 2082? I can't connect
Cpanel Question. Very serious.
FTP GAH
make up a Suspended list
[RESOLVED] Can't use second FTP account
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.