0% found this document useful (0 votes)
14 views3 pages

DS OS Lab 01

Uploaded by

alams.wp
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)
14 views3 pages

DS OS Lab 01

Uploaded by

alams.wp
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/ 3

Operating Systems

Lab – 01
Objectives:
1. Installation of virtualization software like VMware or virtual box
2. Creating a virtual machine and installing some Linux distribution on it
3. Installing guest additions, and use of shared folder between host and guest OS
4. Reviewing Linux history and its distributions
5. Exploring Linux File System Hierarchy and it's basic commands
6. Getting help using Linux man pages

Resources:
1. Video Lecture 01:https://youtu.be/wO0Y1IJIajM?si=qUUOJfBWQR01pk6e
2. Video Lecture 02:https://youtu.be/G-5NDYFwBH8?si=m_VnbfF-eJt-jiMy
3. Video Lecture 03:https://youtu.be/_YPvqThyM4c?si=R4xbY2z3QBstagjK
4. Video Lecture 04:https://youtu.be/dUkskLi70nI?si=jGhLKqydENfNYmdj
5. Installation document: https://www.dropbox.com/s/biakgmihr0eazs9/User%20Manual.pdf?dl=0

Task 01: Read the installation doc and complete the installation of VMWare and Ubuntu on your systems.
What is a hypervisor and the difference between type 1 and type 2 hypervisors?
Task 02: You can have multiple guest OS on your host OS. Can there be a guest OS inside the Guest OS? If yes then
what is the limit of Guest OS you can install in the Guest OS(s)?
Task 03:
a. What is the format of prompt that appears when you start the shell i.e. if prompt is arif@Ubuntu:~$?
b. What is the difference between these two prompts?
o xxxx@Ubuntu:~$
o xxxx@Ubuntu:~#
Task 04: The /usr/sbin folder contains the commands that are only executed by admin then tell what will happen
if we run any command that are in this folder? Try running a few commands to see results.
Task 05:
a. What does the “shutdown 3” command do?
b. What is meant by home directory of a user and how it is symbolized?
Task 6: There are two terminals and I want to write from one to terminal to another terminal. Can you find out a
command that helps me writing something to another terminal? (Hint: take help from man and man -k)
Task 7:What are man pages and mention all the sections in which man pages are divided.
Task 8: Use cd (change directory) command to move to the folder /usr/share/man/man2/ and then use the ls
(list) command to see how many man pages of different system calls are there?
Task 09:
a. Write a single command to display the first 12 lines of /etc/services.
b. Write a single command to display only the last line of /etc/passwd.
c. Write a single command to count the number of lines in /etc/passwd.
Task 10:
a. Write a single command to make a backup of /etc/passwd file to cnt.txt.
b. Write a single command to display backup file.
c. Write a single command to display cnt.txt, but with all lines in reverse order (the last line first).

Resource Person: Arif Butt OS Lab # 01 Page 1 of 2


Task 11:Use shell commands to create above directory structure and then perform the following operations on them:
a. Write down a single command to copy f2 to dir5 if your pwd is dir4 (absolute paths only).
b. If your pwd is dir6 then write a single command to move f1 and f3 to dir4.
Task 12: Referring to the figure, your present working directory is dir2, now write a single command to create a .tar
file named myArchive.tar containing all the files and folders of dir2. Create its zip file named myArchive.tar.gz. Now
move this zip file to directory dir1. (Do this task by staying in dir2)
Task 13: Write a command which take a file “/etc/passwd” and “/etc/shadow” and print first three column of
first one and second third column of second one.
Task 14: Use ls to find the biggest file in /etc.
Task 15: Tell how many arguments are in this line.
$ touch '/etc/cron/cron.allow' 'file 42.txt' "file 33.txt"
Task 16:
a. Write a single command to create an alias called 'city' that echoes your hometown.
b. Use your alias to test that it works.
Task 17: Explain the difference between these two commands.
$ find /data -name "*.txt"
$ find /data -name *.txt
Task 18: Write a single command which reads /etc/passwd and prints only those lines which do not contains string
“root” in it.
Task 19: Can you tell what will happen if we run comm commands on below file? Tell if it has any error. If yes then
correct it. Also man the comm command to get information about its working and three columns in which it separates
the lines.
file1: file2:
only in file1 same line again
in both file1 and file2 in both file1 and file2
same line again only in file2

Task 20: Run the cmp command on above created files and check if the information of changed byte is correct or not?
What will be the byte number if I change the word “again” to “agame” in file one line three?
Task 21: run the diff command on above files and explain the output. Also man the diff command to get information
about its working and different signs and characters it uses in output.

Resource Person: Arif Butt OS Lab # 01 Page 2 of 2


Resource Person: Arif Butt OS Lab # 01 Page 3 of 2

You might also like