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

When a script must discard both normal output and error output safely, which special device file is most appropriate

A /dev/zero device
B /proc/null file
C /dev/null device
D /tmp/null file

In Linux I/O, which file descriptor number represents standard input in most shells

A fd 1
B fd 2
C fd 3
D fd 0

Which file descriptor is standard output for most Linux command-line programs

A fd 1
B fd 0
C fd 2
D fd 9

Which file descriptor is standard error, used for error messages by programs

A fd 1
B fd 2
C fd 0
D fd 4

In Bash redirection, which syntax sends standard output into a file without overwriting it

A > overwrite
B < input
C | pipe
D >> append

If you need to redirect standard error into the same place as standard output, which common Bash syntax is used

A 2>&1 merge
B 1>&2 swap
C 0>&1 merge
D 2>&0 merge

In Linux, which command safely edits the sudo rules file with syntax checking

A sudoedit command
B nano sudoers
C chmod sudoers
D visudo command

Which file is the main configuration file that controls sudo permissions on many systems

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

When an admin needs to switch to a root shell and load root’s environment, which command is most typical

A sudo -i
B sudo -u
C su -m
D su -p

In Unix-like systems, what is the main difference between a hard link and a symbolic link

A Faster vs slower
B Root-only vs user
C Network-only vs local
D Inode vs pathname

Which command shows the target path that a symbolic link points to

A linkshow command
B readlink command
C lslink command
D filelink command

Which tool is most suitable to copy files while preserving permissions, timestamps, and optionally syncing changes efficiently

A rsync utility
B cp utility
C mv utility
D cat utility

When checking which files a process currently has open, which command is commonly used

A ps command
B df command
C free command
D lsof command

If a filesystem cannot be unmounted because it is busy, which command helps identify processes using that mount

A uname command
B whoami command
C fuser command
D cal command

Which directory is commonly used for locally installed system-wide software not managed by the distro packages

A /usr/local directory
B /usr/bin directory
C /var/local directory
D /etc/local directory

In Linux, which file stores static host-to-IP mappings used before DNS lookup in many cases

A /etc/resolv file
B /etc/hosts file
C /var/hosts file
D /proc/hosts file

Which file usually lists DNS resolver servers for hostname resolution on many Linux systems

A /etc/hosts.conf
B /etc/dns.conf
C /var/resolv.conf
D /etc/resolv.conf

In SSH server configuration, which file typically controls SSH daemon settings like port and authentication

A sshd_config file
B ssh_config file
C known_hosts file
D authorized_keys file

Which path commonly contains the OpenSSH server configuration file on Linux

A /etc/sshd/ssh_config
B /usr/ssh/sshd_config
C /var/ssh/sshd_config
D /etc/ssh/sshd_config

Which command copies files securely over SSH using a simple source-to-destination syntax

A ftp command
B scp command
C telnet command
D rlogin command

When you want to view kernel messages stored in the ring buffer, which command is standard

A dmesg command
B journalctl command
C last command
D history command

If you want to view logs only for one systemd service unit, which journalctl option is commonly used

A journalctl -k
B journalctl -b
C journalctl -f
D journalctl -u

On a systemd machine, which command lists currently loaded units, including services and sockets

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

In Linux authentication architecture, which module framework commonly handles login policies and authentication rules

A PAM framework
B GUI framework
C RPM framework
D TCP framework

Which directory typically contains per-service PAM configuration files on many Linux distributions

A /etc/pam.conf
B /usr/pam.d
C /var/pam.d
D /etc/pam.d

When enforcing password aging policies, which command commonly displays and changes user password expiry information

A passwd command
B chage command
C usermod command
D groups command

Which file often contains default password policy settings like minimum days and maximum days

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

In Linux permissions, which command displays ACLs when files use more detailed access control than rwx

A setfacl command
B chmod command
C chown command
D getfacl command

Which command sets or modifies ACL permissions for a user on a file

A setfacl command
B getfacl command
C chgrp command
D umask command

In Linux, what is the main purpose of the file /etc/fstab during system startup

A User password rules
B Kernel version record
C Auto mount rules
D Process startup list

For safe automation, which systemd setting enables a unit to start at boot time

A restart action
B reload action
C status action
D enable action

If a service should never start, even by dependency, which systemctl action is used to block it strongly

A mask action
B stop action
C disable action
D reload action

When a program should continue running after you close the terminal session, which command is commonly used

A fg command
B nohup command
C jobs command
D kill command

In Linux, which directory contains system-wide cron schedules for hourly, daily, and weekly jobs

A /var/cron.*
B /home/cron.*
C /usr/cron.*
D /etc/cron.*

Which file commonly stores the system-wide crontab schedule format for cron daemon

A /etc/crontab file
B /var/crontab file
C /proc/crontab file
D /home/crontab file

When analyzing a process’s environment variables via /proc, which file is relevant

A /proc/PID/cmdline
B /proc/PID/status
C /proc/PID/environ
D /proc/PID/uptime

In Linux, which directory commonly holds virtual terminal device files like tty0 and tty1

A /proc directory
B /etc directory
C /usr directory
D /dev directory

If you need to check which binary will run when you type a command name, which tool is most direct

A whereis tool
B command -v
C locate tool
D file tool

In shell scripting, which quoting style prevents variable expansion and treats most characters literally

A Single quotes
B Double quotes
C Backticks only
D No quotes

Which feature allows a command to receive interactive input from a file instead of the keyboard

A > output redirection
B | pipe operator
C & background run
D < input redirection

In Linux, which command displays the manual page section number and description for a command keyword

A man command
B info command
C apropos command
D help command

When a command’s output must be limited to the first N lines without opening a pager, which tool is best

A less command
B tail command
C nl command
D head command

When reading a growing log file continuously in real time, which option is typically used with tail

A tail -n
B tail -f
C tail -r
D tail -p

In Linux security best practices, why is direct root SSH login often disabled

A Reduce attack risk
B Increase startup speed
C Improve disk usage
D Fix DNS errors

In Linux, which command tests connectivity and latency but does not prove a TCP service port is open

A ssh command
B nc command
C ss command
D ping command

Which concept best describes how Linux organizes filesystems under one single hierarchy

A Multiple drive letters
B Separate desktop disks
C Single directory tree
D Device-only storage

In Linux, which directory is most appropriate for machine-specific host configuration and service settings, not user data

A /etc directory
B /home directory
C /tmp directory
D /usr directory

Which command verifies whether a package is installed on Debian-based systems using the low-level package database

A apt -x
B yum -q
C rpm -q
D dpkg -l

On RPM-based systems, which command checks whether a specific package is installed using RPM database

A dpkg -q
B rpm -q
C apt -q
D tar -q

In advanced permission scenarios, why can ACLs be useful compared to only owner-group-other permissions

A Faster file copying
B Smaller archive size
C Better GUI performance
D Per-user access control

Leave a Reply

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