Unit 4: Command Productivity, Scheduling, Performance, and ACLs - Subjective Questions

CSE493 — Linux System Administration • Practice Questions with Detailed Answers

20 questions

1

Explain how command history, command-line editing, and tab completion improve productivity in the Bash shell.

2

Describe the purpose of shell variables, environment variables, aliases, and command substitution in improving command-line productivity.

3

Explain the structure and execution of a simple Bash script. Include the purpose of the shebang, comments, variables, and exit status.

4

Write and explain a Bash script that accepts a directory as a positional argument, verifies that it exists, and reports the number of regular files immediately inside it.

5

Explain how for, while, and until loops are used to run commands efficiently in Bash. Give an appropriate use case for each.

6

Develop a Bash loop that checks disk usage for a list of mount points and displays a warning when usage is at least 80%. Explain the important elements of the solution.

7

Define regular expressions and distinguish basic regular expressions from extended regular expressions in common Linux text-processing commands.

8

Construct and explain regular-expression commands that identify failed SSH login messages, blank lines, and valid local usernames from text output.

9

Explain how a user can schedule, inspect, and remove a deferred one-time job by using the at command.

10

Compare deferred user jobs scheduled with at and recurring jobs scheduled with cron or systemd timers.

11

Interpret the cron entry 15 2 * * 1-5 /usr/local/sbin/backup.sh and explain the procedure and precautions for creating recurring cron jobs.

12

Describe how recurring system jobs can be implemented with cron directories and systemd timer units.

13

Explain why temporary files require careful management and describe secure methods for creating and cleaning them.

14

Explain the role of systemd-tmpfiles in managing temporary and volatile files. Identify its main configuration locations and operations.

15

Describe a systematic approach to investigating and tuning Linux system performance. Include suitable monitoring commands and explain why measurement must precede tuning.

16

Explain how TuneD profiles are used to adjust Linux performance settings and describe how an administrator can inspect, select, and verify a profile.

17

Distinguish between process nice values and real-time scheduling policies. Explain how nice, renice, and chrt influence process scheduling.

18

Define POSIX Access Control Lists and explain why ACLs are useful in addition to traditional Linux owner, group, and other permissions.

19

Interpret the following ACL and determine the effective permissions of the owner, user alice, members of the owning group, members of auditors, and all other users:

TEXT
user::rw-
user:alice:rwx
group::r--
group:auditors:rw-
mask::r-x
other::---
20

Describe how to secure a shared directory with ACLs so that user alice has read and write access, group auditors has read-only access, and newly created content receives corresponding default entries. Also explain ACL removal and verification.