LSA721S - LINUX SYSTEMS ADMINISTRATION - 1ST OPP - NOV 2023


LSA721S - LINUX SYSTEMS ADMINISTRATION - 1ST OPP - NOV 2023



1 Page 1

▲back to top


nAm I BIA un IVERSITY
OF SCIEnCE TECHnOLOGY
FACULTY OF COMPUTING AND INFORMATICS
DEPARTMENTOF COMPUTERSCIENCES
QUALIFICATION:BACHELOROF COMPUTERSCIENCE
QUALIFICATIONCODE: 07BCMS
LEVEL: 7
COURSECODE:LSA721S
COURSENAME: Linux Systems Administration
SESSION:NOVEMBER 2023
DURATION: 3 HOURS
PAPER: (PAPER1)
MARKS: 85
FIRST OPPORTUNITY EXAMINATION QUESTION PAPER
EXAMINER(S)
MR. SHOOPALA NAMBAHU
MODERATOR:
MS. JOVITA MATEUS
INSTRUCTIONS
1. Answer ALL the questions.
2. Read all the questions carefully before answering.
3. Number the answers clearly
THIS QUESTION PAPERCONSISTSOF 4 PAGES(Including this front page)

2 Page 2

▲back to top


Section A: (Multiple choice)
(20 Marks)
Read each question carefully, and then select THEANSWERthat best fits the question
1. Which is an example of commercial distros?
a) Centos
b) SUSELinux Enterprise
c) Fedc;,ra
d) ubuntu
2. Which command is used to display the unix version?
a) uname -r
b) uname -n
c) uname-t
d) kernel
3. Host specific configuration files are installed in?
a) /etc directory
b) /lib directory
c) /root directory
d) /bin directory
4. Which command is used to display the operating system name?
a) os
b) unix
c) kernel
d) uname
5. Which option of Is command is used to view file inode number?
a)-1
b)-o
c)-a
d)-i
6. How do you get help about the command "cp"?
a) help cp
· b) man cp
c) cd?
d) none of the mentioned
7. Which command changes a file's group owner?
a) cgrp
b)chgrp
c) change
d) group
8. Which command is used to extract a column from a text file?
a) paste
b) get
c) cut
d) tar
9. Which one of the directories do not contain binary files?
a) /bin
b) /sbin
c) /etc
d) none of the mentioned
10. The permission -rwxr-r- represented in octal expression will be?
a)777
b)666
c)744
d)711
11. How do you remove duplicate lines from the file foo using uniq?
a) sort foe I uniq -u
b) sort -u foe I uniq -d
c) sort foo I uniq -c
d) sort foo I uniq -I
12. Which command is used to display disk consumption of a specific directory?
a)du
b)ds
c) dd
d) dds
13. The directory /opt is reserved for?
a) installation of add-on application software packages b) optional booting files
c) optional user specific files
d) none of the mentioned
Page 2 of 4

3 Page 3

▲back to top


14. Which command reads the user input from the terminal and assign this value to a
variable name?
a) read
b) get
c) declar
d) set
15. Indicate the right option to search for BOB, Bob, BOb or BoB?
a) grep-i Bob files
b) grep 'B[oO][bB]' files
c) grep '[BOB]' files
d) grep -v 'Bob' files
16. Which command is used to check filesystem usage in a system?
a) mount
b) df
c)du
d)dd
17. Which file contains the filesystems to be automatically mounted during boot?
a) /etc/mount
b) /etc/fstab
c) /etc/inittab
d) /etc/boot
18. Which is an example for CD-ROM?
a) Virtual Terminal
b) block special file
c) Terminal
d) Serial modem
e) hard disk
19. What is /media directory used for?
a) mount point for removable media
b) mount point for filesystem
c) mount point for removable media & filesystem d) none of the mentioned
20. Which one of the following statements is true about variables in shell?
a) variables do not require declaration before assigning value to them
b) variables are case sensitive
c) to extract the contents of a variable, we have to provide the variable a preceding$
d) all of the mentioned
Section B: True or False
[10 Marks]
Read each statement below carefully and state whether they are false or true.
1. The commercial distros also tend to have a longer release life cycle.
2. REDHat is one of the original Linux distributions.
3. We can use the> symbol along with pipe in a command.
4. Method of storing and organizing computer files and their data is referred to as file
system.
5. A famous professor Linus Torvalds developed Minix, a simplified version of UNIXthat
runs on PC.
6. The wc command is used to find out the number of users logged on.
7. HCLstands for High Computing Load.
8. Linux distributions can be broadly categorized into three groups.
9. Only one unprivileged user may be logged into a Linux system at any given time.
10. There are three types of variables in Linux.
Page 3 of 4

4 Page 4

▲back to top


Section C
Answer all the questions in this section
[55 marlcs]
1. Write down the commands to perform the following:
i. To display the contents of the crontab file of the currently logged in user.
[1]
ii. Display all system variables.
[1]
iii. Counting the number of lines for the abc.txt file.
[1]
iv. Remove Dir2 directory and its subdirectories.
[1]
v. To edit the current user's cron jobs.
[1]
vi. To change the password of a user named "paulina
[1]
2. Explain what the following commands are doing:
i. export student=john
(2]
ii. dd if=/dev/hdc3 of=/home/bob/filesystem.img
[2]
iii. chown labs.users sales.txt
[2]
iv. rpm-qa
[2]
v. sleep 300 &
[2]
vi. head /etc/passwd
[2]
3. What is the uid and gid of a root user on a Linux server?
[2]
4. What do you understand by the term Multi-User in Linux?
[2]
5. What is the difference between root directory(/) and /root directory?
[2]
6. What does BASHstand for?
[1]
7. Which pages contains the best source of information for most commands?
[2]
8. Name two things that you must be able to do for software to qualify as free software
according to FSFstandards.
[4]
9. Name two most popular ways to interact with a Linux computer?
[2]
10. What are the three significant characteristics demonstrated by server-grade systems?
[3]
11. Name three advantages of using Bash scripts.
[3]
12. Write a shell script that will print a multiplication table of 10, from 1 to 10.
[6]
Sample output 3 x 1 = 10
3 X 10 =30
13. Name two ways to execute a Bash script called shelll.sh.
[2]
14. What is the difference between an environment variable and a user-defined variable?
[2]
15. With the default umask of 0124, what would be the default permissions for newly created
files and directories?
[6]
Page 4 of 4

5 Page 5

▲back to top