Professional Documents
Culture Documents
Basic Commands Ubuntu
Basic Commands Ubuntu
who : who command is used to display logged on to the system. This command prints all information
about all users who are currently logged in.
The first column of output represents the user names. The second column represents the
corresponding terminal names and remaining represents at which time the users are logged on. Linux
is a multi-user operating system. So multiple can logged on at the same time.
Options :
-a, -all : To show all users.
-s, --short : Print only name, line, and time fields, which is the default.
-u, --users : Print the idle time for each user, and the process id.
who am i: Displays the same information as who command but only for user logged in. Basically it
tells who you are.
--help : Display a help message, and exit. It shows all options we can use on with who command.
passwd: The passwd command is used to change the password of a user account. A normal command
can run passwd to change their own password, and a system administrator (the superuser) can use
passwd to change another user’s password, or define how their account’s password can used or
changed.
It will ask you for current password and if you type that correctly it will ask you for new password to
change the password.
Options : 1dematram
-a, --all : If used with ‘-S’ it show the password status for all users. The option will not work if used
without ‘-S’.
-d, --delete : Delete a user’s password (make a empty). This option is a quick way to disable login for
an account, without disabling the account itself.
-e, --expire : Immediately expire an account’s password. This forces a user to change their password
next time they log in.
-h, --help : Display information about how to use passwd command.
Options : -mN : Display Monday as the first day of the week. Here ‘N’ is an argument. (N = 5 = May)
Options :
-d, --date=STRING : Display time described by string STRING, as opposed to default that is ‘now’.
tty: This command print the file name of the terminal connected to standard input.
Options :
-s, -silent, -quite : Print nothing, only return an exit status.