Chapter 8: Unix and Linux Operating Systems (Set-10)

In a Bash pipeline, if you must ensure a command failure inside the pipe is detected, which shell option is commonly enabled

A noclobber option
B noglob option
C pipefail option
D allexport option

If you must prevent accidental overwriting of files using “>” redirection in Bash, which shell option helps

A pipefail option
B noclobber option
C emacs option
D monitor option

In Linux, which file usually stores the list of filesystem types available for mount operations

A /proc/filesystems
B /proc/mounts
C /etc/fstab
D /etc/filesystems

When you need to find which process is holding a deleted log file still open, which command is most direct

A lsblk tool
B df tool
C du tool
D lsof tool

If a filesystem shows full but files look deleted, which concept most often explains it

A Broken inode table
B Open deleted files
C Wrong umask value
D Bad PATH order

Which command can show open files under a specific mount point to help unmount safely

A ls -D
B df +D
C lsof +D
D du +D

In Linux security, which file permission issue often makes SSH refuse a private key

A Key too small
B Key too open
C Key too new
D Key too old

In Linux, which command sets a private key file to owner read/write only

A chmod 644
B chmod 700
C chmod 600
D chmod 755

Which file in /etc is commonly used to control name service order like files then DNS

A resolv.conf
B hosts.allow
C sudoers file
D nsswitch.conf

In systemd, which command shows the dependency tree of a unit to understand startup order

A systemctl list-units
B systemctl list-dependencies
C systemctl get-default
D systemctl daemon-reload

Which systemd feature starts services on demand when a socket receives traffic

A socket activation
B cron scheduling
C job control
D runlevel boot

Which command shows which systemd unit file is loaded and from which exact path

A systemctl show
B systemctl list
C systemctl cat
D systemctl start

Which systemd command prints all properties of a service, including ExecStart and environment

A systemctl status
B systemctl show
C systemctl enable
D systemctl isolate

In Linux permissions, which command sets default ACLs on a directory so new files inherit them

A getfacl -d
B chmod -d
C umask -d
D setfacl -d

Which behavior is true for standard rwx permissions but not always true for ACL-based permissions

A Supports inheritance
B Only three classes
C Uses file hashes
D Needs kernel reboot

If an admin wants to see ACL entries for a file to debug access, which command is correct

A getfacl file
B setfacl file
C chmod acl
D chown acl

Which command shows the effective umask value for the current shell session

A maskshow command
B chmod -u
C umask command
D stat -u

In Linux process management, what does a “zombie” process usually represent

A Sleeping process
B Exited, not reaped
C Running kernel thread
D High CPU loop

In ps output, which state letter commonly indicates a zombie process

A R state
B S state
C D state
D Z state

Which tool can show real-time process tree and allow killing processes interactively, if installed

A tar tool
B grep tool
C htop tool
D cat tool

In Linux networking, which file lists static TCP/UDP service name to port mappings

A /etc/hosts
B /etc/services
C /etc/ports
D /etc/resolv.conf

Which command tests a TCP connection to a port in a simple way for troubleshooting

A ping -z
B ssh -z
C nc -z
D ip -z

In Bash, which expansion safely returns an empty string when a variable is unset, preventing errors

A ${VAR:++}
B ${VAR:-}
C ${VAR:==}
D ${VAR:??}

In Bash, which parameter expansion assigns a default value to a variable if it is unset or empty

A ${VAR:=default}
B ${VAR:-default}
C ${VAR:+default}
D ${VAR:?default}

In Bash, which expansion prints an error message and exits if a variable is unset or empty

A ${VAR:-msg}
B ${VAR:+msg}
C ${VAR:?msg}
D ${VAR:=msg}

When extracting fields from /etc/passwd reliably, which delimiter is used between columns

A Space delimiter
B Colon delimiter
C Comma delimiter
D Tab delimiter

Which command shows which package owns a given file on RPM-based systems

A rpm -ql
B rpm -qi
C rpm -qa
D rpm -qf

Which dpkg command shows which installed package owns a specified file path

A dpkg -l
B dpkg -i
C dpkg -S
D dpkg -P

When a command must run weekly but the machine may be off at the scheduled time, which scheduler fits best

A cron service
B anacron service
C at service
D nohup service

Which file commonly stores per-user cron jobs in an editor-like managed format

A /etc/cron.daily
B /etc/crontab
C /var/log/cron
D user crontab

Which command edits the current user’s crontab safely through a standard interface

A crontab -e
B cron -e
C editcron -e
D at -e

Which command lists the current user’s scheduled cron entries

A cron -l
B at -l
C crontab -l
D jobs -l

In Linux boot troubleshooting, which target provides a minimal environment with basic services and a root shell

A graphical.target
B rescue.target
C multi-user.target
D reboot.target

Which systemd target provides the most minimal emergency shell with very few services

A rescue.target
B multi-user.target
C poweroff.target
D emergency.target

In Linux filesystems, which command checks and repairs filesystem errors, usually on unmounted partitions

A mount tool
B fsck tool
C tar tool
D du tool

Which command displays filesystem UUID and type, helping build stable /etc/fstab entries

A lsmod command
B lsof command
C blkid command
D pstree command

Which file shows currently mounted filesystems and options in real time

A /proc/mounts
B /etc/fstab
C /etc/mounts
D /var/mounts

Which command shows block devices and mount points in a tree view

A ps command
B lsblk command
C lsof command
D grep command

In Linux, which directory is designed for variable runtime files like PID files and sockets on modern systems

A /var directory
B /tmp directory
C /usr directory
D /run directory

Which directory historically stored PID files and was often used before /run became standard

A /etc/run directory
B /usr/run directory
C /var/run directory
D /tmp/run directory

In Linux user management, which command creates a new user account on many systems

A usermod command
B useradd command
C userdel command
D passwd command

Which command modifies an existing user account, such as changing shell or adding groups

A useradd command
B userdel command
C chmod command
D usermod command

Which command removes a user account from the system, optionally deleting home directory

A useradd command
B usermod command
C userdel command
D chown command

Which command adds a user to an additional supplementary group on many Linux systems

A usermod -aG
B useradd -g
C chgrp -aG
D chmod -aG

In Linux, which file stores group definitions and group member lists

A /etc/passwd file
B /etc/group file
C /etc/shadow file
D /etc/hosts file

Which file stores secure password hashes and aging info, readable only by root

A /etc/passwd file
B /etc/group file
C /etc/profile file
D /etc/shadow file

In Linux, which command shows detailed password aging information for a user

A passwd -l
B usermod -l
C chage -l
D groups -l

Which file often sets default password aging policy for new accounts created by tools

A /etc/shadow
B /etc/login.defs
C /etc/passwd
D /etc/securetty

Which Linux security concept restricts services by limiting what system calls they can make

A seccomp filtering
B cron scheduling
C PATH ordering
D file rotation

Which principle best explains why admins use sudo instead of staying logged in as root

A Fast boot time
B Least privilege
C Better compression
D Lower disk usage

Leave a Reply

Your email address will not be published. Required fields are marked *