Department of IT & CS
Course Instructor: ____________________ Dated: ________________
Semester: __________________________ Section: ________________
COMP-262L: Operating Systems
Lab 03: Understanding Users in Linux environment.
Utilities: alias, awk, wc, cut, grep, output redirection, pipe, wc
CLO1 CLO2 CLO3
Name Reg. No. Lab Tasks Report Viva Total
Marks Marks Marks Marks
20 5 5 30
Objectives:
Understand different types of users in Linux environment.
Use following Linux utilities: alias, awk, wc, cut, grep, output redirection, pipe, wc
COMP-262L: Operating Systems Page 1
Lab 03: Understanding users in Linux environment.
Utilities: alias, awk, wc, cut, grep, output redirection, pipe, wc
Write and explain the commands used to perform each task. Also attach the output response.
Lab Task 1: [4 Marks]
a. List all the users in the system.
b. List all the groups in the system
c. List the numbers of users in the system.
d. List the numbers of groups in the system.
Lab Task 2: [4 Marks]
a. Find out the range of UID for the normal or human users.
b. Find out the range of GIDs for the normal or human users.
c. List only the normal users in the system
d. List the numbers of normal users in the system
Lab Task 3: [8 Marks]
a. List the normal users showing only the names, ids and group ids.
b. Sort the output from a according to user ids.
c. Save output from b to the file users.txt
d. Create an alias to list the human users
Lab Task 4: [2 Marks]
a. Explain the contents of the /etc/passwd file.
Lab Task 5: [2 Marks]
a. List all the commands/utilities that you have used in this lab in a table with one
line description of each.
COMP-262L: Operating Systems Page 2