You are on page 1of 9

OSY Practical

Enrollment no:- 1901160151


Name:- Aniket Abhay Bhoir.
Roll no.:- 46
Branch:- Information Technology.
Semester:- IF51

Practical No:-3.
Aim:- Work with multiple Linux terminals and basic commands.

 Course Outcomes:
Use operating system tools to perform various actions

 Practical Outcomes:
Work with multiple Linux terminals and basic commands: who, who am i,
login, passwd, su, pwd.

 Resources Used:

Sr. No. Name of Recourses specifications

1 Hardware Computer System RAM - 4 GB


Processor - Intel ®

2 Operating System Windows 10 pro

3 Ubuntu ISO file 20.04.3 Desktop amd-64

4. Oracle Virtual Machine Box 6.1.26 platform


packages
 Program Code:
1. List down with all options for who commands and write its description.
Note: Write terminal's output in Result Section.
 The Various options of who commands are as follows:-
 -a, --all
same as -b -d --login -p -r -t -T -u
 -b, --boot
time of last system boot
 -d, --dead
print dead processes
 -H, --heading
print line of column headings
 --ips print ips instead of hostnames. with --lookup, canonicalizes
based on stored IP, if available, rather than stored hostname
 -l, --login
print system login processes
 --lookup
attempt to canonicalize hostnames via DNS
 -m only hostname and user associated with stdin
 -p, --process
print active processes spawned by init
 -q, --count
all login names and number of users logged on
 -r, --runlevel
print current runlevel
 -s, --short
print only name, line, and time (default)
 -t, --time
print last system clock change
 -T, -w, --mesg
add user's message status as +, - or ?
 -u, --users
list users logged in
 --message
same as -T
 --writable
same as –T
 --help display this help and exit
 --version
output version information and exit
If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is
common. If ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are
usual.

Output:
 Practical Related Questions:
1. Give command for present working directory.
 $pwd

Output:
2. State currently login users by command.
 There are two commands to show the currently login users are as follows:
 who command : Display information about Linux users who are
currently logged in
 whoami command : Find out who you are currently logged in as on
Linux
Output:
3. Acquire the status of super user.
 There are two ways to become the super user.
1. The first is to log in as root directly.
2. The second way is to execute the command su while logged in to
another user account.
The super user, or root, is a special user account used for system
administration purpose on Linux.
Any user can acquire super user status with the su command with the roots
password. Administrator (super user) privileges are: Change the contents or
attributes of any file, like its permissions and ownership. He can delete any
file with rm even if it is write-protected! Initiate or kill any process.
 Exercise:
1. Acquire the status of super user.
 To acquire the status of super user following command should be
executed.
$ su along with the root password.

Output:
2. Write output for following commands

i. $who;clear;who am i
Output:
ii. $who;tty;date
Output:

 Conclusion: Hence, I have successfully understood the concept and


worked on multiple Linux terminals and basic commands.

You might also like