Section C
Answer all the questions in this section
[52 marks]
1. Write down the commands to perform the following:
i. To sort /etc/passwd file and store the output into user.txt file.
[2]
ii. Tells the user how long the system has been running since its last boot, how many
users are currently logged in, and how much load the system is experiencing. [1]
iii. Give a command used to display all system variables.
[1]
2. Explain what the following commands are doing:
i. chgrp labs sales.txt
[2]
ii. rpm -qa
[2]
iii. mount /dev/had /mnt
[2]
3. You are managing a Linux system that needs to perform daily backups at 2 AM without
any manual intervention. You have a script (backup.sh) ready, but it needs to be
scheduled to run automatically. How would you use cron to schedule the backup script
to run every day at 2 AM?
[3]
4. What can be installed to keep the system running during a power failure so that it can
shut down gracefully?
[2]
5. Name three software management tools used in mainstream Linux distros.
[3]
6. You are a system administrator, and you want to install a .deb package, but you only
have an .rpm package. What will you do to get a .deb?
[2]
7. Which file will you configure if you want your file system to be mounted at boot time?
[2]
8. What would the syntax be to run a cronjob at 5:30 PM every Monday, Wednesday, and
Friday?
[2]
9. Where are the password stored in Linux and in which format are they stored?
[2]
10. What do you understand by the term dependency?
[2]
11. What are the responsibilities of the kernel?
[4]
12. Name three important characteristics exhibited by server-grade systems.
[3]
13. There are five types of System Calls, name and explain two of them.
[4]
14. Why would you want to keep a server room under lock and key?
[2]
15. What do you understand by the term 'portability,' which is one of the basic features of
Linux?
[2]
16. Name three ways to design a server that is unfriendly to casual users.
[3]
17. Write a shell script that prompts the user to enter two numbers. The script should then
calculate and print the sum and the product of the two numbers.
[ 6]
4