0% found this document useful (0 votes)
45 views4 pages

Basic Commands Ubuntu

The document discusses several basic Linux utility commands including who, passwd, cal, date, echo, and tty. Who displays logged in users, passwd changes passwords, cal displays calendars, date prints the system date and time, echo outputs text, and tty prints the terminal name. Each command has various options that provide additional functionality like displaying last boot time, idle time, password expiration, or help messages.

Uploaded by

Pawan Kashyap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views4 pages

Basic Commands Ubuntu

The document discusses several basic Linux utility commands including who, passwd, cal, date, echo, and tty. Who displays logged in users, passwd changes passwords, cal displays calendars, date prints the system date and time, echo outputs text, and tty prints the terminal name. Each command has various options that provide additional functionality like displaying last boot time, idle time, password expiration, or help messages.

Uploaded by

Pawan Kashyap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

AIM : To study the various basic utility commands.

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.

-b : Display the time of last system boot.

-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.

cal: To display a calender.

Options : -mN : Display Monday as the first day of the week. Here ‘N’ is an argument. (N = 5 = May)

-j : Display julian dates (days one-based, numbered from January 1)


-y : Display a calendar for the current year.

date : Date commands prints system date and time.

Options :
-d, --date=STRING : Display time described by string STRING, as opposed to default that is ‘now’.

echo : This command is a fundamental command found in most operating systems. It is


frequently used in scripts, batch files, and as part of individual commands; anywhere you
may need to output text.

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.

--help : Display help message and exit.

You might also like