Operations 11 min read

Linux Operations Quiz: Answers and Explanations for Sysadmin Fundamentals

This article presents a collection of multiple‑choice, true/false, and short‑answer questions covering Linux shell commands, file permissions, startup processes, RAID, networking, and other core sysadmin topics, along with the correct answers and brief explanations to help learners assess and improve their operational skills.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Linux Operations Quiz: Answers and Explanations for Sysadmin Fundamentals

Multiple‑Choice Questions (Non‑single choice)

1. In regular expressions, which character class represents a non‑space character?
   a. [:graph:]
   b. [:digit:]
   c. [:space:]
   d. [:alpha:]
   Answer: a

2. Which statement about Bash variables is correct?
   a. Can be set in /etc/profile for all users permanently
   b. Adding to ~/.bash_profile affects a single user temporarily
   c. Using export defines it for the current shell permanently
   d. All statements are incorrect
   Answer: a

3. After logging into Linux, the shell reads startup files in which order?
   a. /etc/profile → ~/.bash_profile → ~/.profile → ~/.bash_login
   b. /etc/profile → ~/.bash_profile → ~/.bash_login → ~/.profile
   c. ~/.bash_profile → /etc/profile → ~/.profile → ~/.bash_login
   d. ~/.bash_login → ~/.profile → ~/.bash_profile → /etc/profile
   Answer: b

4. Command to create multi‑level directories:
   a. mkdir -p
   b. mkdir -v
   c. mkdir -m
   d. mkdir -Z
   Answer: a

5. Which command can inspect attributes of a file that even root cannot modify directly?
   a. ls -lh
   b. file
   c. stat
   d. lsattr
   Answer: d

6. Which alias definition is correct?
   a. LS='ls -lh'
   b. set cnet 'cd /etc/sysconfig/network-scripts/ifcfg-eth0'
   c. alias die='rm -fr'
   d. unalias die='rm -fr'
   Answer: c

7. Common text‑editing tools include:
   a. nano
   b. cat
   c. cut
   d. vim
   Answer: a, d

8. In the find command, which option selects socket files?
   a. d
   b. l
   c. p
   d. s
   Answer: d

9. After applying chmod g+s to a file with mode -rw-r--r--, the resulting mode is:
   a. -rw-r-Sr--
   b. -rw-r-sr--
   c. -rw-r--r--
   d. -rw-r-xr--
   Answer: a

10. LVM partition type identifier for fdisk is:
    a. l
    b. lvm
    c. 9e
    d. 8e
    Answer: d

11. Command to archive a directory without compression using tar:
    a. tar -cvf
    b. tar -zcvf
    c. tar -jvf
    d. tar -jcvf
    Answer: a

12. Which positional parameter represents the script itself?
    a. $0
    b. $1
    c. $#
    d. $@
    Answer: a

13. The four‑layer and seven‑layer load balancing correspond to which OSI layers?
    a. Transport, Presentation
    b. Network, Application
    c. Transport, Application
    d. Network, Presentation
    Answer: c

14. To give process 119 higher CPU priority than process 110, you should:
    a. nice -5 119
    b. renice -5 119
    c. nice -5 110
    d. renice -5 110
    Answer: b

15. To add a crontab entry for user magedu non‑interactively:
    a. Write to /var/spool/cron/root
    b. Write to /var/spool/cron/magedu
    c. Write to /var/spool/root/cron
    d. Write to /var/spool/magedu/cron
    Answer: b

16. Command to start network service on CentOS 7:
    a. service network start
    b. /etc/init.d/network start
    c. systemctl start network.service
    d. /etc/init.d/rc.d/init.d start
    Answer: c

17. During kernel self‑initialization, which task is performed?
    a. Detect all recognizable hardware
    b. Mount the real root filesystem read‑only
    c. Search boot devices sequentially, using the first with a bootloader
    d. Launch the first user‑space program (/sbin/init)
    Answer: c

18. Which runlevel description for CentOS 6 is incorrect?
    a. 4 – maintenance mode, multi‑user, network enabled, no NFS
    b. 1 – single‑user, no authentication required for root
    c. 3 – normal multi‑user text mode
    d. 5 – normal multi‑user graphical mode
    Answer: a

19. Command to output the line containing the root user from /etc/passwd:
    a. awk '{if($1=/root/) print }' /etc/passwd
    b. awk -F: '{if($1==/root/) print }' /etc/passwd
    c. awk -F: '{if($1=/root/) print }' /etc/passwd
    d. awk -F: '{if($1~/root/) print }' /etc/passwd
    Answer: d

20. Which is NOT a function of /etc/rc.d/rc.sysinit?
    a. Set hostname from configuration
    b. Configure server IP address
    c. Print welcome text
    d. Activate LVM and RAID devices
    Answer: b

True/False Questions (Analyze why they are right or wrong)

1. Symmetric encryption uses the same key for encryption and decryption, with main algorithms md5, sha1.
   Answer: False – md5 and sha1 are one‑way hash algorithms, not symmetric encryption.

2. After implementing RAID 1, overall write performance degrades.
   Answer: True

3. RAID 5 requires at least three disks.
   Answer: True

4. keepalived is implemented based on the VRRP protocol.
   Answer: True

5. If the system limit for open file descriptors is raised from 1024 to 65535, a child process of a program that started before the change will still have a limit of 1024.
   Answer: False

Short‑Answer Questions

1. Find ordinary files or directories in the current directory that have not been modified in the last 10 days and are larger than 4 KB.
   Answer: find ./ -type d -o -type f -size +4k ! -mtime -10

2. Use ss to list connections in TIME_WAIT state.
   Answer: ss -4 state time-wait   or   ss -o state time-wait

3. Briefly describe the boot process of CentOS 6.
   Answer: POST → BIOS (boot sequence) → MBR (bootloader) → kernel (initramfs) → /sbin/init → set default runlevel → run /etc/rc.d/rc.sysinit for system initialization → start services for the runlevel → start console → start graphical interface if runlevel 5 → display login prompt.

4. Difference between yum update and yum upgrade.
   Answer: yum update upgrades packages and also upgrades the system kernel and core components; yum upgrade only upgrades packages without touching the kernel or core system.

5. Schedule a script /data/get_username.sh to run at 01:05 every Tuesday and append its output to /tmp/get_username.log.
   Answer: 5 1 * * 2 /bin/sh /data/get_username.sh >> /tmp/get_username.log 2>&1
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxShellQuiz
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.