Worksheets25W CST8305 GNU/Linux Server Administration Midterm
Total questions: 100
Worksheet time: 50mins
Which command is used to remove an active file system from the directory tree when it is no longer needed?
dnf
umount
ps
ping
chmod
Which command can terminate all instances of a named program at once?
/boot
userdel
bg
df
killall
Which command schedules repeated execution of tasks at predetermined intervals?
date
killall
man
crontab
/etc/sudoers
Which directory is a tmpfs location that is cleared upon system reboot?
/dev/shm
/boot
/home
/dev
/etc
Which program is primarily responsible for sorting and writing syslog events?
chronyd
logrotate
systemctl
rsyslogd
journalctl
Which command can update script file permissions so that it can be run as an executable?
chmod
find
useradd
chown
kill
Which directory is often used for placing or extracting files temporarily to avoid overwriting important data?
/var/spool/anacron/
/tmp
/home
/mnt
/dev
Which directory is commonly used to hold system log files that record events and service activity?
/dev
/tmp
/boot
/var/log
/bin
Which directory is often used as a temporary mount point for manually mounting a file system?
/home
/boot
/bin
/mnt
/etc
Which command displays processes holding files open, helping to identify why a file system cannot be unmounted?
lsof
jobs
sort
grep
fg
To ensure accurate time on a server, which service should be enabled so that the system clock remains synchronized with an external source?
systemctl
groupadd
chronyd
rsyslogd
groupdel
Which command can display multiple tasks associated with the current terminal session?
jobs
crontab
/etc/shadow
grep
hostname
Which command can be used to verify connectivity to a remote IPv4 host by applying a step-by-step approach for network testing?
ping
chown
hostname
date
dig
Which file typically holds authentication messages about security events?
/etc/passwd
/var/log/messages
/var/log/secure
/var/log/maillog
/var/log/boot.log
Which command is used to schedule recurring tasks for a local user?
ping
grep
tar
at
crontab
Which file lists domain name servers and is automatically updated by NetworkManager?
/dev/null
/etc/resolv.conf
/etc/passwd
/etc/fstab
/etc/hosts
Which command is best for viewing real-time systemd journal messages?
journalctl
chronyd
logrotate
hostnamectl
systemctl
Which program is typically used so that a user account cannot log in with an interactive shell?
/sbin/nologin
/dev/null
/etc/hosts
/var/log
/etc/passwd
Which file may hold custom domain name mappings?
/usr/lib/systemd/system/
/etc/anacrontab
/home
/etc/hosts
/etc/ssh/ssh_config
To systematically configure a server’s identity, which command enables you to view and modify the system’s hostname details?
groupdel
chronyd
hostnamectl
journalctl
logrotate
Which command could be used to examine open network connections?
kill
useradd
df
mkdir
ss
Which directory typically includes a sticky bit to prevent unauthorized file deletion by non-owners?
/var/log/messages
/home
/etc/systemd/system/
/tmp
/usr/lib/systemd/system/
Which command is used to schedule a single-run task for a future time?
crontab
bg
ip
chmod
at
Which file is often modified for storing local system name-to-IP mappings to avoid DNS lookups?
/etc/hosts
/var/spool/anacron/
/dev/null
/etc/profile.d/local-umask.sh
/etc/passwd
Which command updates the index that locate uses for file name searches?
hostname
cat
find
updatedb
logger
Which command is most suitable for sending a signal to a specific process by its PID?
ping
usermod
cat
/etc/yum.conf
kill
Which file typically holds user-specific shell initialization settings for each interactive shell session?
/etc/fstab
/var/log/messages
/usr/lib/systemd/system/
~/.bashrc
/etc/ssh/ssh_config
Which file is commonly placed on the first line of a script with a "#!" directive?
/etc/fstab
/dev/null
/etc/passwd
/bin/bash
/dev/nvme0
Which command allows you to search for a regular expression within a file’s contents or a stream of data?
touch
man
ps
grep
userdel
Which command reveals both the system’s uptime and its load average values?
locate
/etc/hosts
uptime
groupadd
vnstat
Which command is used to create a new group on the system?
useradd
groupadd
groupdel
usermod
hostname
Which command installs the latest updates for every package installed on the system?
dnf group info
dnf group mark install
dnf update
dnf repolist all
dnf module provides
Which file is commonly used to define how file systems should be mounted at system startup?
/dev/null
/etc/fstab
/var/log
/etc/rsyslog.conf
/etc/hosts
Which path corresponds to the first partition on the first detected SATA hard drive?
/dev/sda1
/dev/nvme0n1p1
/dev/null
/dev/shm
/dev/sdb1
Which file most likely contains entries pertaining to cron job execution?
/var/log/messages
/var/log/maillog
/var/log/boot.log
/var/log/cron
/var/log/secure
Which command can be used to display the current routing table?
hostname
grep
netstat
ip route
dig
Which directory typically contains default service unit files provided by the operating system?
/dev/console
/etc/cron.d/
/etc/systemd/system/
/var/spool/anacron/
/usr/lib/systemd/system/
Which command will test IPv6 connectivity to a remote host?
ip
ping
echo
hostnamectl
ping6
Which command reloads system manager configuration files?
systemctl
systemctl stop
systemctl daemon-reload
systemctl status
systemctl start
Which command updates only the kernel package to a newer version if available?
dnf install
dnf group list hidden
dnf update kernel
dnf group mark install
dnf module info
Which command searches the file system in real time for matching file names?
cd
df
locate
lsof
find
Which directory is frequently used to hold system-generated logs that can later be archived or transferred?
/var/log
/boot
/home
/etc/passwd
/run/log
Which utility automates rotating and compressing log files to prevent them from growing excessively?
journalctl
usermod
logrotate
systemctl
groupadd
Which command displays the user's pending one-time scheduled jobs awaiting execution?
atq
chown
su
ps
/dev/null
Which command is used to display both enabled and disabled repositories on the system?
dnf repolist
dnf repolist all
dnf search all
dnf list kernel
dnf provides
Which command displays system event messages collected by the system service manager?
journalctl
dnf
crond
sshd
ping
Which command is used to display text or variables from within a Bash script?
cat
grep
sudo
echo
ping
Which command is used to recursively set read, write, and execute permissions for the group on all files in a directory?
cat
ps
grep
chmod
chgrp
Which file is used to define the default umask for user accounts at login?
/etc/login.defs
/var/log/maillog
/etc/hosts
/etc/fstab
/etc/profile.d/local-umask.sh
Which command can list all active processes regardless of the controlling terminal?
/var/log
tail
fg
ps
logger
Which command is a stand-alone utility that compresses or decompresses one file without packaging multiple files together?
/etc/fstab
sftp
bzip2
rsync
tar
Which command lists and summarizes disk usage across all subdirectories?
find
mount
grep
du
df
Which command can expand a compressed .zip file back into its original contents?
unzip
dd
tar
cat
sftp
Which directory can store custom recurring jobs?
/root
/etc/cron.d
/etc/fstab
/mnt
/etc/passwd
Which command lists one-time tasks that have been queued for future execution?
cat
at
fg
atrm
atq
Which command reveals the location of an executable file within your current PATH?
which
at
tar
ps
w
Which command provides a secure way to transfer files interactively over an encrypted connection?
/etc/hosts
zip
cat
tar
sftp
Which daemon processes one-time tasks as they become due?
atd
sshd
rsyslogd
systemd
crond
Which command is used to update an existing user's shell or group membership?
groupmod
useradd
groupdel
usermod
userdel
Which file should be reviewed to see the cryptographically hashed password for a local user?
/etc/hosts
/etc/shadow
/etc/fstab
/etc/group
/etc/passwd
Which directory can temporarily hold systemd journal data in memory until permanent storage is used?
/var/log
/dev/shm
/etc/login.defs
/run/log/journal
/etc/systemd/system/
Which command runs as a background process to schedule recurring commands on the system?
ps
dnf
crond
systemctl
tar
Which command is used to search for packages that match a specified pattern in their names and summaries?
dnf group mark install
dnf search
dnf group list hidden
dnf remove
cat
Which command can be used to view and test DNS queries?
ip link
ps
df
traceroute
dig
Which file typically captures general system messages that could include errors from your script’s conditional logic?
/var/log/messages
/etc/resolv.conf
/tmp
/root
/etc/hosts
Which command is used to create a normal user account for day-to-day tasks on the system?
groupadd
groupdel
userdel
useradd
usermod
Which command resumes a suspended job so that it continues executing in the background?
bg
/home
cron
echo
chmod
Which command can be used to check the effective UID and GID of the currently logged-in user?
id
pwd
du
bg
df
Which command is the primary init daemon responsible for booting and managing services?
systemctl
atd
ping
netstat
systemd
Which command searches for files in real time based on name, permissions, size, or other criteria?
find
locate
host
du
id
Which command can display the contents of an archive to verify its files without extracting them?
rsync
tar
/etc/hosts
sftp
zip
Which command brings a background process to the current terminal so it can receive keyboard input?
A) fg
B) dig
C) /etc/fstab
D) ps
E) find
Which command is used to define the default file permissions for newly created files in the current shell?
sudo
bg
tail
umask
umount
Which command displays detailed file permissions, ownership, and other attributes in a directory listing?
mkdir
dnf
ps
rpm
ls
Which command can update only changed portions of files when synchronizing directories on different systems?
rsync
tar
/var/log
sftp
bzip2
Which directory often contains symbolic links that enable services for the multi-user environment?
/etc/sudoers.d
/etc/systemd/system/multi-user.target.wants/
/etc/systemd/system/
/run/log/journal
/etc/profile.d/local-umask.sh
Which command can be used to control service units so that, for example, your script’s service can be started or stopped?
su
cd
usermod
ip
systemctl
Which file is consulted first to map a hostname to an IPv4 for local name resolution?
/etc/cron.d
/etc/bashrc
/etc/services
/etc/resolv.conf
/etc/hosts
Which command is used to change the group ownership of a file or directory?
bg
crontab
cat
chgrp
chmod
Which command displays a basic list of all available and installed software groups on the system?
dnf group list
dnf provides
dnf repolist all
dnf module info
dnf group info
Which command is used to interactively view processes in real time and assess their resource usage?
/etc/passwd
jobs
kill
top
useradd
Which file must be adjusted to enable persistent journal storage?
/var/log/maillog
/etc/passwd
/etc/systemd/system/journald.conf
/etc/rsyslog.conf
/var/log/secure
Which command is used to determine which module stream a certain package belongs to?
dnf group install
dnf module provides
/etc/fstab
find
dnf group list hidden
Which directory can hold daily recurring scripts that help automate routine tasks?
/etc/cron.daily/
/etc/NetworkManager/system-connections/
/etc/bashrc
/etc/rsyslog.d
/etc/shadow
Which command is used to set a new password for an existing user?
passwd
groupdel
usermod
userdel
anacron
Which command reveals which package includes a particular file path on the system?
dnf module list
dnf search all
dnf config-manager
dnf provides
dnf remove
Which command provides detailed information about a package, such as its summary and license?
dnf module provides
dnf info
dnf group install
dnf list kernel
dnf repolist all
Which file can store environment settings for a user’s interactive login shell, including script path variables?
/var/log/secure
~/.bashrc
/etc/startup.profile
/etc/sudoers
/etc/passwd
Which command is used to download and install a package from configured repositories?
dnf install
dnf group mark install
dnf search all
dnf group info
dnf update kernel
Which file typically stores messages unrelated to authentication, mail, or scheduled tasks?
/etc/passwd
/var/log/secure
/var/log/maillog
/etc/shadow
/var/log/messages
Which directory is typically used to store personal shell scripts so they can be run more easily?
~/bin/
/mnt
/etc/systemd/system/
/usr/lib
/var/log
Which command removes an installed package from the system, also removing packages that depend on it?
dnf repolist all
dnf group list
dnf module info
dnf update
dnf remove
Which configuration file is commonly edited to define custom sorting rules?
/etc/rsyslog.conf
/etc/sudoers
/etc/fstab
/etc/hosts
/etc/shadow
Which directory is used for daily recurring tasks?
/boot
/etc/cron.daily/
/etc/hosts
/etc/crontab
/var/log
Which command changes both user and group ownership in one operation using the owner:group syntax?
chmod
kill
cd
usermod
chown
Which log file typically records messages related to scheduled tasks on a Red Hat Enterprise Linux system?
/var/log/maillog
/var/log/spooler
/var/log/secure
/var/log/cron
/var/log/messages
Which command is a daemon that continuously receives and processes log messages on the system?
at
kill
rsyslogd
systemctl
anacron
Which command is used to view the overall status of system services on the system?
systemd
df
dig
systemctl
ping
Which command removes a previously scheduled single-run job?
usermod
at
atrm
man
ping
Which command reveals a detailed overview of disks, partitions, and their mount points?
atrm
touch
lsblk
id
updatedb
