Go to the first, previous, next, last section, table of contents.


getlogin

Syntax

#include <unistd.h>

char *getlogin(void);

Description

Get the login ID of the user.

Return Value

Returns the value of the USER environment variable, else the LOGNAME environment variable, else "dosuser".

Portability

not ANSI, POSIX

Example

printf("I am %s\n", getlogin());


Go to the first, previous, next, last section, table of contents.