Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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(fallback = NULL)

Arguments

fallback

If not NULL then this value is returned if the username cannot be found, instead of triggering an error.

Value

The user name of the current user.

See Also

Examples

## Not run: 
username()

## End(Not run)

whoami

Username, Full Name, Email Address, 'GitHub' Username of the Current User

v1.3.0
MIT + file LICENSE
Authors
Gábor Csárdi [aut, cre], Maëlle Salmon [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.