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

In a Linux long listing, which command option commonly shows permissions, owner, group, and size together

A ls -a option
B ls -R option
C ls -d option
D ls -l option

When checking hidden files in Linux, which ls option is commonly used

A ls -l option
B ls -t option
C ls -a option
D ls -S option

Which command creates parent directories automatically if they do not exist

A mkdir -p
B mkdir -r
C mkdir -x
D mkdir -u

Which command shows command history stored for the current shell session

A recent command
B history command
C listcmd command
D recall command

In Bash, which key shortcut commonly searches backward through command history interactively

A Ctrl+C
B Ctrl+Z
C Ctrl+R
D Ctrl+D

Which command displays a file’s content with line numbers, helpful for scripts and logs

A nl command
B cat command
C pwd command
D who command

Which command counts lines, words, and bytes in a file by default

A du command
B df command
C wc command
D ps command

Which command sorts lines of text output alphabetically by default

A sort command
B uniq command
C cut command
D paste command

Which command removes repeated adjacent lines, often used after sorting

A sort command
B uniq command
C tee command
D head command

Which command prints specific columns from each line using delimiters

A grep command
B tar command
C cut command
D ping command

Which command redirects output to both screen and a file at the same time

A tee command
B cat command
C mv command
D chmod command

Which command checks a file’s type based on its content, not just extension

A type command
B which command
C whereis command
D file command

Which command compares two text files line-by-line and shows differences

A cmp command
B comm command
C diff command
D join command

Which command shows changes in a file with a simple numeric byte comparison

A diff command
B cmp command
C grep command
D less command

Which command changes the current shell environment variable for the session

A export command
B chmod command
C chown command
D passwd command

In Linux, which variable is commonly used to locate the current shell program path

A HOME variable
B USER variable
C SHELL variable
D LANG variable

Which command displays running processes in a hierarchical parent-child tree view

A pstree command
B ps command
C top command
D kill command

Which command shows process IDs for a given process name, useful before killing

A ps -l command
B grep -p
C pgrep command
D pkill -l

Which command sends a signal to processes by name instead of PID

A kill command
B pkill command
C stop command
D halt command

Which signal name is commonly used for a graceful termination request

A SIGKILL signal
B SIGSTOP signal
C SIGCONT signal
D SIGTERM signal

Which signal immediately stops a process without allowing cleanup

A SIGTERM signal
B SIGCONT signal
C SIGKILL signal
D SIGHUP signal

Which command shows system uptime and load average in a quick summary line

A uptime command
B uname command
C usermod command
D passwd command

Which file contains static filesystem mount definitions used during boot

A /etc/hosts
B /etc/fstab
C /etc/group
D /etc/shadow

Which command mounts a filesystem to a directory mount point

A mount command
B umount command
C chmod command
D chgrp command

Which command safely detaches an attached filesystem from its mount point

A mount command
B unlink command
C umount command
D eject command

Which permission action is performed by the chgrp command in Linux

A Change owner
B Change password
C Change directory
D Change group

Which numeric permission value represents rw-r–r– on a regular file

A 644 value
B 755 value
C 600 value
D 777 value

Which numeric permission value represents rwx—— on a file or directory

A 755 value
B 644 value
C 700 value
D 666 value

Which permission string indicates a directory in Linux long listing output

A Starts with –
B Starts with d
C Starts with l
D Starts with c

Which file type indicator commonly represents a symbolic link in ls -l

A Starts with d
B Starts with b
C Starts with l
D Starts with p

Which command creates a symbolic link to another file or directory

A ln -s
B ln -h
C link -s
D mklink -s

Which command shows a file’s inode number, useful in link troubleshooting

A ls -h
B ls -i
C ls -p
D ls -u

In Linux, which log file commonly records authentication events on Debian/Ubuntu

A /var/log/boot.log
B /var/log/kern.log
C /var/log/auth.log
D /var/log/cron.log

On many Red Hat–based systems, which log file often records authentication and security events

A /var/log/auth.log
B /var/log/messages
C /var/log/syslog
D /var/log/secure

Which command on systemd systems views logs collected by the system journal

A journalctl command
B logcat command
C viewlog command
D syslogctl command

In systemd, which target is commonly used for a standard multi-user text mode

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

In systemd, which target is commonly used for a full graphical desktop environment

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

Which Linux command sets permissions using symbolic form like u+rwx,g+rx

A chown command
B chgrp command
C passwd command
D chmod command

Which command changes both owner and group when written as user:group

A chmod user:group
B chown user:group
C chgrp user:group
D useradd user:group

Which command compresses files into a .zip archive commonly used across platforms

A zip command
B gzip command
C tar command
D cat command

Which command compresses a single file using gzip compression

A zip command
B tar command
C gzip command
D grep command

Which command checks free memory and used memory in a human-readable format

A free -h
B df -h
C du -h
D ps -h

Which command tests file permissions by attempting to access a file as the current user

A chmod command
B test command
C cat command
D uname command

Which command sets a process priority when starting it from the terminal

A renice command
B top command
C nice command
D ps command

Which command changes the priority of an already running process

A renice command
B nice command
C kill command
D uptime command

Which command checks exit status code of the last command in Bash

A echo $!
B echo $$
C echo $0
D echo $?

Which command runs a program in background by adding a symbol at the end

A | symbol
B & symbol
C > symbol
D * symbol

Which command brings a stopped or background job to the foreground in many shells

A fg command
B bg command
C jobs command
D top command

Which command lists jobs started from the current shell session

A ps command
B who command
C jobs command
D last command

Which command is used to stop a running foreground process without closing the terminal

A Ctrl+R
B Ctrl+D
C Ctrl+S
D Ctrl+C

Leave a Reply

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