Linux 和 Windows 获取当前登录用户的用户名

Linux Windows Command About 77 words

Linux

echo $USERNAME

whoami

PowerShell

$env:USERNAME

CMD

echo %USERNAME%
Views: 7 · Posted: 2026-07-01

———         Thanks for Reading         ———

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Prev Post
Today In History
Browsing Refresh