Unit 6: Network Storage, Boot, Security, and Installation - Practice Quiz

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

1 Which protocol is commonly used to share directories between Linux systems over a network?

Accessing Network-Attached Storage Easy
A. NFS
B. SSH
C. DNS
D. DHCP

2 Which command displays the NFS exports available from a remote server?

Accessing Network-Attached Storage Easy
A. firewall-cmd server
B. systemctl list server
C. hostnamectl server
D. showmount -e server

3 Which command mounts the NFS export server:/share on /mnt/share?

Mounting Network-Attached Storage with NFS Easy
A. mount -t nfs server:/share /mnt/share
B. mount -t ext4 server:/share /mnt/share
C. umount -t nfs server:/share /mnt/share
D. exportfs -t nfs server:/share /mnt/share

4 Which file is commonly edited to make an NFS mount persistent across reboots?

Mounting Network-Attached Storage with NFS Easy
A. /etc/fstab
B. /etc/passwd
C. /etc/hosts
D. /etc/resolv.conf

5 Which service mounts network file systems automatically when their directories are accessed?

Automounting Network-Attached Storage Easy
A. autofs
B. tuned
C. sshd
D. chronyd

6 Which file is the main configuration map for the autofs service?

Automounting Network-Attached Storage Easy
A. /etc/nsswitch.conf
B. /etc/exports
C. /etc/auto.master
D. /etc/sysctl.conf

7 Which boot loader is commonly used by Red Hat Enterprise Linux?

Controlling the Boot Process Easy
A. GRUB2
B. Anaconda
C. Kickstart
D. Wayland

8 Which command displays the default systemd boot target?

Selecting the Boot Target Easy
A. systemctl list-default
B. systemctl get-default
C. systemctl show-boot
D. systemctl get-target

9 Which systemd target starts a graphical login environment?

Selecting the Boot Target Easy
A. rescue.target
B. emergency.target
C. multi-user.target
D. graphical.target

10 Which parameter can be added to the GRUB kernel command line to interrupt startup for root password recovery?

Resetting the Root Password Easy
A. ro.debug
B. rd.break
C. fs.check
D. net.boot

11 Which command is used to assign a new password to the root account after entering the recovery environment?

Resetting the Root Password Easy
A. useradd
B. passwd
C. userdel
D. whoami

12 Which command checks and repairs a Linux file system?

Repairing File System Issues at Boot Easy
A. fsck
B. df
C. lsblk
D. mount

13 Which firewall management service is commonly used in Red Hat Enterprise Linux?

Managing Server Firewalls Easy
A. autofs
B. firewalld
C. sshd
D. chronyd

14 Which command allows HTTP traffic in the current firewalld configuration?

Managing Server Firewalls Easy
A. firewall-cmd --query-service=http
B. firewall-cmd --remove-service=http
C. firewall-cmd --add-service=http
D. firewall-cmd --add-service=dns

15 Which option makes a firewall-cmd rule remain after a reboot?

Managing Server Firewalls Easy
A. --runtime
B. --reload
C. --complete
D. --permanent

16 Which utility is used to manage SELinux port type assignments?

Controlling SELinux Port Labeling Easy
A. semanage
B. hostnamectl
C. restorecon
D. firewall-cmd

17 What does SELinux do when it operates in enforcing mode?

Managing Network Security Easy
A. Logs violations without blocking
B. Disables all security policies
C. Allows every network connection
D. Blocks and logs policy violations

18 What is the name of the graphical installer used by Red Hat Enterprise Linux?

Installing Red Hat Enterprise Linux Easy
A. GRUB2
B. Kickstart
C. Cockpit
D. Anaconda

19 What is the main purpose of a Kickstart file?

Automating Installation with Kickstart Easy
A. Automate operating system installation
B. Configure firewall runtime rules
C. Monitor active network connections
D. Repair damaged file systems

20 Which graphical tool can be used to create and manage KVM virtual machines?

Installing and Configuring Virtual Machines Easy
A. virt-manager
B. firewall-config
C. system-config-printer
D. nm-connection-editor

21 A Linux administrator needs to identify available NFS exports from a server before mounting one. Which command is most appropriate?

Accessing Network-Attached Storage Medium
A. mount -l nfs-server
B. nfsstat -e nfs-server
C. exportfs -v nfs-server
D. showmount -e nfs-server

22 Which /etc/fstab entry mounts the /projects export from files.example.com on /mnt/projects using NFS at boot?

Mounting Network-Attached Storage with NFS Medium
A. files.example.com:/projects /mnt/projects nfs defaults 0 0
B. files.example.com:/projects /mnt/projects ext4 defaults 0 0
C. files.example.com:/mnt/projects /projects nfs defaults 0 0
D. /mnt/projects files.example.com:/projects nfs auto 1 1

23 An NFS mount fails because the client cannot resolve the server name. Which action should be checked first?

Mounting Network-Attached Storage with NFS Medium
A. Verify DNS or /etc/hosts resolution
B. Change the local file system type
C. Disable the client firewall permanently
D. Rebuild the server's boot loader

24 What is the main advantage of using autofs for an NFS home directory?

Automounting Network-Attached Storage Medium
A. It replaces the NFS server with a local file system
B. It mounts the directory when accessed and unmounts it when idle
C. It encrypts all files without additional configuration
D. It copies the directory permanently to local storage

25 In an indirect autofs map, which location is typically used for a map entry mounting an export under /home/remote?

Automounting Network-Attached Storage Medium
A. /etc/auto.master.d/remote.autofs
B. /var/lib/autofs/remote.mount
C. /etc/fstab.d/remote.nfs
D. /etc/systemd/remote.mount

26 A system boots to a graphical interface, but an administrator wants to start it in a non-graphical troubleshooting mode for one boot. Which GRUB action is appropriate?

Controlling the Boot Process Medium
A. Edit the kernel line and append systemd.unit=multi-user.target
B. Delete the GRUB configuration before rebooting
C. Replace the kernel image with the rescue image
D. Edit the initrd line and append systemd.target=graphical.target

27 Which command permanently configures a system to boot into the graphical target?

Selecting the Boot Target Medium
A. systemctl start graphical.target --permanent
B. systemctl enable graphical.target
C. systemctl set-default graphical.target
D. grub2-mkconfig --target graphical.target

28 An administrator needs a target that starts networking and most system services but does not start a graphical login manager. Which target should be selected?

Selecting the Boot Target Medium
A. emergency.target
B. multi-user.target
C. rescue.target
D. graphical.target

29 After booting into an emergency shell to reset the root password on an SELinux-enabled system, which sequence helps preserve correct file labels?

Resetting the Root Password Medium
A. Change the password in /boot, then regenerate the initramfs
B. Delete /etc/shadow, change the password, and disable SELinux
C. Remount / read-write, change the password, create /.autorelabel, and reboot
D. Remount / read-only, change the password, and skip relabeling

30 Why is rw init=/bin/bash sometimes added to the Linux kernel command line during root password recovery?

Resetting the Root Password Medium
A. It starts a shell with the root file system writable
B. It enables the graphical desktop before authentication
C. It mounts every available NFS export automatically
D. It replaces the system kernel with a recovery kernel

31 A boot process reports errors on an unmounted ext4 file system. Which command is appropriate for checking and repairing it?

Repairing File System Issues at Boot Medium
A. mkfs.ext4 /dev/vdb1
B. xfs_repair -n /dev/vdb1
C. fsck -t ext4 /dev/vdb1
D. mount -o repair /dev/vdb1

32 A server enters emergency mode because an /etc/fstab entry references a disk that is temporarily unavailable. Which option can prevent the missing mount from stopping boot?

Repairing File System Issues at Boot Medium
A. Change the file system type to auto-fix
B. Add the nofail option to the mount entry
C. Add the roothold option to the entry
D. Replace the device with swap

33 A service should accept connections only from the 192.0.2.0/24 network. Which control best enforces this requirement?

Managing Network Security Medium
A. Change the server hostname to the subnet name
B. Disable logging for rejected connections
C. Set the service port to a random unused value
D. Restrict the service with a firewall source rule

34 Which command permanently permits HTTPS traffic in the default firewalld zone and immediately applies the change?

Managing Server Firewalls Medium
A. firewall-cmd --permanent --remove-service=https followed by firewall-cmd --restart
B. firewall-cmd --add-port=443/udp --permanent followed by systemctl reload firewalld
C. firewall-cmd --permanent --add-service=https followed by firewall-cmd --reload
D. firewall-cmd --add-service=https --temporary followed by systemctl restart sshd

35 An administrator added port 8080/tcp to firewalld but remote clients still cannot connect. Which check is most useful next?

Managing Server Firewalls Medium
A. Remove all rules from the active firewalld zone
B. Confirm the service is listening on the expected address and port
C. Change the port protocol from TCP to ICMP
D. Reinstall the server's network interface driver

36 A web service labeled for HTTP is configured to listen on TCP port 8443. Which command adds the correct SELinux port label?

Controlling SELinux Port Labeling Medium
A. chcon -t http_port_t /etc/services
B. restorecon -p tcp -t http_port_t 8443
C. setsebool -a -t http_port_t -p tcp 8443
D. semanage port -a -t http_port_t -p tcp 8443

37 Which command displays the SELinux port types currently associated with TCP ports used by HTTP services?

Controlling SELinux Port Labeling Medium
A. getsebool -a | grep http_port_t
B. firewall-cmd --list-services | grep http_port_t
C. semanage port -l | grep http_port_t
D. ls -Z /var/www | grep http_port_t

38 During a Red Hat Enterprise Linux installation, which partitioning approach gives the installer control over the layout while retaining automatic file system creation?

Installing Red Hat Enterprise Linux Medium
A. Select automatic partitioning and manually edit /etc/fstab
B. Select network boot and skip disk configuration
C. Select raw disk mode and format only the swap partition
D. Select custom partitioning with LVM and define mount points

39 A minimal RHEL server requires remote administration after installation. Which installation choice is most directly relevant?

Installing Red Hat Enterprise Linux Medium
A. Select a local media repository and remove all services
B. Install only the workstation environment and disable networking
C. Install the server environment and enable OpenSSH access
D. Choose a graphical environment and block TCP port 22

40 A Kickstart file must run a command after package installation but before the system reboots. Which section should contain the command?

Automating Installation with Kickstart Medium
A. %post
B. %addon
C. %pre
D. %packages

41 A RHEL client can resolve an NFS server's hostname and ping it, but showmount -e server.example.com times out. The server exports directories through NFSv4 only and its firewall permits the NFS service. Which conclusion best explains the timeout?

Accessing Network-Attached Storage Hard
A. showmount requires write permission on at least one exported directory
B. showmount requires the server hostname to be defined in /etc/hosts
C. showmount works only when the client has already mounted the NFSv4 root
D. showmount queries the legacy mount service, which an NFSv4-only server may not expose

42 A client must mount the NFSv4 export server.example.com:/projects at /mnt/projects during boot. Boot must continue if the server is unavailable, and ordinary local file-system checks must not be attempted. Which /etc/fstab entry is most appropriate?

Mounting Network-Attached Storage with NFS Hard
A. server.example.com:/projects /mnt/projects nfs4 defaults,_netdev 1 1
B. server.example.com:/projects /mnt/projects nfs4 defaults,_netdev,nofail 0 0
C. server.example.com:/projects /mnt/projects ext4 defaults,nofail 0 2
D. server.example.com:/projects /mnt/projects nfs4 defaults,fail 1 2

43 An application writes critical records to an NFS mount. Administrators want interrupted operations to keep retrying after a temporary server outage rather than return potentially unsafe I/O errors to the application. Which mount behavior best satisfies this requirement?

Mounting Network-Attached Storage with NFS Hard
A. Use a soft mount and reduce the retry count to avoid blocked processes
B. Use a synchronous mount and set the retransmission count to zero
C. Use a hard mount and allow requests to retry until the server responds
D. Use an interruptible soft mount and disable attribute caching

44 An autofs indirect map should mount each user's NFS home directory only when /home/<username> is accessed. The server stores homes as /exports/home/<username>. Which map entry correctly uses a wildcard substitution?

Automounting Network-Attached Storage Hard
A. & -fstype=nfs4,rw server.example.com:/exports/home/*
B. /* -fstype=nfs4,rw server.example.com:/exports/home/$USER
C. home -fstype=nfs4,rw server.example.com:/exports/home/&
D. * -fstype=nfs4,rw server.example.com:/exports/home/&

45 After adding /data /etc/auto.data to /etc/auto.master.d/data.autofs, an administrator creates /etc/auto.data with reports -rw server:/exports/reports. Accessing /data/reports still returns "No such file or directory," and no autofs process has reloaded the configuration. What is the most direct corrective action?

Automounting Network-Attached Storage Hard
A. Run systemctl daemon-reexec so systemd parses the NFS export
B. Restart the autofs service so it reads the new master map
C. Run mount -a so the kernel reads the new indirect map
D. Restart nfs-server so the client map becomes visible

46 A system enters emergency mode because a nonessential local data volume listed in /etc/fstab is missing. Administrators want future boots to continue without waiting for that volume, while still mounting it automatically whenever it is available. Which change is most appropriate?

Controlling the Boot Process Hard
A. Set the fifth /etc/fstab field to 1 for the volume
B. Add nofail to the volume's mount options in /etc/fstab
C. Add noauto to the volume's mount options in /etc/fstab
D. Set the sixth /etc/fstab field to 1 for the volume

47 A graphical RHEL server must boot into text-only multi-user mode for one troubleshooting session, then return to its configured graphical default on the next reboot. Which approach meets both requirements?

Selecting the Boot Target Hard
A. Run systemctl set-default multi-user.target before rebooting once
B. Append systemd.unit=multi-user.target to the kernel command line once
C. Append systemd.default_standard_output=multi-user to the kernel line
D. Replace default.target with a permanent link to rescue.target

48 A server currently uses graphical.target by default. An administrator runs systemctl isolate multi-user.target from a graphical session. What is the expected result?

Selecting the Boot Target Hard
A. The system starts multi-user.target alongside all graphical-only units indefinitely
B. The current system switches targets, but the next boot still uses graphical.target
C. The system permanently changes its default and immediately reboots without graphics
D. The current system remains graphical, but the next boot uses multi-user.target

49 A RHEL system is booted with rd.break to reset a forgotten root password on an SELinux-enforcing installation. Which sequence correctly updates the installed system and prepares SELinux labels for the next boot?

Resetting the Root Password Hard
A. chroot /sysroot; mount -o remount,ro /; passwd; restorecon /; reboot
B. mount -o remount,rw /; passwd; touch /sysroot/.autorelabel; exit and reboot
C. mount -o remount,rw /boot; chroot /boot; passwd; setenforce 0; reboot
D. mount -o remount,rw /sysroot; chroot /sysroot; passwd; touch /.autorelabel; exit and reboot

50 Boot stops because an XFS file system on /dev/mapper/vg-data is corrupt. The volume is not the root file system and can be kept unmounted in emergency mode. Which repair procedure is appropriate?

Repairing File System Issues at Boot Hard
A. Mount the volume read-only, then run e2fsck -y /dev/mapper/vg-data
B. Ensure the volume is mounted, then run xfs_growfs /dev/mapper/vg-data
C. Mount the volume read-write, then run fsck.xfs -f /dev/mapper/vg-data
D. Ensure the volume is unmounted, then run xfs_repair /dev/mapper/vg-data

51 A non-root ext4 file system fails its automatic boot check. The administrator has confirmed it is unmounted and wants a forced consistency check that automatically accepts repairs. Which command is appropriate?

Repairing File System Issues at Boot Hard
A. xfs_repair -f -y /dev/mapper/vg-app
B. mount -o remount,repair /dev/mapper/vg-app
C. tune2fs -f -y /dev/mapper/vg-app
D. e2fsck -f -y /dev/mapper/vg-app

52 A host has two NetworkManager connections, both currently active. A firewall zone was assigned by editing only one connection profile with nmcli, but packets continue to use the old zone. What additional action is generally required for the profile change to take effect?

Managing Network Security Hard
A. Run semanage port -a so SELinux associates the interface with the zone
B. Reactivate the modified connection so NetworkManager reapplies its zone assignment
C. Flush all nftables tables so NetworkManager can recreate the connection profile
D. Restart sshd so existing sockets inherit the modified connection zone

53 An administrator runs firewall-cmd --zone=public --add-service=https and confirms that HTTPS works. After reboot, the rule is gone. Which command adds the missing persistent configuration without immediately altering the current runtime state?

Managing Server Firewalls Hard
A. firewall-cmd --runtime-to-permanent --zone=public --add-service=https
B. firewall-cmd --permanent --zone=public --add-service=https
C. firewall-cmd --complete-reload --zone=public --add-service=https
D. firewall-cmd --reload --zone=public --add-service=https

54 A server's public zone is bound to interface ens3, but the source network 192.0.2.0/24 is explicitly assigned to the trusted zone. A packet from 192.0.2.10 arrives through ens3. Which zone handles the packet?

Managing Server Firewalls Hard
A. The public zone, because an interface assignment always takes precedence
B. The default zone, because the source and interface assignments conflict
C. The trusted zone, because an explicit source assignment takes precedence
D. Both zones, because firewalld combines all rules matching the packet

55 A custom web service runs under the confined HTTP server domain and must listen on TCP port 8088. The firewall is already open, but SELinux denies the bind. Port 8088 has no existing SELinux port mapping. Which persistent command is appropriate?

Controlling SELinux Port Labeling Hard
A. chcon -t http_port_t /proc/sys/net/ipv4/8088
B. setsebool -P httpd_can_network_connect on 8088
C. semanage port -a -t http_port_t -p tcp 8088
D. semanage port -m -t http_port_t -p udp 8088

56 An administrator attempts semanage port -a -t http_port_t -p tcp 8443, but the command reports that TCP port 8443 is already defined with another SELinux type. What should the administrator do after verifying that reassignment is appropriate?

Controlling SELinux Port Labeling Hard
A. Use restorecon -v -t http_port_t tcp/8443
B. Use setenforce http_port_t:tcp:8443
C. Use semanage port -d -t http_port_t -p tcp 8443
D. Use semanage port -m -t http_port_t -p tcp 8443

57 A UEFI-based RHEL installation uses GPT, software RAID for most storage, and a separate EFI System Partition. Which design is required for firmware boot support?

Installing Red Hat Enterprise Linux Hard
A. Create the EFI System Partition across RAID 0 formatted as XFS and mounted at /efi
B. Create a non-RAID EFI System Partition formatted as FAT and mounted at /boot/efi
C. Create a BIOS boot partition formatted as ext4 and mounted at /boot/efi
D. Create an EFI System Partition inside LVM formatted as XFS and mounted at /boot

58 During installation, a server must retain data on an existing partition while replacing the operating system. Which storage action best minimizes the risk of destroying the retained data?

Installing Red Hat Enterprise Linux Hard
A. Use automatic partitioning and trust the installer to infer which partition contains data
B. Reinitialize the disk label and recreate the retained partition with identical start sectors
C. Use custom partitioning, preserve that partition, and reformat only selected OS volumes
D. Delete all existing partitions and restore the retained partition from the installer cache

59 A Kickstart %post script must copy a file from the installation environment's /run/install/repo into the installed system. The script needs direct access to both the installer environment and the target mounted at /mnt/sysroot. Which section declaration is most appropriate?

Automating Installation with Kickstart Hard
A. %pre --nochroot
B. %post --nochroot
C. %packages --instLangs=en_US
D. %post --interpreter=/bin/bash

60 A KVM guest must be live-migratable among hosts with different CPU generations. Maximum guest CPU performance is less important than compatibility. Which CPU configuration is the best choice?

Installing and Configuring Virtual Machines Hard
A. Use a common virtual CPU model supported by every migration host
B. Use host model and permit migration despite missing destination features
C. Use host passthrough so each guest exposes all source-host CPU features
D. Use software emulation with an unrestricted source-host CPU definition