Skip to main content

Linux command: Find current username and userid

https://pixabay.com/en/who-question-information-mark-text-2549178/ by https://pixabay.com/en/users/RossMannYYC-5748266/

Find current username

$ whoami

Using id command

$ id -un

Find current userid

# id

Using USER variable

$ echo $USER

Extract from environment settings

$ env | grep USER

Popular posts from this blog

Wireguard VPN: Notes

Notes while trying Wireguard VPN on some of my testbeds.

Install Microsoft .NET Core SDK

.NET Core Software Development Kit (SDK) is a set of libraries and tools that allow developers to create .NET Core applications and libraries.

Docker for Windows: Access Denied

Today, I get this error when running Docker for Windows on Windows 10 Build 1803. So, I check my current username (run whoami ) and add that user to docker-users local group, which has only NT AUTHORITY\SYSTEM account in members list. I must log out and log in again to run Docker for Windows.