Unit 3: Networking, Packages, File Systems, and Virtualization - Practice Quiz

CSE493 — Linux System Administration 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Which service manages network connections by default on Red Hat Enterprise Linux?

Managing Red Hat Enterprise Linux Networking Easy
A. NetworkAdmin
B. NetworkManager
C. systemd-resolved
D. firewalld

2 What is the primary purpose of an IP address?

Networking Concepts Easy
A. Compress transmitted data
B. Identify a network interface
C. Store domain records
D. Encrypt network traffic

3 Which command displays IP addresses assigned to network interfaces?

Validating Network Configuration Easy
A. ip link set
B. ip neigh flush
C. ip addr
D. ip route

4 Which command lists NetworkManager connection profiles?

Configuring Networking with nmcli Easy
A. nmcli radio all
B. nmcli device modify
C. nmcli connection show
D. nmcli general reload

5 In RHEL 9, which directory commonly stores NetworkManager connection profile files?

Editing Network Configuration Files Easy
A. /etc/systemd/network-services/
B. /etc/NetworkManager/system-connections/
C. /usr/share/hosts/connections/
D. /var/lib/network/interfaces/

6 Which command sets a persistent system host name?

Configuring Host Names and Name Resolution Easy
A. host set-name
B. uname set-hostname
C. nmcli set-host
D. hostnamectl set-hostname

7 Which command creates a gzip-compressed tar archive named backup.tar.gz from the data directory?

Managing Compressed tar Archives Easy
A. tar -cjf backup.tar.gz data
B. tar -czf backup.tar.gz data
C. tar -xzf backup.tar.gz data
D. tar -tf backup.tar.gz data

8 Which command securely copies files between systems using SSH?

Copying Files Between Systems Securely Easy
A. telnet
B. scp
C. ftp
D. cp

9 Which tool can synchronize files with a remote system through SSH?

Synchronizing Files Between Systems Securely Easy
A. gzip
B. mount
C. rsync
D. locate

10 Which command installs the httpd package on a current RHEL system?

Installing and Updating Software Packages Easy
A. dnf install httpd
B. systemctl add httpd
C. tar install httpd
D. rpm remove httpd

11 Which command updates all installed packages for which updates are available?

Managing Software Updates with yum Easy
A. yum search
B. yum remove
C. yum list
D. yum update

12 Which command lists enabled yum repositories?

Enabling yum Software Repositories Easy
A. yum groups
B. yum history
C. yum repolist
D. yum provides

13 Which command displays information about an uninstalled RPM package file named app.rpm?

Examining RPM Package Files Easy
A. rpm -V app.rpm
B. rpm -ql app.rpm
C. rpm -e app.rpm
D. rpm -qip app.rpm

14 Which RHEL command registers a system with Red Hat Subscription Management?

Attaching Systems to Subscriptions for Software Updates Easy
A. subscription-manager register
B. subscription-manager release
C. subscription-manager repos
D. subscription-manager status

15 Which command displays block devices in a tree-like format?

Identifying File Systems and Devices Easy
A. lsattr
B. lsblk
C. lsmod
D. lspci

16 Which command detaches the file system mounted at /mnt/data?

Mounting and Unmounting File Systems Easy
A. umount /mnt/data
B. unmountfs /mnt/data
C. mount /mnt/data
D. detach /mnt/data

17 Which command creates a symbolic link named shortcut to report.txt?

Making Links Between Files Easy
A. ln -s report.txt shortcut
B. cp -s report.txt shortcut
C. link -r report.txt shortcut
D. ln -h report.txt shortcut

18 Which command searches under /etc for files named hosts?

Locating Files on the System Easy
A. find /etc -name hosts
B. locate /etc -type hosts
C. whereis /etc -name hosts
D. search /etc -file hosts

19 Which service provides the traditional virtualization management daemon on a RHEL host?

Managing a Local Virtualization Host Easy
A. sshd
B. libvirtd
C. cupsd
D. chronyd

20 Which graphical application can be used to create and manage local virtual machines?

Installing a New Virtual Machine Easy
A. Disk Usage Analyzer
B. Network File Browser
C. System Log Viewer
D. Virtual Machine Manager

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?

Networking Concepts Medium
A. The default route
B. The route for 192.168.10.0/24
C. The route for 192.168.0.0/16
D. The route with the oldest timestamp

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?

Validating Network Configuration Medium
A. getent hosts server.example.com
B. ss -lnt server.example.com
C. nmcli device show server.example.com
D. 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?

Configuring Networking with nmcli Medium
A. nmcli connection add static-ens3 address 192.0.2.10/24 gateway 192.0.2.1 method manual
B. nmcli connection modify static-ens3 ipv4.addresses 192.0.2.10/24 ipv4.gateway 192.0.2.1 ipv4.method manual
C. nmcli device modify static-ens3 ipv4.address 192.0.2.10/24 ipv4.router 192.0.2.1 ipv4.method static
D. 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?

Editing Network Configuration Files Medium
A. Run nmcli connection reload, then nmcli connection up office
B. Run nmcli device disconnect office, then delete the profile
C. Run ip link set office down, then restart sshd
D. Run systemctl reload firewalld, then execute ip route flush cache

25 Which command persistently changes a RHEL system's host name to db01.example.com?

Configuring Host Names and Name Resolution Medium
A. hostnamectl set-hostname db01.example.com
B. sysctl hostname=db01.example.com
C. nmcli hostname add db01.example.com
D. 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?

Managing Compressed tar Archives Medium
A. tar -tJf logs.tar.xz
B. tar -tzf logs.tar.xz
C. tar -xJf logs.tar.xz
D. xz -d logs.tar.xz

27 Which command securely copies the local directory /opt/tools and all its contents to /srv/ on admin@host2?

Copying Files Between Systems Securely Medium
A. scp -p /opt/tools admin@host2:/srv/
B. cp -r /opt/tools admin@host2:/srv/
C. ssh -r /opt/tools admin@host2:/srv/
D. 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?

Synchronizing Files Between Systems Securely Medium
A. rsync -a --delete -e ssh /srv/site/ admin@web.example.com:/srv/site/
B. rsync -a -e ssh admin@web.example.com:/srv/site/ /srv/site/
C. rsync --delete /srv/site admin@web.example.com:/srv/site/
D. 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?

Installing and Updating Software Packages Medium
A. yum install httpd
B. rpm -q httpd
C. yum download httpd
D. 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?

Managing Software Updates with yum Medium
A. yum check-update openssl
B. yum update openssl
C. yum reinstall openssl
D. 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?

Enabling yum Software Repositories Medium
A. yum-config-manager --disable tools-repo diagnostic-tool
B. yum repolist tools-repo install diagnostic-tool
C. yum --disablerepo=tools-repo install diagnostic-tool
D. 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?

Examining RPM Package Files Medium
A. rpm -qi --scripts backup-agent.rpm
B. rpm -qp --scripts backup-agent.rpm
C. rpm -ql --scripts backup-agent.rpm
D. 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?

Attaching Systems to Subscriptions for Software Updates Medium
A. subscription-manager enable, then subscription-manager register --local
B. yum register, then yum subscription attach --auto
C. subscription-manager register, then subscription-manager attach --auto
D. 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?

RPM Software Packages and Yum Medium
A. yum install ./tool.rpm
B. rpm -q ./tool.rpm --requires
C. yum extract ./tool.rpm
D. 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?

Identifying File Systems and Devices Medium
A. mount -a
B. du -sh
C. df -hT
D. lsblk -f

36 A file system with UUID abcd-1234 should be mounted persistently at /data as XFS. Which /etc/fstab entry is appropriate?

Mounting and Unmounting File Systems Medium
A. UUID=abcd-1234 xfs /data defaults 0 0
B. UUID=abcd-1234 /data xfs defaults 0 0
C. /data UUID=abcd-1234 xfs defaults 0 0
D. 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?

Accessing Linux File Systems Medium
A. findmnt -w /data
B. lsblk -f /data
C. mkfs -n /data
D. fuser -vm /data

38 The command ln report.txt report-link.txt creates a hard link. What happens if report.txt is later deleted?

Making Links Between Files Medium
A. report-link.txt becomes a broken symbolic link
B. report-link.txt changes into an empty file
C. report-link.txt still accesses the file data
D. report-link.txt is automatically deleted

39 Which command searches /var/log for regular files modified within approximately the last 24 hours?

Locating Files on the System Medium
A. find /var/log -type d -mtime +1
B. locate /var/log -type f -mtime -1
C. find /var/log -type f -mtime -1
D. grep -r -mtime -1 /var/log

40 Which command lists both running and stopped virtual machines managed by the local libvirt service?

Managing a Local Virtualization Host Medium
A. virsh list --running
B. qemu-img list --all
C. virsh list --all
D. 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?

Networking Concepts Hard
A. 192.0.2.3, because it has the best metric among the longest-prefix matches
B. 192.0.2.254, because the default route has the lowest overall metric
C. 192.0.2.1, because its route has the broadest network scope
D. 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?

Validating Network Configuration Hard
A. ss -lntp followed by nmcli networking connectivity check
B. ping -c 1 repo.example.com followed by ip route get 192.0.2.53
C. dig @192.0.2.53 repo.example.com followed by getent hosts repo.example.com
D. 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?

Configuring Networking with nmcli Hard
A. 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
B. 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"
C. 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
D. 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?

Editing Network Configuration Files Hard
A. nmcli connection reload followed by nmcli connection up storage
B. systemctl daemon-reload followed by nmcli device connect storage
C. networkctl reload followed by networkctl reconfigure storage
D. 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?

Configuring Host Names and Name Resolution Hard
A. 192.0.2.20, because authoritative DNS overrides local host entries
B. 192.0.2.10, because the files source is consulted before DNS
C. Both addresses sorted numerically, because NSS merges all sources
D. No address, because conflicting records cause NSS validation to fail

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?

Managing Compressed tar Archives Hard
A. tar --acls --xattrs --selinux -czf backup.tar.gz /srv/data
B. tar --keep-directory-symlink --hard-dereference -czf backup.tar.gz /srv/data
C. tar --same-owner --numeric-owner -czf backup.tar.gz /srv/data
D. 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?

Copying Files Between Systems Securely Hard
A. Numeric owner, numeric group, and inode number
B. Modification time, access time, and permission mode
C. Hard-link relationships, sparse extents, and file capabilities
D. SELinux context, ACL entries, and extended attributes

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?

Synchronizing Files Between Systems Securely Hard
A. rsync -a --ignore-existing web1:/var/www/site/ /srv/site/
B. rsync -a --delete web1:/var/www/site /srv/site/
C. rsync -r --remove-source-files web1:/var/www/site/ /srv/site/
D. 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?

Managing Software Updates with yum Hard
A. yum distro-sync
B. yum update-minimal
C. yum reinstall '*'
D. 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?

Enabling yum Software Repositories Hard
A. Yum installs the package but marks its RPM database entry as untrusted
B. Yum disables signature checking because the gpgkey option is missing
C. Yum refuses the transaction because it cannot validate the package signature
D. Yum installs the package because repository metadata was downloaded successfully

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?

Examining RPM Package Files Hard
A. rpm -qp --scripts agent.rpm
B. rpm -qf --scripts agent.rpm
C. rpm -qi --requires agent.rpm
D. 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?

Attaching Systems to Subscriptions for Software Updates Hard
A. subscription-manager identity --org=ACME --activationkey=RHEL9-PROD
B. subscription-manager repos --org=ACME --activationkey=RHEL9-PROD
C. subscription-manager register --org=ACME --activationkey=RHEL9-PROD
D. 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?

RPM Software Packages and Yum Hard
A. It keeps the local file and writes the packaged version as an .rpmnew file
B. It merges both versions and writes conflicts into an .rpmmerge file
C. It aborts the package transaction until the local file is removed
D. It installs the packaged file and saves the local version as an .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?

Identifying File Systems and Devices Hard
A. blkid /dev/sdb1
B. fdisk -l /dev/sdb1
C. findmnt /dev/sdb1
D. 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?

Mounting and Unmounting File Systems Hard
A. noauto
B. remount
C. nofail
D. 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?

Accessing Linux File Systems Hard
A. exec /mnt/tools/check.sh
B. bash /mnt/tools/check.sh
C. nohup /mnt/tools/check.sh
D. 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?

Making Links Between Files Hard
A. It is converted into a symbolic link targeting the replacement pathname
B. It becomes a dangling link because the original pathname was overwritten
C. It automatically changes to reference the newly renamed replacement inode
D. It continues to reference the original inode and original file contents

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?

Locating Files on the System Hard
A. find /srv -follow -type f -perm /4000
B. find /srv -xdev -type f -perm -4000
C. find /srv -mount -type f -perm 4000
D. 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?

Managing a Local Virtualization Host Hard
A. virsh net-autostart isolated
B. virsh net-define isolated
C. virsh net-start isolated
D. 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?

Installing a New Virtual Machine Hard
A. virt-install --name appvm --memory 4096 --vcpus 2 --filesystem size=30,format=qcow2 --network hostdev=default --import /iso/rhel.iso
B. virt-install --name appvm --memory 4096 --vcpus 2 --disk size=30,format=raw --network bridge=default --location /iso/rhel.iso
C. virt-install --name appvm --memory 4096 --vcpus 2 --disk size=30,format=qcow2 --network type=default --pxe /iso/rhel.iso
D. virt-install --name appvm --memory 4096 --vcpus 2 --disk size=30,format=qcow2 --network network=default --cdrom /iso/rhel.iso