whoami
Print the username associated with the current effective user ID. More information: <https://www.gnu.org/software/coreutils/whoami>.
Install
- All systems
-
curl cmd.cat/whoami.sh
- Debian
-
apt-get install coreutils - Ubuntu
-
apt-get install coreutils -
Alpine
-
apk add coreutils - Arch Linux
-
pacman -S coreutils - Kali Linux
-
apt-get install coreutils - CentOS
-
yum install coreutils - Fedora
-
dnf install coreutils - Windows (WSL2)
-
sudo apt-get updatesudo apt-get install coreutils - OS X
-
brew install coreutils - Raspbian
-
apt-get install coreutils - Docker
-
docker run cmd.cat/whoami whoamipowered by Commando
Print the username associated with the current effective user ID. More information: <https://www.gnu.org/software/coreutils/whoami>.
-
Display currently logged username:
whoami -
Display the username after a change in the user ID:
sudo whoami
© tl;dr; authors and contributors