Chapter 2
System Operations and Maintenance

THE FOLLOWING COMPTIA LINUX+ EXAM OBJECTIVES ARE COVERED IN THIS CHAPTER:

  • images  2.1 Given a scenario, conduct software installations, configurations, updates, and removals
    • Package types
      • rpm
      • deb
      • tar
      • tgz
      • gz
    • Installation tools
      • RPM
      • Dpkg
      • APT
      • YUM
      • DNF
      • Zypper
    • Build tools
      • Commands
        • make
        • make install
        • ldd
      • Compilers
      • Shared libraries
      • Acquisition commands
        • wget
        • curl
  • images  2.2 Given a scenario, manage users and groups
    • Creation
      • useradd
      • groupadd
    • Modification
      • usermod
      • groupmod
      • passwd
      • chage
    • Deletion
      • userdel
      • groupdel
    • Queries
      • id
      • whoami
      • who
      • w
      • last
    • Quotas
      • User quota
      • Group quota
    • Profiles
      • Bash parameters
        • User entries
          • .bashrc
          • .bash_profile
          • .profile
      • Global entries
        • /etc/bashrc
        • /etc/profile.d/
        • /etc/skel
        • /etc/profile
      • Important files and file contents
        • /etc/passwd
        • /etc/group
        • /etc/shadow
  • images  2.3 Given a scenario, create, modify, and redirect files
    • Text editors
      • nano
      • vi
    • File readers
      • grep
      • cat
      • tail
      • head
      • less
      • more
    • Output redirection
      • <
      • >
      • |
      • <<
      • >>
      • 2>
      • &>
      • stdin
      • stdout
      • stderr
      • /dev/null
      • /dev/tty
      • xargs
      • tee
      • Here documents
    • Text processing
      • grep
      • tr
      • echo
      • sort
      • awk
      • sed
      • cut
      • printf
      • egrep
      • wc
      • paste
    • File and directory operations
      • touch
      • mv
      • cp
      • rm
      • scp
      • ls
      • rsync
      • mkdir
      • rmdir
      • ln
        • Symbolic (soft)
        • Hard
      • unlink
      • inodes
      • find
      • locate
      • grep
      • which
      • whereis
      • diff
      • updatedb
  • images  2.4 Given a scenario, manage services
    • Systemd management
      • Systemctl
        • Enabled
        • Disabled
        • Start
        • Stop
        • Mask
        • Restart
        • Status
        • Daemon-reload
      • Systemd-analyze blame
      • Unit files
        • Directory locations
        • Environment parameters
        • Targets
        • Hostnamectl
        • Automount
      • SysVinit
        • chkconfig
          • on
          • off
          • level
      • Runlevels
        • Definitions of 0–6
        • /etc/init.d
        • /etc/rc.d
        • /etc/rc.local
        • /etc/inittab
        • Commands:
          • runlevel
          • telinit
      • Service
        • Restart
        • Status
        • Stop
        • Start
        • Reload
    • images  2.5 Summarize and explain server roles.
      • NTP
      • SSH
      • Web
      • Certificate authority
      • Name server
      • DHCP
      • SNMP
      • File servers
      • Authentication server
      • Proxy
      • Logging
      • Containers
      • VPN
      • Monitoring
      • Database
      • Print server
      • Mail server
      • Load balancer
      • Clustering
  • images  2.6 Given a scenario, automate and schedule jobs
    • cron
    • at
    • crontab
    • fg
    • bg
    • &
    • kill
    • Ctrl+C
    • Ctrl+Z
    • nohup
  • images  2.7 Explain the use and operation of Linux devices
    • Types of devices
      • Client devices
      • Bluetooth
      • WiFi
      • USB
      • Monitors
      • GPIO
      • Network adapters
      • PCI
      • HBA
      • SATA
      • SCSI
      • Printers
      • Video
      • Audio
    • Monitoring and configuration tools
      • lsdev
      • lsusb
      • lspci
      • lsblk
      • dmesg
      • lpr
      • lpq
      • abrt
      • CUPS
      • udevadm
        • add
        • reload-rules
        • control
        • trigger
    • File locations
      • /proc
      • /sys
      • /dev
      • /dev/mapper
      • /etc/X11
    • Hot pluggable devices
      • /etc/rc5/udev
      • /etc/udev/rules.d
  • images  2.8 Compare and contrast Linux graphical user interfaces
    • Servers
      • Wayland
      • X11
    • GUI
      • Gnome
      • Unity
      • Cinnamon
      • MATE
      • KDE
    • Remote desktop
      • VNC
      • XRDP
      • NX
      • Spice
    • Console redirection
      • SSH port forwarding
        • Local
        • Remote
        • X11 forwarding
        • VNC
    • Accessibility
  1. Which command enables you to view the current IRQ assignments?

    1. view /proc/irq
    2. cat /proc/interrupts
    3. cat /dev/irq
    4. less /dev/irq
  2. Configuration of udev devices is done by working with files in which directory?

    1. /udev/devices
    2. /devices/
    3. /udev/config
    4. /etc/udev
  3. Which command is used to obtain a list of USB devices?

    1. usb-list
    2. lsusb
    3. ls-usb
    4. ls --usb
  4. During the initialization process for a Linux system using SysVinit, which runlevel corresponds to single user mode?

    1. Runlevel 5
    2. Runlevel SU
    3. Runlevel 1
    4. Runlevel 6
  5. On a system using SysVinit, in which directory are startup and shutdown scripts for services stored?

    1. /etc/init-d
    2. /etc/init
    3. /etc/sysV
    4. /etc/init.d
  6. Which command can be used to reboot a system?

    1. init 6
    2. shutdown -h -t now
    3. init 1
    4. refresh-system
  7. When working with a SysV system, which chkconfig option will display all services and their runlevels?

    1. ––reload
    2. ––list
    3. ––all
    4. ––ls
  8. A drive connected to USB will be considered to be which type of device?

    1. Medium
    2. Coldplug
    3. Hotplug
    4. Sideplug
  9. Which option within a systemd service file indicates the program to execute?

    1. StartProgram
    2. ShortCut
    3. ExecStart
    4. Startup
  10. What is the command to display the default target on a computer running systemd?

    1. systemctl defaults
    2. update-rc.d defaults
    3. systemctl runlevel
    4. systemctl get-default
  11. Which option of the systemctl command will change a service so that it runs on the next boot of the system?

    1. enable
    2. startonboot
    3. loadonboot
    4. start
  12. Which of the following best describes the /proc filesystem?

    1. /proc contains information about files to be processed.
    2. /proc contains configuration files for processes.
    3. /proc contains information on currently running processes, including the kernel.
    4. /proc contains variable data such as mail and web files.
  13. Which command is used to update the links and cache for shared libraries on the system?

    1. ldcache
    2. cache-update
    3. link-update
    4. ldconfig
  14. Which command and option are used to update a Debian system to the latest software?

    1. apt-update
    2. apt-get upgrade
    3. dpkg -U
    4. apt-cache clean
  15. Which option given to a yum command will install a given package?

    1. update
    2. configure
    3. install
    4. get
  16. When working with an rpm package file and using rpm2cpio, by default the output is sent to which location?

    1. STDOUT
    2. The file cpio.out
    3. The file a.out
    4. The file /tmp/cpi.out
  17. Which command is used to determine the libraries on which a given command depends?

    1. ldconfig
    2. librarylist
    3. listdeps
    4. ldd
  18. Which command will retrieve information about the USB connections on a computer in a tree-like format?

    1. lsusb -tree
    2. lsusb ––tree
    3. lsusb -t
    4. usblist ––tree
  19. How many SCSI devices are supported per bus?

    1. 7 to 15
    2. 2 to 4
    3. 12
    4. 4
  20. Which command and option can be used to determine whether a given service is currently loaded?

    1. systemctl ––ls
    2. telinit
    3. systemctl status
    4. sysctl -a
  21. Which command on a systemd-controlled system would place the system into single-user mode?

    1. systemctl one
    2. systemctl isolate rescue.target
    3. systemctl single-user
    4. systemctl runlevel one
  22. Which command would you use if you make changes to the /etc/inittab file and want those changes to be reloaded without a reboot?

    1. init-refresh
    2. init 6
    3. telinit
    4. reload-inittab
  23. Which command displays the current runlevel for a system?

    1. show-level
    2. init --level
    3. sudo init
    4. runlevel
  24. Within which folder are systemd unit configuration files stored?

    1. /etc/system.conf.d
    2. /lib/system.conf.d
    3. /lib/systemd/system
    4. /etc/sysconfd
  25. Which option best describes the following, gathered with the ls -la command?

    lrwxrwxrwx. 1 root root 35 Jul 8 2014 .fetchmailrc -> .configs/fetchmail/.fetchmailrc

    1. It is a file called .fetchmailrc that is linked using a symbolic link.
    2. It is a file called .configs/fetchmail/.fetchmailrc that is owned by lrwxrwxrwx.
    3. It is a directory called .fetchmailrc that is owned by user Jul.
    4. It is a local directory called .configs/fetchmail/.fetchmailrc.
  26. Which command is used with systemd in order to list the available service units?

    1. systemd list-units
    2. systemctl list-units
    3. systemd unit-list
    4. systemctl show-units
  27. Which option to lspci is used to display both numeric codes and device names?

    1. -numdev
    2. -n
    3. -nn
    4. -devnum
  28. Within which directory is information about USB devices stored?

    1. /etc/usbdevices
    2. /var/usb
    3. /lib/sys/usb
    4. /proc/bus/usb
  29. A Serial ATA (SATA) disk will use which of the following identifiers?

    1. /dev/hdX
    2. /dev/sataX
    3. /dev/sdX
    4. /disk/sataX
  30. When partitioning a disk for a mail server running Postfix, which partition/mounted directory should be the largest in order to allow for mail storage?

    1. /etc
    2. /usr/bin
    3. /mail
    4. /var
  31. Which yum option displays the dependencies for the package specified?

    1. list
    2. deplist
    3. dependencies
    4. listdeps
  32. Which options for the rpm command will display verbose output for an installation along with progress of the installation?

    1. -ivh
    2. -wvh
    3. ––avh
    4. ––ins-verbose
  33. Which command will search for a package named zsh on a Debian system?

    1. apt-cache search zsh
    2. apt-get search zsh
    3. apt-cache locate zsh
    4. apt search zsh
  34. Within which directory will you find the repositories used by yum?

    1. /etc/yum.conf
    2. /etc/repos
    3. /etc/yum.conf.d
    4. /etc/yum.repos.d
  35. Which rpm option can be used to verify that no files have been altered since installation?

    1. -V
    2. -v
    3. ––verbose
    4. ––filesum
  36. Which of the following is not typically used to store shared libraries?

    1. /lib
    2. /etc/lib
    3. /usr/lib
    4. /usr/local/lib
  37. Which of the following commands updates the package cache for a Debian system?

    1. apt-get cache-update
    2. apt-cache update
    3. apt-get update
    4. apt-get upgrade
  38. You need to update the configuration files for package repositories. Within which file are details of the current package repositories stored on a Debian system?

    1. /etc/apt.list
    2. /etc/sources.list
    3. /etc/apt/sources.list
    4. /etc/apt.d/sources.list
  39. Which command should be used to make changes to the choices made when a Debian package was installed?

    1. dpkg-reconfigure
    2. dpkg -r
    3. dpkg ––reconf
    4. apt-get reinstall
  40. Which option for yum performs a search of the package cache?

    1. seek
    2. query
    3. ––search
    4. search
  41. Which command option for rpm can be used to show the version of the kernel?

    1. rpm kernel
    2. rpm -q kernel
    3. rpm search kernel
    4. rpm ––list kern
  42. Which option in /etc/yum.conf is used to ensure that the kernel is not updated when the system is updated?

    1. exclude=kernel*
    2. exclude-kernel
    3. updatekernel=false
    4. include-except=kernel
  43. Which command searches for and provides information on a given package on a Debian system, including whether the package is currently installed?

    1. dpkg -i
    2. dpkg -s
    3. apt-cache
    4. apt-info
  44. Which of the following installs a previously downloaded Debian package?

    1. dpkg -i <package name>
    2. apt-install <package name>
    3. apt-slash <package name>
    4. dpkg -U <package name>
  45. You need to download source code for a package to install. The package has a .tgz file extension. Which of the following commands decompresses and unarchives the package?

    1. tar -xvf
    2. tar -zcvpf
    3. tar -zxvf
    4. tar -xf
  46. You need to obtain information about a package installed on an OpenSUSE system that uses the zypper command. Which of the following options to the zypper command displays information about the package?

    1. inf
    2. getInfo
    3. info
    4. i
  47. You need to find available packages on a Fedora system managed by the dnf package system. Which option to the dnf command looks for a given package?

    1. search
    2. info
    3. find
    4. locate
  48. When using sed for a substitution operation, which option must be included so that the substitution applies to the entire line rather than just the first instance?

    1. g
    2. a
    3. r
    4. y
  49. Which option for the wc command prints the number of lines given as input?

    1. -f
    2. -a
    3. -l
    4. -o
  50. What is the default number of lines printed by the head and tail commands, respectively?

    1. 10 for head, 5 for tail
    2. 5 for head, 10 for tail
    3. 10 for both head and tail
    4. 3 for both head and tail
  51. You are attempting to use rmdir to remove a directory, but there are still multiple files and other directories contained within it. Assuming that you’re sure you want to remove the directory and all of its contents, what are the command and arguments to remove the directory and all of its contents?

    1. rm -f
    2. rm -rf
    3. rmdir -a
    4. rmdir -m
  52. Which command will find directories with names beginning with 2019 located beneath the current directory?

    1. find ./ -name "2019"
    2. find ./ -type d -name "2019"
    3. find / -type d "2019"
    4. find ./ -type d -name "2019*"
  53. Which of the following commands will provide the usernames in a sorted list gathered from the /etc/passwd file?

    1. cat /etc/passwd | awk -F : ’{print $1}’ | sort
    2. sort /etc/passwd | cut
    3. echo /etc/passwd
    4. cat /etc/passwd | awk ’{print $1}’ | sort
  54. Which options to ls will produce output, including hidden (dot) files, in a list that is ordered such that the newest files are at the end of the output?

    1. -la
    2. -lat
    3. -latr
    4. -ltr
  55. What will be the result if the touch command is executed on a file that already exists?

    1. The access timestamp of the file will change to the current time when the touch command was executed.
    2. The file will be overwritten.
    3. There will be no change.
    4. The file will be appended to.
  56. Which option to both mv and cp will cause the command to prompt before overwriting files that already exist?

    1. -f
    2. -Z
    3. -r
    4. -i
  57. Which of the following commands will send the contents of /etc/passwd to both STDOUT and a file called passwordfile?

    1. cat /etc/passwd > passwordfile
    2. var /etc/passwd | passwordfile
    3. cat /etc/passwd | tee passwordfile
    4. echo /etc/passwd | stdout > passwordfile
  58. The current hierarchy on the server contains a directory called /usr/local. You need to create an additional directory below that called /usr/local/test/october. Which command will accomplish this task?

    1. mkdir -p /usr/local/test/october
    2. mkdir /usr/local/test/october
    3. mkdir -r /usr/local/test/october
    4. mkdir -f /usr/local/test/october
  59. Which option to the cp command will copy directories in a recursive manner?

    1. -v
    2. -R
    3. -Z
    4. -i
  60. What is the default delimiter used by the cut command?

    1. Colon
    2. Tab
    3. Space
    4. Comma
  61. What command is used to bring a command to foreground processing after it has been backgrounded with an &?

    1. bg
    2. fore
    3. 4g
    4. fg
  62. You are using the Vi editor to change a file, and you need to exit. You receive a notice indicating “No write since last change.” Assuming you want to save your work, which of the following commands will save your work and exit Vi?

    1. :wq
    2. :q!
    3. dd
    4. x
  63. What option is used to change the number of lines of output for the head and tail commands?

    1. -l
    2. -f
    3. -g
    4. -n
  64. You have attempted to stop a process using its service command and also using the kill command. Which signal can be sent to the process using the kill command in order to force the process to end?

    1. -15
    2. -f
    3. -9
    4. -stop
  65. When working in the bash shell, you need to redirect both STDOUT and STDERR. Which of the following commands will redirect both STDOUT and STDERR?

    1. 1>2
    2. >2
    3. 2>&1
    4. >>
  66. Which of the following egrep commands will examine /etc/passwd to find users that are using either /bin/bash or /usr/bin/zsh for their shell environment?

    1. grep sh /etc/passwd
    2. egrep ’/*/.sh$’ /etc/passwd
    3. grep ’/*/.=sh$’ /etc/passwd
    4. egrep ’/*/..?sh$’ /etc/passwd
  67. When editing with Vi, which command changes into insert mode and opens a new line below the current cursor location?

    1. f
    2. a
    3. o
    4. i
  68. Which kill signal can be sent in order to restart a process?

    1. -HUP
    2. -RESTART
    3. -9
    4. -SIG
  69. Which of the following commands searches each user’s .bash_history file to determine if the user has invoked the sudo command?

    1. find /home -name "bash_history" | grep sudo
    2. find /home -name ".bash_history" | xargs grep sudo
    3. find /home/.bash_history | xargs grep sudo
    4. find /home -type history | xargs grep sudo
  70. Which find command will locate files within the current directory that have been modified within the last 24 hours?

    1. find ./ -type f -mtime 1
    2. find ./ -type f -mtime 24
    3. find ./ -type f -mtime +1
    4. find ./ type -f time 24
  71. Which command will move all files with a .txt extension to the /tmp directory?

    1. mv txt* tmp
    2. move *txt /temp
    3. mv *.txt /tmp
    4. mv *.txt tmp
  72. Assume that you have a file called zips.txt that contains several postal zip codes, and you need to determine how many unique zip codes there are in the file. Which of the following commands can be used for that purpose?

    1. sort zips.txt | uniq -c
    2. uniq zips.txt
    3. count zips.txt
    4. cat zips.txt | uniq -c
  73. You’re working with a file using the less command and need to search for instances of a string earlier in the file. Which key will search backward in the file?

    1. /
    2. H
    3. ?
    4. C
  74. Which command can be used to determine the location of a given executable that would be run if typed from your current environment and location?

    1. which
    2. what
    3. whatis
    4. when
  75. Another administrator made a change to one of the local scripts stored in /usr/local/bin and used for administrative purposes. The change was also immediately reflected in the copy of the script in your home directory. However, when you examine the file with ls, it appears to be a normal file. What is the likely cause of such a scenario?

    1. The file was executed after edit.
    2. The administrator copied the file to yours.
    3. Your file is a hard link to the original.
    4. The file has been restored from backup.
  76. Which command can be used to print the inode index number of files?

    1. in -l
    2. ln -i
    3. ls -i
    4. inodelist
  77. Which option to ln creates a symlink to another file?

    1. -sl
    2. -s
    3. -l
    4. --ln
  78. Which of the following commands can be used if you need to locate various elements of a given command, such as its binaries and man pages?

    1. whatis
    2. find
    3. whereis
    4. ls
  79. Which command is used to execute a check of user quotas on the filesystem?

    1. quota -u
    2. runquota -u
    3. qcheck -u
    4. quotacheck -u
  80. When using ls -la to obtain a directory listing, you see an object with permissions of lrwxrwxrwx. What type of object is this?

    1. It is a directory.
    2. It is a symlink.
    3. It is a temporary file.
    4. It is a local file.
  81. Which command and option will output a summary of quota usage across all filesystems that are currently read-write with quotas enabled?

    1. repq -a
    2. repquota -a
    3. quotarun -a
    4. quota -u
  82. The locate command is reporting out-of-date information. Which command should be run in order to have the locate command update its database?

    1. locatedb -u
    2. locate -u
    3. updatedb
    4. updatelocate
  83. You need to enable the web server (running as the www-data user and group) to write into a directory called /home/webfiles. Which commands will accomplish this task in the most secure manner?

    1. chgrp www-data /home/webfiles ; chmod 775 /home/webfiles
    2. chmod 777 /home/webfiles
    3. chgrp www-data /home/webfiles ; chmod 711 /home/webfiles
    4. chmod 707 /home/webfiles
  84. Which option to the find command will search for files by their inode number?

    1. -inode
    2. -type
    3. -in
    4. -inum
  85. What is the order in which user configuration files are located on login to a bash shell?

    1. .bash_login, .profile, /etc/profile
    2. .bash_profile, .bash_login, .profile
    3. .profile, .bash_login, .bash_profile
    4. .bash_login, .bash_profile, .profile
  86. Within which directory should you place files to have them automatically copied to a user’s home directory when the user is created?

    1. /etc/userhome
    2. /etc/templateuser
    3. /etc/skel
    4. /home/skel
  87. Which bash parameter or option will cause the shell to be executed without reading the initialization files?

    1. --no-rc
    2. --no-init
    3. --norc
    4. --rc-none
  88. You need to create a function that will be available each time that you log in to the system. Within which file should this function be placed?

    1. .bash_profile
    2. .rc
    3. /etc/profile
    4. .bash_run
  89. Which section in /etc/X11/xorg.conf is used to describe configurations for a given graphics card and monitor pair?

    1. Server
    2. Screen
    3. VidMode
    4. Video
  90. Assuming X forwarding has been enabled on the SSH server, which environment variable is used to set the location for newly spawned windows from within an SSH session?

    1. DISPLAY
    2. XTERMINAL
    3. XTERM
    4. XDISP
  91. Within the greeter section of a display manager such as GDM in Gnome, which option sets the welcome message for users logging in locally?

    1. LoginMessage
    2. Login
    3. WinGreet
    4. Welcome
  92. Within Gnome, you need to add the accessibility option known as sticky keys. Which key should be pressed five times in a row to enable sticky keys?

    1. Ctrl
    2. Enter
    3. Shift
    4. Tab
  93. Which program is used in a Gnome environment as a screen reader?

    1. Orca
    2. Screed
    3. Screen
    4. Reader
  94. When using KDE, which program provides magnification functionality?

    1. xmag
    2. mag
    3. pmag
    4. kmag
  95. Which of the following options in the SSH configuration file needs to be enabled so that X sessions can be sent over an SSH connection?

    1. X11Connect yes
    2. X11Forwarding yes
    3. ForwardX yes
    4. XForward yes
  96. Which file contains user information such as username and real name and is readable by all users of the system?

    1. /etc/pass
    2. /etc/shadow
    3. /etc/passwd
    4. /etc/userinfo
  97. Which of the following will execute a job through cron at 12:15 a.m. and 12:15 p.m. every day?

    1. 0,12 15 * * *
    2. 15 0,12 * * *
    3. 15 * * * 0/12
    4. */12 * * * 15
  98. Which file is used to provide a list of users that can add and delete cron jobs?

    1. /etc/cron.job
    2. /etc/cron.allow
    3. /etc/cron.users
    4. /etc/crontab
  99. Which of the following commands schedules a series of commands to execute one hour from now?

    1. atq +1hr
    2. at now + 1 hour
    3. atq
    4. at -1
  100. You need to delete a user from the system, including their home directory. Which of the following commands accomplishes this task?

    1. userdel
    2. userdel -r
    3. userdel -R
    4. deluser
  101. Which of the following commands changes a group called DomainAdmins to DomainUsers?

    1. groupmod -n DomainAdmins DomainUsers
    2. groupchg DomainAdmins DomainUsers
    3. chgroup DomainAdmins DomainUsers
    4. group -N DomainAdmins DomainUsers
  102. Within which directory would you find a list of files corresponding to the users who have current cron jobs on the system?

    1. /var/spool/cron/crontabs
    2. /var/spool/jobs
    3. /etc/cron
    4. /etc/cron.users
  103. Which command deletes an at job with an ID of 3?

    1. atq
    2. at -l
    3. atrm 3
    4. rmat 3
  104. Which of the following is used as a system-wide cron file?

    1. /etc/cron.d
    2. /etc/cron.sys
    3. /etc/crontab
    4. /etc/cron.tab
  105. Within which directory will you find scripts that are scheduled to run through cron every 24 hours?

    1. /etc/cron.daily
    2. /etc/cron.weekly
    3. /etc/cron.hourly24
    4. /etc/crontab
  106. When running useradd, which option needs to be specified in order for the user’s home directory to be created?

    1. -h
    2. -m
    3. -x
    4. -a
  107. Which of the following commands locks out password-based login for a user but does not prevent other forms of login?

    1. usermod -L
    2. userdel -r
    3. useradd -h
    4. userlock
  108. Which of the following will run a command called /usr/local/bin/changehome.sh as the www-data user when placed in /etc/crontab?

    1. 1 1 * * * www-data /usr/local/bin/changehome.sh
    2. www-data changehome.sh
    3. */1 www-data changehome.sh
    4. * * */www-data /usr/local/bin/changehome.sh
  109. Which of the following commands produces a report listing the last password change date for all users on the system?

    1. passwd -a
    2. passwd -S
    3. passwd -a -S
    4. passwd --all
  110. Which file contains a list of usernames, UIDs, and encrypted passwords?

    1. /etc/passwd
    2. /etc/shadow
    3. /etc/encpass
    4. /etc/grouppass
  111. When configuring an authentication server, which of the following best describes the relationship between UIDs and GIDs on a Linux system?

    1. The UID and GID are the same across the system for a given user.
    2. Each user has a UID and GID that are the same and are created when the user is created.
    3. The UID represents the user, while the GID is a globally unique user id.
    4. There is no direct relationship between UID and GID.
  112. Which command is used to change a user’s home directory to /srv/data/username and move the contents at the same time?

    1. usermod -d /srv/data/username -m
    2. homedir -m /srv/data/username
    3. userex -m /srv/data/username
    4. userchg /m /srv/data/username -d
  113. Which option to useradd will add groups for a user?

    1. -g
    2. -x
    3. -l
    4. -G
  114. Assume that passwords must be changed every 60 days. Which command will change the date of the user’s last password change without the user actually changing the account password?

    1. chage -f
    2. chage -W
    3. chage -l
    4. chage -d
  115. Which command will list the cron entries for a given user as denoted by <username>?

    1. crontab -l -u <username>
    2. crontab -u <username>
    3. cron -u <username>
    4. cronent -u <username>
  116. Which option to useradd creates a system user rather than a normal user?

    1. -r
    2. -s
    3. -a
    4. -S
  117. Which file contains encrypted password information for groups?

    1. /etc/group
    2. /etc/gshadow
    3. /etc/gsecure
    4. /etc/group.conf
  118. Which of the following best describes the use of the groupdel command?

    1. You may force group deletion with the -f option.
    2. If a user’s primary group is to be deleted, that user must be deleted first or have their primary group changed.
    3. Groupdel can be run at any time, regardless of group membership.
    4. The -r option for groupdel will recursively change users’ GIDs after group deletion.
  119. Which of the following commands displays the UID, primary group, and supplemental groups for a given user?

    1. id
    2. getid
    3. passwd
    4. chage
  120. Which option to the usermod command is used to change a given user’s real name?

    1. -R
    2. -n
    3. -d
    4. -c
  121. Assume that you have deleted a user account with UID 1501, including the -r option. Which command should you also run to look for other files that might have been owned by the user?

    1. find -id 1501
    2. grep 1501 *
    3. grep -u 1501 *
    4. find / -uid 1501
  122. When configuring a local NTP server role, to what server address can you set the server’s NTP client?

    1. 127.0.0.1
    2. 192.168.1.100
    3. ntp.example.com
    4. pool.ntp.org
  123. When configuring a server for a mail server role, which command must you run after making a change to email aliases, assuming the server is running Postfix?

    1. service postfix restart
    2. newaliases
    3. alias -n
    4. postfix -e
  124. Within which directory hierarchy will you find configuration files related to printing with the CUPS printing system on a print server?

    1. /etc/cupsd
    2. /etc/cups.d
    3. /etc/CUPS
    4. /etc/cups
  125. Within which directory will you find the mail queue on a Qmail server?

    1. /var/spool/qmail
    2. /var/qmail/queue
    3. /var/spool/mailq
    4. /var/spool/qmail/queue
  126. You are creating a logging server. Which syslog level is used to provide informational messages?

    1. kern
    2. emerg
    3. debug
    4. info
  127. When running the NTP daemon, which command can you execute to work with the NTP server in an interactive mode?

    1. ntpd
    2. ntpdate
    3. ntpq
    4. ntp-interactive
  128. Which of the following commands places a file into the print queue?

    1. lpr
    2. lpd
    3. lpq
    4. lpx
  129. What is the default port for the CUPS administrative web interface?

    1. tcp/53
    2. tcp/8080
    3. udp/456
    4. tcp/631
  130. Which of the following URLs can be used to view a list of completed print jobs in CUPS?

    1. http://localhost:631/jobs?which_jobs=completed
    2. http://localhost:631?completed
    3. http://localhost:631/?completed
    4. http://cups/jobs=completed
  131. Which of the following commands causes the mail queue to be processed on a Postfix server?

    1. postqueue -f
    2. postqueue -D
    3. postfix -q
    4. postsuper -q
  132. A developer has created an application and wants to take advantage of syslog for logging to a custom log file. Which facility should be used for an application such as this?

    1. syslog
    2. kern
    3. local#
    4. user
  133. A user needs to work with printers and printer-related items. Which of the following commands adds the user (called username in the options) to the appropriate group for this purpose?

    1. usermod -aG printerusers username
    2. usermod -aG lpadmin username
    3. usermod -gA lpadm username
    4. usermod -a lpadm username
  134. Which command can be used to gather and display statistics about mail processed on a server running sendmail?

    1. mailq
    2. mailstats
    3. statmail
    4. sendmailstats
  135. Which of the following commands can be used to restart CUPS on a server running systemd?

    1. systemctl restart cups.service
    2. systemctl restart cups
    3. systemctl reboot cups.target
    4. systemctl restart cups.target
  136. When configuring a server for an SNMP server role, which ports need to be allowed through the firewall for SNMP traffic?

    1. Ports 23 and 25
    2. Ports 110 and 143
    3. Ports 80 and 443
    4. Ports 161 and 162
  137. You need to look at information on logins beyond what was captured by the current log file for the last command. Which option to the last command can be used to load information from an alternate file?

    1. -a
    2. -t
    3. -e
    4. -f
  138. You need to examine who is currently logged in to the system. Which of the following commands will display this information?

    1. listuser
    2. fuser
    3. ls -u
    4. w
  139. When expiring a user account with usermod -e, which of the following represents the correct date format?

    1. YYYY-MM-DD
    2. MM/DD/YYYY
    3. DD/MM/YY
    4. MM/DD/YY HH:MM:SS
  140. Which of the following commands can be used to stop a given service, such as httpd .service, from starting on boot with a systemd-based system?

    1. systemctl disable httpdservice
    2. systemctl stop httpd.service
    3. systemd disable httpd.service
    4. systemd enable httpd.service boot=no
  141. Within the following entry in /etc/shadow, to what does the number 15853 refer? mail:*:15853:0:99999:7:::

    1. The UID of the mail user
    2. The number of files owned by mail
    3. The date of the last password change (since 1/1/1970)
    4. The number of days until the account expires
  142. You need to deploy a monitoring solution that enables alerts along with advanced scripted responses based on configurable performance conditions. Which of the following software packages performs these tasks?

    1. MySQL
    2. ntop
    3. mrtg
    4. nagios
  143. You are upgrading the kernel that has been previously compiled on the same server. Which of the following commands incorporates the contents of the existing kernel configuration into the new kernel?

    1. config --merge
    2. make oldconfig
    3. merge config
    4. int configs
  144. Which of the following commands is used to view kernel-related udev events in real-time?

    1. udevls all
    2. lsudev -f
    3. udevmon -a
    4. udevadm monitor
  145. Which of the following commands should you execute after making changes to systemd service configurations in order for those changes to take effect?

    1. systemd reload
    2. reboot
    3. systemctl daemon-reload
    4. systemctl reboot
  146. Which of the following files contains the runlevels for the system along with a reference to the corresponding rc file?

    1. /etc/runlevels
    2. /etc/inittab
    3. /etc/rc
    4. /etc/runlevel
  147. Within which hierarchy are files from /etc/init.d linked so that the files are executed during the various runlevels of a SysV system?

    1. /etc/rc.S
    2. /etc/rc
    3. /etc/boot/rc
    4. /etc/rc.d
  148. As a systems administrator, you need to change options for automount. Which of the following files is the default configuration file for the autofs automounter?

    1. /etc/autofs
    2. /etc/auto.master
    3. /etc/autofs.conf
    4. /etc/automounter.conf
  149. You have purchased new SSD hardware that uses the NVMe protocol, but you cannot find the disks in the normal /dev/sd* location where you have traditionally found such storage. In which location should you look for these drives?

    1. /dev/nd*
    2. /dev/nvme*
    3. /dev/nv*
    4. /dev/nvme/*
  150. Which of the following directory hierarchies contains information such as the WWN for Fibre Channel?

    1. /sys/class/wwn
    2. /sys/class/fc_host
    3. /sys/class/fclist
    4. /sys/class/fc/wwn
  151. Information about logical volumes can be found in which of the following directories?

    1. /dev/lvinfo
    2. /dev/map
    3. /dev/mapper
    4. /dev/lvmap
  152. When configuring WiFi, which of the following commands displays information such as link status about the wireless device wlan0?

    1. iw dev wlan0 link
    2. wlan0 list
    3. iw wlan0 -l
    4. iw dev link
  153. You are configuring a DHCP server. Which of the following commands will examine the system log for information regarding DHCP activity?

    1. grep -i dhcp /var/log/syslog
    2. grep -v dhcp /var/log/syslog
    3. grep -vi dhcp /var/log/kern.log
    4. dmesg | grep dhcp
  154. Which option to dmesg clears the contents of the kernel ring buffer after they have been read once?

    1. -C
    2. -c
    3. -a
    4. -e
  155. Which option to the rsync command provides archive mode?

    1. -r
    2. -o
    3. -a
    4. -f
  156. When compiling software such as with the gcc compiler, which of the following is the recommended name for a file containing commands and relationships used with the make command?

    1. Makefile
    2. makefile
    3. make.file
    4. Makefile.txt
  157. You have downloaded a source file with the extension .gz. Which of the following commands will uncompress the file?

    1. unzip
    2. gunzip
    3. dezip
    4. uncomp
  158. Which target for make, typically included in the makefile for most projects, will place compiled files into their final destination and perform other operations such as making the appropriate files executable?

    1. list
    2. distclean
    3. run
    4. install
  159. When creating a local package repository, which option within the .repo file in /etc/yum.repos.d/ is used to set the URL for the repository?

    1. url
    2. repourl
    3. httpurl
    4. baseurl
  160. When running the lsblk command, there is no separate partition listed for /boot. From which partition is the system likely booted?

    1. There is a /boot directory under the / partition.
    2. The /boot partition is hidden.
    3. The system has not yet built the /boot partition.
    4. The /boot partition does not show up with lsblk.
  161. Which command can be used to search the contents of all files below your current location for files that contain the characters DB?

    1. grep -r "DB" *
    2. grep -ri "DB" *
    3. cat * | less
    4. cat *.txt | grep DB
  162. You are working with a file server, and clients are reporting that the filesystems shared over NFS have become unreachable. Which option should be passed to umount in order to force the unmounting of the filesystem on the clients?

    1. -nfs
    2. --fake
    3. -f
    4. -n
  163. Which character combination sets the body of the message to STDIN when using the mail command?

    1. <
    2. >
    3. <<<
    4. |
  164. Which of the following commands displays a listing of who is logged in to the server along with the date and time that they logged in?

    1. whois
    2. who
    3. loggedin
    4. curusers
  165. Which configuration file is used as the default configuration for a BIND server?

    1. named.conf
    2. named.cfg
    3. bind.cfg
    4. bind.conf
  166. When creating a certificate authority server role, which of the following commands generates a private key for use with SSL and places it into the file /etc/ssl/example .com.private?

    1. openssl genrsa -out /etc/ssl/example.com.private
    2. openssl generate-private > /etc/ssl/example.com.private
    3. openssl genpriv > /etc/ssl/example.com.private
    4. openssh genkey -out /etc/ssl/example.com.private
  167. When creating a Squid proxy configuration, you need to create an access control list for the local network. Which configuration option creates an access control list for Squid?

    1. accesscontrol
    2. acl
    3. access-control
    4. access-control-list
  168. Which directive in a Squid configuration configures whether a given ACL can use the proxy?

    1. access_allow
    2. http_access
    3. proxy_access
    4. enable_access
  169. Which of the Samba daemons is responsible for responding to NetBIOS name service requests?

    1. smbd
    2. nmbd
    3. winbindd
    4. samba
  170. Which of the following options within an OpenSSH server configuration is used to determine whether the root user can log in directly with an SSH client?

    1. PermitRootLogin
    2. AllowRoot
    3. RootLogin
    4. PermitDirectRootLogin
  171. Which option within an OpenVPN configuration lets a client know that it can reach the network 192.168.5.0/24?

    1. client-route 192.168.5.0
    2. push "route 192.168.5.0 255.255.255.0"
    3. send "route 192.168.5.0/24"
    4. client-route "192.168.5.0/24"
  172. What is the name of the environment variable that is set if your display session is using Wayland?

    1. WAYLAND_DISPLAY
    2. WAYLANDORG
    3. WAYLAND_SESSION
    4. WAYLAND_DISP
  173. Which command can be used to view device information such as interrupts?

    1. lsint
    2. ls -interrupts
    3. lsdev
    4. ls-int
  174. When working with the udevadm command, you need to reload rules in order to add a new client device. Which option can be used to effect this change?

    1. udevadm control -R
    2. udevadm --stop
    3. udevadm -stop-queue
    4. udevadm -R
  175. You will be deploying a large server solution with Linux as the base operating system. The server resources will be split into multiple, smaller virtual servers running Linux and Windows. Which of the following best describes the name for this type of server role and technology?

    1. Systemization
    2. MultiSys
    3. Containers
    4. UserDev
  176. You need to restart an Apache server running on an older, non-systemd distribution of Linux. Which of the following commands can be used to restart the Apache server, assuming that it has a name of apache2?

    1. apache2.service restart
    2. restart-daemon apache2
    3. service apache2 restart
    4. service restart apache2
  177. When using the NX or NoMachine display for access, which configuration option sets the display port?

    1. DisplayPort
    2. DisplayBase
    3. ListenPort
    4. ListenXPort
  178. When choosing a login type, which of the following best describes the difference between the options titled Cinnamon and Cinnamon (Software Rendering)?

    1. The option described as Software Rendering is used for graphics production environments.
    2. The option described as Software Rendering uses 3D acceleration.
    3. The option described as Software Rendering is used to enhance the video driver.
    4. The option described as Software Rendering disables 3D acceleration.
  179. When using a Raspberry Pi with Raspbmc Linux, you need to configure the system to turn on an LED. Which of the following is the interface typically used for this purpose?

    1. USB
    2. HBA
    3. GPIO
    4. SNP
  180. Which of the following commands can be used to troubleshoot boot times of various services?

    1. time
    2. bootmsg
    3. systemd-boot
    4. systemd-analyze blame
  181. You are troubleshooting an issue with HAProxy as a load balancer. Users are reporting that they have received a “400” response from the HAProxy server. What does a “400” response mean?

    1. The request was invalid or too large.
    2. The request was unauthorized.
    3. The request timed out.
    4. There is an out of memory condition.
  182. In the MATE desktop environment, which of the following is the name of the file manager?

    1. Naut
    2. caja
    3. fm
    4. fileexp
  183. Which option to SSH creates a port forwarding to which remote clients can also connect?

    1. -L
    2. -R
    3. -P
    4. -E
  184. Which option to the wget command logs output?

    1. -r
    2. -o
    3. -b
    4. -k
  185. When executed on a systemd-enabled server, the service status command is equivalent to which command?

    1. systemd status
    2. journald status
    3. service-systemd status
    4. systemctl status
  186. You need to compare two files to determine if there are differences between them. Which command can be used for this purpose?

    1. dcat
    2. tar
    3. diff
    4. dtool
  187. Which directive within an Apache configuration file facilitates serving websites for more than one domain using a single IP address?

    1. <VirtualServer>
    2. <VirtualHost>
    3. <VirtContainer>
    4. <Virtualization>
  188. Which subcommand of openssl is used to create a Certificate Signing Request (CSR)?

    1. req
    2. csr
    3. gencsr
    4. newcsr
  189. Which signal to the kill command can be used to signal that BIND should reload, including its configuration?

    1. -15
    2. -1
    3. -9
    4. -2
  190. You are troubleshooting a daemon process and have started the daemon manually from the command line so that it does not fork into the background. Which key combination can be used to terminate the daemon?

    1. Ctrl+A
    2. Ctrl+B
    3. Ctrl+C
    4. Ctrl+D
  191. You need to redirect output to a file, but rather than overwriting the existing file, the output should be appended instead. Which character combination is used to indicate that STDOUT should be appended?

    1. <>
    2. a>
    3. >a
    4. >>
  192. Which service command is used to shut down a service?

    1. shutdown
    2. stop
    3. norun
    4. runstop
  193. Which port is the default base port for use with VNC?

    1. 59
    2. 59000
    3. 5900
    4. 590
  194. Which of the following directories is used with the automatic bug-reporting tool in CentOS 7?

    1. /var/spool/abrt
    2. /var/spool/autobug
    3. /var/tmp/abrt
    4. /var/tmp/autobug
  195. Which of the following commands is used with udevadm to replay events?

    1. replay
    2. trigger
    3. play
    4. evplay
  196. Which command with hostnamectl can be used to set the type of machine on which it is running?

    1. set-machine
    2. machine-type
    3. set-type
    4. set-chassis
  197. As a system administrator, you have a custom service that needs to execute on boot. However, the service does not have the traditional service-management script. Within which file could you place the command so that it is executed on boot?

    1. /etc/rcd
    2. /etc/custom.service
    3. /etc/rc.local
    4. /etc/rc.d/rc.service
  198. Which of the following commands is used to control a BIND name server?

    1. bind-config
    2. named-config
    3. rndc
    4. rdmc
  199. You are tasked with configuring a cluster server role using Red Hat Enterprise Linux. Which of the following filesystems will most likely be used?

    1. ext2
    2. GFS
    3. CIFS
    4. FAT
  200. Within which stanza would you add a video device when configuring Spice remote access?

    1. <display>
    2. <video>
    3. <videoDisplay>
    4. display=
  201. You need to redirect STDIN until a certain character combination is encountered. Which of the following operators can be used for this purpose?

    1. >STDIN
    2. <<
    3. <&
    4. >
  202. Which option to chkconfig enables you to set the runlevels for a given service?

    1. --level
    2. --runlevel
    3. -l
    4. -rl
  203. Which option to the curl command sets the local filename to which the output will be saved?

    1. -f
    2. -o
    3. -O
    4. -l
  204. Which of the following commands adds a group?

    1. groupadd
    2. addgrp
    3. grpadd
    4. creategroup
  205. Which command enables you to determine the username associated with your current user ID?

    1. uid
    2. myid
    3. whoami
    4. w
  206. Within which directory should scripts and other files to run at login be stored?

    1. /etc/login
    2. /etc/profile
    3. /etc/bash.defs
    4. /etc/profile.d
  207. The Unity desktop is typically found on which distribution of Linux?

    1. Ubuntu
    2. Red Hat
    3. Slackware
    4. SuSE
  208. Startup commands that are executed on boot for udev can be found in which directory on a Debian system?

    1. /etc/udev
    2. /etc/rcS.d
    3. /etc/rc5.d
    4. /etc/rc5/udev
  209. You are attempting to stop a daemon on a system that previously used SysVinit but now uses systemd. Which is the correct command and order used to stop a service on this system?

    1. systemctl <service> stop
    2. systemctl stop <service>
    3. systemd stop <service>
    4. systemd <service> stop
  210. When configuring a monitor for use with X11, within which section should details of the monitor be changed?

    1. Video
    2. Display
    3. Monitor
    4. Disp
  211. You need to redirect output for a long-running process but do not need to see or capture the output. To which location can you redirect output so that it does not consume disk space?

    1. A regular file
    2. /dev/null
    3. /dev/random
    4. A network interface
  212. Which option to the paste command is used to set the delimiter?

    1. -f
    2. -d
    3. -o
    4. -m
  213. Which target for the service command will cause a daemon to re-read its configuration files without restarting the daemon itself?

    1. read
    2. load
    3. start
    4. reload
  214. When configuring environment parameters for use with systemd, what is the name of the key used to create the variables?

    1. ENV
    2. Environment
    3. Envvar
    4. ENVPARAM
  215. Which operator is used to redirect STDIN, such as when redirecting input from a file?

    1. >
    2. <
    3. ^
    4. *
  216. While configuring a network adapter with udev so that it has a specific and consistent name, you edit the udev rules file. Which option within the rules file ensures that the device will always have a name of eth0?

    1. ATTR-NAME="eth0"
    2. NAME="eth0"
    3. DEV_NAME="eth0"
    4. NAME_DEV="eth0"
  217. Within which directory would you typically find the Xorg configuration file xorg.conf?

    1. /etc/xorg
    2. /etc/x
    3. /etc/Xorg
    4. /etc/X11
  218. Which command is used to view the mixer volumes when configuring audio with ALSA?

    1. alsaconfig
    2. alsacfg
    3. alsamixer
    4. amix
  219. Which package provides an open source implementation of the Remote Desktop Protocol?

    1. ordp
    2. xrdp
    3. tdpx
    4. xr
  220. You are configuring a database service and need to open the default port for MySQL. Which port is the default for MySQL?

    1. 6592
    2. 25
    3. 389
    4. 3306
  221. You need to determine which video card is installed in a Linux system. Which command can be used to help with this purpose?

    1. dmesg | grep -i vga
    2. vgadetect
    3. lsvid
    4. lsvga
  222. You have executed a daemon process manually from the command line and now need to suspend the process. Which key combination can be used for this purpose?

    1. Ctrl+S
    2. Ctrl+C
    3. Ctrl+Z
    4. Ctrl+B
  223. When configuring Apache for a web server role, which of the following directives tells the server the location of the SSL private key?

    1. SSLKeyFile
    2. SSLCertificatePrivateKey
    3. SSLCertificateKeyFile
    4. SSLPrivateKey
  224. Which command is used for setting parameters such as the essid, channel, and other related options for a wireless device?

    1. ifconfig
    2. iwconfig
    3. wlancfg
    4. iconf
  225. Which command can be used to convert lowercase letters to uppercase letters across an entire file?

    1. du
    2. touc
    3. conv
    4. tr
  226. You have been asked to recommend a simple command-line-based text editor for a beginning user. Which of the following should you recommend?

    1. Vi
    2. Nano
    3. nc
    4. ShellRedirect
  227. You need to ensure that a service does not start on a systemd system. Which systemctl command should be used for this purpose?

    1. disable
    2. delete
    3. mask
    4. norun
  228. Which of the following commands is a simple pager that is found on most Linux systems?

    1. more
    2. pg
    3. grep
    4. mr
  229. Which of the following is an operator for redirecting STDOUT and STDERR?

    1. &>
    2. >
    3. ~
    4. !
  230. Which device is used as the terminal for the current process?

    1. /dev/termcur
    2. /dev/tdev
    3. /dev/tty
    4. /dev/curproc
  231. Which command can be used to print using a specially formatted string?

    1. printf
    2. echo
    3. print
    4. here
  232. You need to remove a series of files programmatically through a script. Which command can be used to remove these files?

    1. remove
    2. rmfile
    3. unlink
    4. rem
  233. You need to copy a file to a remote system, but that remote system does not have FTP or any other file-sharing services running. You have the ability to SSH into the server. Which of the following commands can be used for this purpose?

    1. scp
    2. ncftp
    3. go
    4. xfer
  234. Which HTTP status code is returned when TraceEnable has been set to Off within Apache?

    1. 405
    2. 100
    3. 302
    4. 200
  235. You are running a process in the background and need the process to continue after you log out. Which command should be used to ensure that the process continues even after logout?

    1. run
    2. cont
    3. nohup
    4. runproc
  236. You have inserted a USB Bluetooth device into the computer. Which of the following commands is used to determine if the device was detected?

    1. bluetooth -d
    2. bludetect
    3. lsblue
    4. lsusb | grep -i bluetooth
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.192.3