Chapter 12
Practice Exam 2

  1. To which file should you add an entry in order for a host to be blocked using TCP wrappers?

    1. /etc/hosts.deny
    2. /etc/tcp.wrappers
    3. /etc/wrap.config
    4. /etc/tcpwrap.conf
  2. Which of the following commands creates an alias for the ps command such that the options auwx are included when the user types psa?

    1. alias "ps auwx" = "psa"
    2. alias psa=ps uawx
    3. alias psa="ps auwx"
    4. psa="ps auwx"
  3. Which of the following conditionals in a Bash script will test if the variable DAY is equal to SUNDAY?

    1. if ($DAY == "SUNDAY")
    2. if ($DAY -eq "SUNDAY")
    3. if [[ $DAY == "SUNDAY" ]]
    4. if [ DAY = "SUNDAY" ]
  4. Which of the following commands is necessary for making a variable defined in your current shell available to child processes?

    1. export
    2. source
    3. let
    4. def
  5. You are watching another administrator perform some work on a server. As part of that work, the admin uses the following command:

    . variables.sh

    Which of the following is the equivalent of . variables.sh?

    1. let variables.sh
    2. set variables.sh
    3. source variables.sh
    4. var variables.sh
  6. Which of the following commands adds ~/code/bin to the path?

    1. PATH=~/code/bin:$PATH
    2. PATH=/code/bin:$PATH
    3. PATH=/home/code/bin:$PATH
    4. PATH=PATH:~/code/bin
  7. Which of the following shows a valid Bash function called sayHello?

    1. function sayHello () { echo "hello"; }
    2. function sayHello{}
    3. function sayHello() { echo Hello }
    4. function sayHello() { echo Hello } ;
  8. Which of the following commands sends an email to root with the subject of Update and the content of the /etc/hostname file?

    1. mail root > /etc/hostname
    2. mail -s Update root > /etc/hostname
    3. mail -s Update root < /etc/hostname
    4. mail root -s Update /etc/hostname
  9. Files that should be copied to a user’s home directory when their account is created should be placed in which of the following directories?

    1. /etc/usertemplate
    2. /etc/template
    3. /etc/skel
    4. /etc/userskel
  10. Which of the following areas within an Ubuntu system contains information and settings for accessibility?

    1. Accessibility
    2. Access and Help
    3. Universal Use
    4. Universal Access
  11. Which command can be used to set the delay and repeat rate for a keyboard?

    1. keyboard
    2. kbdrate
    3. kbd
    4. keyrate
  12. Which variable is used to indicate the screen on which GUI applications will be shown?

    1. DISPLAY
    2. SCREEN
    3. LIST
    4. XWIN
  13. Users can be added or removed for access to the X server. Which command facilitates this?

    1. xauthorization
    2. xhost
    3. xwin
    4. xconnect
  14. Which option to useradd sets the number of days between password expiration and when the account is disabled?

    1. -n
    2. -f
    3. -e
    4. -g
  15. Which of the following commands displays the current mail aliases known on the server?

    1. getent aliases
    2. getalias
    3. listalias
    4. mail aliases
  16. Which of the following configuration lines in /etc/hosts.deny creates a deny-by-default policy where clients will need to be specifically allowed in /etc/hosts.allow?

    1. *.*
    2. All: *
    3. ALL: ALL
    4. LOC: ALL
  17. Which of the following describes the result of running the atq command as root?

    1. The current cron and at jobs for root will be listed.
    2. The current at jobs for all users will be listed.
    3. The current cron and at jobs for all users will be listed.
    4. The last 10 entries in the at log will be shown.
  18. Which command option can be used to remove all cron jobs for a given user using the crontab command?

    1. -d
    2. -e
    3. -r
    4. -l
  19. Which option to the crontab command enables you to work with a different user’s cron jobs?

    1. -u
    2. -m
    3. -d
    4. -e
  20. When deleting a user from the server, you need to maintain their home directory rather than deleting it. Which option of the following commands deletes the user <username> but preserves their home directory?

    1. userdel <username>
    2. userdel -r <username>
    3. userdel -h <username>
    4. userdel -p <username>
  21. After deleting a group, you need to search the filesystem for files owned by the group using its group ID. Which option to the find command will search using the group ID?

    1. -name
    2. -group
    3. -groupid
    4. -gid
  22. Which of the following commands changes the group name from admins to serveradmins?

    1. groupmod -g admins serveradmins
    2. groupmod -n serveradmins admins
    3. groupchg -n serveradmins admins
    4. groupchg admins -n serveradmins
  23. Which command is used to parse log file entries on a systemd-based system?

    1. logger
    2. journalentry
    3. jrnctl
    4. journalctl
  24. Which option to the ntpdate command configures the version to use such that an older Network Time Protocol (NTP) server could be queried?

    1. -o
    2. -v
    3. -e
    4. -r
  25. Within which directory are systemd journals stored by default?

    1. /var/log/systemd
    2. /var/systemd/journal
    3. /var/log/journald
    4. /var/log/journal
  26. Which option to the logrotate command specifies the mailer to use?

    1. -o
    2. -s
    3. -m
    4. -v
  27. Which option to date changes the output to Coordinated Universal Time (UTC) regardless of the current time zone?

    1. -u
    2. -t
    3. -s
    4. -v
  28. Which of the following commands can be used to delete a print job on a system that uses the lp print system?

    1. lpdel
    2. rmprint
    3. rm -print
    4. lprm
  29. Which of the following subnet masks represents a /23?

    1. 255.255.255.0
    2. 255.255.0.0
    3. 255.255.255.255
    4. 255.255.254.0
  30. An entry in /etc/nsswitch.conf indicates hosts: files dns. In which order will /etc/hosts be queried for a hostname lookup?

    1. The /etc/hosts file will be examined first.
    2. The /etc/hosts file is not related to hostname lookup.
    3. The /etc/hosts file will be queried second.
    4. The /etc/hosts file will be queried last.
  31. Which port needs to be allowed through the firewall for standard Lightweight Directory Access Protocol (LDAP) traffic to be received by the server?

    1. TCP port 25
    2. TCP port 443
    3. TCP port 143
    4. TCP port 389
  32. Which option to ssh changes the username to use for logging in to the server?

    1. -v
    2. -i
    3. -l
    4. -u
  33. Which option to ping disables name resolution?

    1. -d
    2. -D
    3. -f
    4. -n
  34. Which of the following commands shows various statistics for a network interface such as packets and bytes received and transmitted along with errors and other such conditions?

    1. ifconfig
    2. ifstat
    3. if -s
    4. ifcond
  35. When using the host command, which option displays the Start of Authority (SOA) record from each of the authoritative DNS name servers for the given domain?

    1. -N
    2. -n
    3. -C
    4. -a
  36. You need to specify an additional localhost address and hostname for a server in order to support a specialized network configuration. Which line in /etc/hosts sets the hostname with a unique IP address in the correct range for localhost?

    1. 127.0.1.1 host.example.com host
    2. 192.168.0.1 host.example.com host
    3. host.example.com 127.0.0.1
    4. host.example.com 172.16.31.32
  37. Which of the following options to ifup tells the command to ignore errors and continue?

    1. --continue
    2. --C
    3. --ignore-errors
    4. -h
  38. Which option to passwd can be used to unlock an account that was locked with the passwd command?

    1. -S
    2. -l
    3. -u
    4. -w
  39. Which of the following is the correct syntax to connect using ssh to host.example.com on port 2200?

    1. ssh -l 2200 host.example.com
    2. ssh host;example.com
    3. ssh host.example.com:2200
    4. ssh host:2200 -d example.com
  40. Which option in /etc/sudoers sets the destination address for administrative and security emails related to sudo?

    1. mail
    2. mailto
    3. secmail
    4. adminmail
  41. 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
  42. Which port should be allowed through a firewall for NTP communication?

    1. Port 139
    2. Port 161
    3. Port 123
    4. Port 194
  43. Which option to nmap causes it to scan using UDP?

    1. -sT
    2. -sS
    3. -sP
    4. -sU
  44. Which of the following options to lsof searches an entire directory tree for open instances of files or directories?

    1. -d
    2. +D
    3. -f
    4. -i
  45. Which option to the ip command displays DNS names rather than merely IP addresses?

    1. -n
    2. -f
    3. -r
    4. -a
  46. Which of the following commands and options enables you to examine timing related to listening sockets?

    1. ss -o
    2. netstat -rn
    3. ping -f
    4. ls -l
  47. Which of the following IP address and subnet mask pairs represents a private network in a /24 size?

    1. 192.168.3.0/255.255.255.128
    2. 172.16.19.128/255.255.0.0
    3. 192.168.2.0/255.255.255.0
    4. 10.168.1.0/0.0.0.255
  48. When viewing the results of a traceroute, you see !H. To what does !H refer?

    1. Network unreachable
    2. Host available
    3. Host unreachable
    4. High length
  49. On which port does the ping command operate for Internet Control Message Protocol (ICMP) echo requests?

    1. 53
    2. 1337
    3. 33433
    4. No port is used for ICMP.
  50. When using netstat -a, which file is consulted for the port number to name translation?

    1. /etc/portnum
    2. /etc/services
    3. /etc/portnames
    4. /proc/sys/net/ipv4/ports
  51. Which of the following commands launches Orca with speech capabilities?

    1. orca --no-setup --disable main-window
    2. orca --screen
    3. orca --screen-reader
    4. orca --no-setup -s
  52. Which of the following locations stores the configuration for LightDM?

    1. /etc/lightdm/
    2. /etc/lightdm.conf
    3. /etc/lightdm-conf
    4. /etc/lightdm.d
  53. Which of the following commands displays statistics and information about windows in X windows?

    1. xinfo
    2. xstats
    3. xwin
    4. xwininfo
  54. Which of the following commands can be used to set the time zone on a Debian system?

    1. tzconfig
    2. /etc/timeconfig
    3. timeconfig
    4. timecfg
  55. Which of the following commands displays the available character maps?

    1. charmap
    2. charmap -l
    3. locale -m
    4. mapinfo
  56. Within which directory hierarchy will you find information regarding the available time zones on the server?

    1. /usr/zoneinfo
    2. /usr/share/zoneinfo
    3. /etc/zoneinfo
    4. /etc/tz.conf.d
  57. The driftfile, as specified in /etc/ntp.conf on a Red Hat system, is stored in which location by default?

    1. /var/lib/ntp/drift
    2. /var/ntp/drift
    3. /usr/share/ntpdrift
    4. /usr/share/lib/ntpdrift
  58. Which character combination sets the body of the message to STDIN when using the mail command?

    1. <
    2. >
    3. <<<
    4. |
  59. Which of the following commands deletes a group from a CentOS Linux system?

    1. groupdm
    2. grouprm
    3. groupdel
    4. delgroup
  60. Which of the following syslog facilities captures messages from the lp printing facility?

    1. auth
    2. messages
    3. lpr
    4. root
..................Content has been hidden....................

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