LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

login

initiates a user session on the system

TLDR

Log in as user
$ login [user]
copy
Log in without authentication
$ login -f [user]
copy
Log in preserving environment
$ login -p [user]
copy
Log in from remote host
$ login -h [host] [user]
copy

SYNOPSIS

login [options] [username]

DESCRIPTION

login initiates a user session on the system. It authenticates users, sets up the environment, and starts a shell. This command is typically invoked by init or a terminal program.

PARAMETERS

-f

Skip authentication (for preauthenticated users)
-p
Preserve environment variables
-h HOST
Specify remote hostname (for remote logins)

INSTALL

sudo apt install login
copy
sudo apk add util-linux-login
copy

CAVEATS

Direct invocation is restricted to root or when called from specific programs. The -f option is only available to root. PAM modules control authentication behavior.

HISTORY

The login command dates back to the original Unix systems at Bell Labs in the 1970s, providing the fundamental user authentication mechanism.

SEE ALSO

su(1), sudo(8), passwd(1), getty(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid