Linux and Unix login command

Quick links

About login
Syntax
Examples
Related commands
Linux and Unix main page

About login

Signs into a new system.

Syntax

login [ -p ] [ -d device ] [-h hostname | terminal | -r hostname ] [ name [ environ ] ]

-pUsed to pass environment variables to the login shell.
-d devicelogin accepts a device option, device. device is taken to be the path name of the TTY port login is to operate on. The use of the device option can be expected to improve login performance, since login will not need to call ttyname. The -d option is available only to users whose UID and effective UID are root. Any other attempt to use -d will cause login to quietly exit.
-h hostname | terminalUsed by in.telnetd to pass information about the remote host and terminal type.
-r hostnameUsed by in.rlogind to pass information about
the remote host.

Examples

login computerhope.com

Would attempt to login to the computerhope domain.

Related commands

csh
exit
init
ksh
mail
mailx
newgrp
passwd
rlogin
rsh
sh
telnet
umask