whoami (version 1.0.0)

username: User name of the current user

Description

Tries the LOGNAME, USER, LNAME, USERNAME environment variables first. Then it tries the `id` command on Unix-like platforms and `whoami` on Windows.

Usage

username()

Arguments

Value

  • The user name of the current user.

See Also

Other user.names: email_address; fullname; gh_username; whoami

Examples

Run this code
username()

Run the code above in your browser using DataLab