Unit 3: Networking, Packages, File Systems, and Virtualization - Practice Quiz
1 Which service manages network connections by default on Red Hat Enterprise Linux?
2 What is the primary purpose of an IP address?
3 Which command displays IP addresses assigned to network interfaces?
4 Which command lists NetworkManager connection profiles?
5 In RHEL 9, which directory commonly stores NetworkManager connection profile files?
6 Which command sets a persistent system host name?
7
Which command creates a gzip-compressed tar archive named backup.tar.gz from the data directory?
8 Which command securely copies files between systems using SSH?
9 Which tool can synchronize files with a remote system through SSH?
10
Which command installs the httpd package on a current RHEL system?
11 Which command updates all installed packages for which updates are available?
12 Which command lists enabled yum repositories?
13
Which command displays information about an uninstalled RPM package file named app.rpm?
14 Which RHEL command registers a system with Red Hat Subscription Management?
15 Which command displays block devices in a tree-like format?
16
Which command detaches the file system mounted at /mnt/data?
17
Which command creates a symbolic link named shortcut to report.txt?
18
Which command searches under /etc for files named hosts?
19 Which service provides the traditional virtualization management daemon on a RHEL host?
20 Which graphical application can be used to create and manage local virtual machines?
21
A server has routes for 192.168.0.0/16, 192.168.10.0/24, and a default route. Which route is used for traffic sent to 192.168.10.25?
192.168.10.0/24
192.168.0.0/16
22
A system can ping 8.8.8.8, but an application cannot connect to server.example.com. Which command best checks whether the host name can be resolved using the system's configured name-service sources?
getent hosts server.example.com
ss -lnt server.example.com
nmcli device show server.example.com
ip route get server.example.com
23
Which command correctly configures the connection static-ens3 with address 192.0.2.10/24, gateway 192.0.2.1, and manual IPv4 addressing?
nmcli connection add static-ens3 address 192.0.2.10/24 gateway 192.0.2.1 method manual
nmcli connection modify static-ens3 ipv4.addresses 192.0.2.10/24 ipv4.gateway 192.0.2.1 ipv4.method manual
nmcli device modify static-ens3 ipv4.address 192.0.2.10/24 ipv4.router 192.0.2.1 ipv4.method static
nmcli networking modify static-ens3 ipv4.addresses 192.0.2.10/24 ipv4.gateway 192.0.2.1
24
An administrator manually edits a NetworkManager connection profile for the connection named office. What should be done to make NetworkManager reread and activate the changed profile?
nmcli connection reload, then nmcli connection up office
nmcli device disconnect office, then delete the profile
ip link set office down, then restart sshd
systemctl reload firewalld, then execute ip route flush cache
25
Which command persistently changes a RHEL system's host name to db01.example.com?
hostnamectl set-hostname db01.example.com
sysctl hostname=db01.example.com
nmcli hostname add db01.example.com
hostname db01.example.com --persistent
26
An archive named logs.tar.xz was compressed with xz. Which command lists its contents without extracting any files?
tar -tJf logs.tar.xz
tar -tzf logs.tar.xz
tar -xJf logs.tar.xz
xz -d logs.tar.xz
27
Which command securely copies the local directory /opt/tools and all its contents to /srv/ on admin@host2?
scp -p /opt/tools admin@host2:/srv/
cp -r /opt/tools admin@host2:/srv/
ssh -r /opt/tools admin@host2:/srv/
scp -r /opt/tools admin@host2:/srv/
28
Which command synchronizes the contents of /srv/site/ to /srv/site/ on web.example.com over SSH while deleting destination files that no longer exist in the source?
rsync -a --delete -e ssh /srv/site/ admin@web.example.com:/srv/site/
rsync -a -e ssh admin@web.example.com:/srv/site/ /srv/site/
rsync --delete /srv/site admin@web.example.com:/srv/site/
scp -r --delete /srv/site/ admin@web.example.com:/srv/site/
29
An administrator wants to install the httpd package and automatically install any required dependencies. Which command should be used?
yum install httpd
rpm -q httpd
yum download httpd
rpm -i httpd
30
A server runs several critical applications. The administrator wants to update only the installed openssl package rather than all packages. Which command is appropriate?
yum check-update openssl
yum update openssl
yum reinstall openssl
yum upgrade --exclude openssl
31
The repository tools-repo is disabled, but an administrator wants to enable it only for a single installation of diagnostic-tool. Which command meets this requirement?
yum-config-manager --disable tools-repo diagnostic-tool
yum repolist tools-repo install diagnostic-tool
yum --disablerepo=tools-repo install diagnostic-tool
yum --enablerepo=tools-repo install diagnostic-tool
32
Before installing backup-agent.rpm, an administrator wants to inspect the package's installation and removal scripts. Which command should be used?
rpm -qi --scripts backup-agent.rpm
rpm -qp --scripts backup-agent.rpm
rpm -ql --scripts backup-agent.rpm
rpm -V --scripts backup-agent.rpm
33 On a traditionally managed RHEL system, which command sequence registers the host and automatically attaches a suitable available subscription?
subscription-manager enable, then subscription-manager register --local
yum register, then yum subscription attach --auto
subscription-manager register, then subscription-manager attach --auto
rpm --register, then subscription-manager repos --auto
34
A local RPM file named tool.rpm requires dependencies available in enabled repositories. Which command installs the file and resolves those dependencies?
yum install ./tool.rpm
rpm -q ./tool.rpm --requires
yum extract ./tool.rpm
rpm -i ./tool.rpm --resolve
35 Which command provides a tree-style view of block devices together with their file-system types, labels, UUIDs, and mount points?
mount -a
du -sh
df -hT
lsblk -f
36
A file system with UUID abcd-1234 should be mounted persistently at /data as XFS. Which /etc/fstab entry is appropriate?
UUID=abcd-1234 xfs /data defaults 0 0
UUID=abcd-1234 /data xfs defaults 0 0
/data UUID=abcd-1234 xfs defaults 0 0
mount UUID=abcd-1234 /data xfs defaults
37
The command umount /data reports that the target is busy. Which command can identify processes currently using that mounted file system?
findmnt -w /data
lsblk -f /data
mkfs -n /data
fuser -vm /data
38
The command ln report.txt report-link.txt creates a hard link. What happens if report.txt is later deleted?
report-link.txt becomes a broken symbolic link
report-link.txt changes into an empty file
report-link.txt still accesses the file data
report-link.txt is automatically deleted
39
Which command searches /var/log for regular files modified within approximately the last 24 hours?
find /var/log -type d -mtime +1
locate /var/log -type f -mtime -1
find /var/log -type f -mtime -1
grep -r -mtime -1 /var/log
40 Which command lists both running and stopped virtual machines managed by the local libvirt service?
virsh list --running
qemu-img list --all
virsh list --all
virt-install --list
41
A RHEL host has the following routes:
- 10.20.0.0/16 via 192.0.2.1 metric 50
- 10.20.30.0/24 via 192.0.2.2 metric 200
- 10.20.30.0/24 via 192.0.2.3 metric 100
- default via 192.0.2.254 metric 10
Which gateway is selected for a packet destined for 10.20.30.45?
192.0.2.3, because it has the best metric among the longest-prefix matches
192.0.2.254, because the default route has the lowest overall metric
192.0.2.1, because its route has the broadest network scope
192.0.2.2, because it is the first matching /24 route
42
A server can ping its default gateway and 8.8.8.8, but getent hosts repo.example.com fails. /etc/resolv.conf lists nameserver 192.0.2.53. Which command sequence most directly distinguishes a DNS-server reachability problem from an NSS configuration problem?
ss -lntp followed by nmcli networking connectivity check
ping -c 1 repo.example.com followed by ip route get 192.0.2.53
dig @192.0.2.53 repo.example.com followed by getent hosts repo.example.com
tracepath repo.example.com followed by hostnamectl status
43
Connection profile prod currently receives an IPv4 address through DHCP. It must instead use 192.0.2.20/24, gateway 192.0.2.1, and DNS servers 192.0.2.53 and 192.0.2.54, without retaining DHCP-provided DNS. Which command correctly changes the persistent profile?
nmcli con mod prod ipv4.method manual ipv4.addresses 192.0.2.20/24 ipv4.gateway 192.0.2.1 ipv4.dns "192.0.2.53 192.0.2.54" ipv4.ignore-auto-dns yes
nmcli dev mod prod ipv4.method static ipv4.address 192.0.2.20/24 ipv4.router 192.0.2.1 ipv4.nameserver "192.0.2.53 192.0.2.54"
nmcli con mod prod ipv4.method auto ipv4.addresses 192.0.2.20/24 ipv4.gateway 192.0.2.1 ipv4.dns "192.0.2.53 192.0.2.54" ipv4.ignore-auto-dns no
nmcli con add prod ipv4.method manual ipv4.addresses 192.0.2.20/24 ipv4.gateway 192.0.2.1 ipv4.dns "192.0.2.53 192.0.2.54" ipv4.never-default yes
44
An administrator directly edits a NetworkManager connection profile on disk while its old version remains loaded in memory. Which action makes NetworkManager reread the profile and then applies it to connection storage?
nmcli connection reload followed by nmcli connection up storage
systemctl daemon-reload followed by nmcli device connect storage
networkctl reload followed by networkctl reconfigure storage
nmcli device reapply storage followed by nmcli networking on
45
A host has hosts: files dns in /etc/nsswitch.conf. /etc/hosts maps 192.0.2.10 app.example.com, while DNS maps the same name to 192.0.2.20. Which result should getent ahostsv4 app.example.com normally report first?
192.0.2.20, because authoritative DNS overrides local host entries
192.0.2.10, because the files source is consulted before DNS
46 A directory tree contains POSIX ACLs, extended attributes, and SELinux labels. Which command creates a gzip-compressed archive while explicitly preserving all three metadata classes?
tar --acls --xattrs --selinux -czf backup.tar.gz /srv/data
tar --keep-directory-symlink --hard-dereference -czf backup.tar.gz /srv/data
tar --same-owner --numeric-owner -czf backup.tar.gz /srv/data
tar --preserve-permissions --sparse -czf backup.tar.gz /srv/data
47
A user runs scp -p report root@server:/secure/. Assuming the transfer succeeds, which property is preserved by -p in addition to the file contents?
48
The local directory /srv/site/ must become an exact mirror of /var/www/site/ on web1, including deleting local files absent from the remote source. Which command has the required source-directory semantics?
rsync -a --ignore-existing web1:/var/www/site/ /srv/site/
rsync -a --delete web1:/var/www/site /srv/site/
rsync -r --remove-source-files web1:/var/www/site/ /srv/site/
rsync -a --delete web1:/var/www/site/ /srv/site/
49 A RHEL system has packages at versions both newer and older than those currently available in enabled repositories. Which command synchronizes installed package versions with repository versions, allowing required downgrades?
yum distro-sync
yum update-minimal
yum reinstall '*'
yum upgrade --nobest
50
A repository configuration contains enabled=1, gpgcheck=1, and a valid baseurl, but no usable signing key has been imported or referenced. What is the expected result when installing a signed package from that repository?
gpgkey option is missing
51
Before installing agent.rpm, an administrator must inspect the shell commands that its RPM scriptlets would execute. Which command performs that inspection without installing the package?
rpm -qp --scripts agent.rpm
rpm -qf --scripts agent.rpm
rpm -qi --requires agent.rpm
rpm -V --scripts agent.rpm
52 A system must be registered noninteractively using an organization-specific activation key. Which command uses the intended subscription-manager workflow?
subscription-manager identity --org=ACME --activationkey=RHEL9-PROD
subscription-manager repos --org=ACME --activationkey=RHEL9-PROD
subscription-manager register --org=ACME --activationkey=RHEL9-PROD
subscription-manager attach --org=ACME --activationkey=RHEL9-PROD
53
An RPM update contains a changed configuration file marked %config(noreplace). The installed copy has also been locally modified. What does RPM normally do during the update?
.rpmnew file
.rpmmerge file
.rpmsave file
54
A storage device may appear under different /dev/sdX names after reboot. Which command most directly obtains its filesystem UUID for use in /etc/fstab?
blkid /dev/sdb1
fdisk -l /dev/sdb1
findmnt /dev/sdb1
df -i /dev/sdb1
55
The following /etc/fstab entry should allow the machine to continue booting when an occasionally disconnected data disk is absent:
UUID=abc123 /archive xfs defaults 0 0
Which option should be added for that requirement?
noauto
remount
nofail
bind
56
A filesystem is mounted with noexec, and /mnt/tools/check.sh has executable mode bits. Direct execution fails, but the administrator can read the file. Which invocation can still run the script unless another security control blocks it?
exec /mnt/tools/check.sh
bash /mnt/tools/check.sh
nohup /mnt/tools/check.sh
env /mnt/tools/check.sh
57
File /data/current.db has two hard links. A process replaces that pathname by creating a new file and atomically renaming it over /data/current.db. What happens to the other hard link?
58
An administrator must find regular files under /srv that have the setuid bit set, without crossing into other mounted filesystems below /srv. Which command meets both requirements?
find /srv -follow -type f -perm /4000
find /srv -xdev -type f -perm -4000
find /srv -mount -type f -perm 4000
locate /srv -type f -perm -4000
59
A libvirt virtual network named isolated is currently active but does not start after the host reboots. Which command changes its persistent startup behavior without redefining the network?
virsh net-autostart isolated
virsh net-define isolated
virsh net-start isolated
virsh net-update isolated
60
A new KVM guest must be created with a 30 GiB qcow2 disk, attached to libvirt's default network, and installed graphically from an ISO. Which virt-install command specifies those requirements?
virt-install --name appvm --memory 4096 --vcpus 2 --filesystem size=30,format=qcow2 --network hostdev=default --import /iso/rhel.iso
virt-install --name appvm --memory 4096 --vcpus 2 --disk size=30,format=raw --network bridge=default --location /iso/rhel.iso
virt-install --name appvm --memory 4096 --vcpus 2 --disk size=30,format=qcow2 --network type=default --pxe /iso/rhel.iso
virt-install --name appvm --memory 4096 --vcpus 2 --disk size=30,format=qcow2 --network network=default --cdrom /iso/rhel.iso
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →