FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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
CMD prompt
Getting database connection error while installing wordpress
Password forgotten and not getting an email
Error : Sorry, but this username has already been taken.
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!
Reply to topic    Frihost Forum Index -> Computers -> Computer Problems and Support

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