ccpq/data/tmp/lpic1_pratice_book_exam.csv

772 lines
24 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1. Which filesystem is used to store information about current running processes?
A. /environment
B. /proc
C. /etc
D. /dev
2. What is the default directory for configuration information related to the modprobe
command?
A. /etc/modprobe.conf
B. /etc/modprobe
C. /etc/modprobe.d
D. /var/modprobe
3. Which of the following wall commands send the message "Please Log Off" to users in
the operator group?
A. wall -g operator "Please Log Off"
B. wall "Please Log Off"
C. wall -operator "Please Log Off"
D. echo "Please Log Off" | group operator
4. Which option to dmesg displays the time in local time?
A. -rel
B. -e
C. -f
D. -t
5. Which process ID is typically associated with the init process?
A. 0
B. 1
C. 5
D. 100
6. You have been troubleshooting a system issue that may be related to the driver in use for a
PCI device in the system. Which command and option will display the PCI devices and the
drivers being used for those devices?
A. lsusb -v
B. ls -pci
C. lspci -k
D. showpci7. Which option to the telinit command will cause the operation to not send any notice to
logged-on users?
A. -q
B. -v
C. --no-wall
D. -l
8. Which file in the sysfs filesystem could you view in order to see the MAC address of eth0?
A. /sys/class/net/eth0/address
B. /sys/devices/eth0
C. /sysfs/devices/eth0
D. /sys/net/eth0
9. When using systemctl to kill a process, what is the default signal sent to a process?
A. SIGKILL
B. SIGTERM
C. SIGINT
D. SIGCALL
10. A newly added Serial ATA (SATA) disk is not showing up during the boot process. Where
can you check to begin troubleshooting this issue?
A. Using system logging
B. Using debugfs
C. Within the fdisk utility
D. Within the computer BIOS
11. Which command can be used to monitor communication taking place with dbus?
A. dbus-mon
B. dbus -m
C. dbus-monitor
D. dbus-debug
12. Within a systemd environment, which service manages udev?
A. systemd-udevd.service
B. systemd-udev.service
C. udevd-service
D. systemd.udevd-service13. What is the correct syntax to indicate that the system should shut down at 8 p.m.?
A. shutdown 20:00
B. shutdown 8pm
C. shutdown +20:00
D. halt 20
14. Which option to the systemctl kill command will change the signal sent to the process
to be killed?
A. -k
B. -f
C. -s
D. -d
15. Which systemd command and option is equivalent to the chkconfig --list command in
a SysVinit environment?
A. systemctl list-unit-files
B. systemctl list-service
C. systemctl --list
D. systemctl list-unit-files --type=service
16. Which option to ldconfig is used to change the location of the cache to be updated?
A. -C
B. -c
C. --f
D. -v
17. Which of the following commands will remove all files for a package in Debian, including
configuration files?
A. apt-get remove
B. apt-cache clean
C. dpkg -P
D. apt-get conf-remove
18. What is the prefix used to denote a Debian source repository in /etc/apt/sources.list?
A. deb
B. source
C. deb-src
D. debsrc19. Which options to rpm will upgrade a package while displaying progress and other addi-
tional information about the operation?
A. -Iv
B. -Uvh
C. -U
D. -vh
20. Which option to a yum install command will cause yum to assume yes and therefore not
prompt for verification when performing actions deemed critical?
A. -y
B. -f
C. -p
D. -m
21. When working with a yum-based system, you need to create a configuration to ensure that
certain packages are not upgraded or installed. Which option can you set in /etc/yum
.conf to facilitate this behavior?
A. exclude
B. noupdate
C. assumeupdate
D. clearupdate
22. You are having difficulty with shared libraries on the system. Which of the following com-
mands will print the current directories and libraries in the cache?
A. ldconfig -C
B. ldd -f
C. ldconfig -p
D. ldd -b
23. Which option within a .repo file in /etc/yum.repos.d/ is used to set the URL for the
repository?
A. url
B. repourl
C. httpurl
D. baseurl
24. Which command and option is used to display basic information about each available pack-
age and its dependencies on a Debian system?
A. apt-get list
B. apt-cache dump
C. apt-get list-all
D. apt-cache list25. When running the lsblk command, there is no separate partition listed for /boot. From
which partition is the system likely booted?
A. There is a /boot directory under the / partition.
B. The /boot partition is hidden.
C. The system has not yet built the /boot partition.
D. The /boot partition does not show up with lsblk.
26. Within which hierarchy is cached data stored for both yum- and apt-style systems?
A. /etc
B. /var/cache
C. /usr/lib
D. /tmp
27. On a BIOS-based system, within which region of the disk is the boot loader typically
installed?
A. MBR
B. /boot
C. Sector 8192
D. Front
28. Which of the following best describes the contents of the / filesystem within Linux?
A. The / filesystem is the root filesystem and contains temporary files.
B. The / filesystem is roots home directory.
C. The / filesystem is used for storage of device and swap information.
D. The / filesystem is the root filesystem and is the logical root of the hierarchy within
Linux.
29. Which of the following commands will send the output of the grub-mkconfig command to
the correct location for booting?
A. grub-mkconfig --output=/boot/grub2/grub.cfg
B. grub-mkconfig --file=/boot/grub2.menu
C. grub-mkconfig --file=/boot/grub.lst
D. grub-mkconfig --output=/boot/menu.lst
30. Which of the following commands writes an image called from the current directory called
raspbian.img to the SD card mounted at /dev/sdc?
A. dd if=raspbian.img of=/dev/sdc bs=1M
B. imgwrite raspbian.img > /dev/sdc
C. imgw raspbian.img | cat /dev/sdc
D. dd raspbian.img > /dev/sdc31. When troubleshooting a problem, you look through .bash_history to determine com-
mands that youve recently executed. However, the file does not contain information from
your current session. Which command can you use to view the commands that have been
executed during the current session?
A. cmdhist
B. cmds
C. pwd
D. history
32. Which option should be sent to grub-install if you want to install the boot images within
a directory other than /boot?
A. --boot
B. --image
C. --boot-directory
D. --b
33. Which command should be run in order to make changes take effect for a GRUB2 configu-
ration change?
A. update-grub
B. grub-update
C. grub-config
D. grub-ins
34. Which of the following commands will set the environment variable JAVA_PATH equal to
/home/user/java2 when using the Bash shell?
A. invoke JAVA_PATH=/home/user/java2
B. export JAVA_PATH=/home/user/java2
C. envvar JAVA_PATH=/home/user/java2
D. echo JAVA_PATH=/home/user/java2
35. Which option in the .bashrc sets the number of commands to keep in the .bash_history file?
A. HISTLIMIT
B. HISTORYFILE
C. HISTFILESIZE
D. HISTNUM
36. Which of the following commands will cause nl to number all lines, including blank lines,
for a file called code.php?
A. nl code.php
B. nl -a code.php
C. nl -n code.php
D. nl -b a code.php37. Which command can be used to create an octal representation of a given plaintext file?
A. oct
B. cat
C. list
D. od
38. Which command and option can be used to format text with pagination in a double-space
format, including page numbers?
A. pr -d
B. pag -db
C. cat -pd
D. print -d
39. Of the following options for the tail command, which option outputs the last lines begin-
ning at the 30th line from the start of the file rather than the end of the file?
A. -n +30
B. -n 30
C. -30
D. +30
40. Which option to the uniq command causes the matching to be done in a case-insensitive
manner?
A. -c
B. -f
C. -i
D. -n
41. Which of the following commands prints the username and real name of all users in
/etc/passwd in a tab-separated format?
A. cut -d: -f 1,6 /etc/passwd
B. sed 's/://' /etc/passwd
C. awk -F: '{print $1,$5}' OFS="\t" /etc/passwd
D. cat -o "\t" /etc/passwd
42. Which option to cp will preserve symlinks in a recursive copy?
A. -f
B. -d
C. -a
D. -b43. Which of the following key combinations is a technique for moving to the 23rd line of a file
in Vi?
A. 23G
B. /23
C. i23
D. ZZ
44. Which option to the top command changes the update interval?
A. -d
B. -t
C. -n
D. -f
45. Which of the following commands will display the process ID, the real user ID, the filesys-
tem access user ID, and command for processes on the system?
A. listproc -uf
B. ps -eo pid,euser,fuser,comm
C. ps -e pid,user,comm
D. ps -fa
46. Which command can be used to search the contents of all files below your current location
for files that contain the characters DB?
A. grep -r "DB" *
B. grep -ri "DB" *
C. cat * | less
D. cat *.txt | grep DB
47. Which of the following commands will locate all files that begin with the name DB, start-
ing from the current directory?
A. locate "DB*"
B. find ./ -name "DB*"
C. whereis "DB*"
D. find "DB*"
48. Which of the following files is the location used to gather information about load average
for use in the uptime command?
A. /proc/uptime
B. /proc/loadavg
C. /proc/load
D. /proc/utime49. When running fsck on an EXT3 filesystem, which option to fsck causes the operation to
prompt when attempting a repair action?
A. -y
B. -f
C. -a
D. No option required
50. Which of the following files is updated dynamically with information about currently
mounted filesystems?
A. /etc/fstab
B. /etc/files
C. /boot/fstab
D. /etc/mtab
51. When running the df command, you need to change the scale so that the report shows tera-
bytes instead of bytes. Which option will accomplish this task?
A. -ST
B. -BT
C. -j
D. -T
52. What command can be used to create an image of important metadata for an ext3 filesys-
tem?
A. e2image
B. e3image
C. dumpe2fs
D. dumpe3fs
53. Which option to mke2fs is used to check for bad blocks during filesystem creation?
A. -a
B. -b
C. -c
D. -d
54. Which of the following commands changes the ownership of the file called Class.java to
the user steve and the group developers?
A. chgrp steve:developers Class.java
B. chown steve.developers Class.java
C. chown developers.steve Class.java
D. chown Class.java steve.developers55. When bootstrapping a virtual machine, which command can be used to add the fingerprint
of a server to the known_hosts file?
A. ssh-keyscan
B. ssh-keyadd
C. ssh-keylist
D. ssh-getkey
56. Which configuration option can be set within /etc/default/grub to affect the behavior of
the system after a failed boot?
A. GRUB_RECOVER
B. GRUB_NOFAIL
C. GRUB_RECORDFAIL_TIMEOUT
D. GRUB_RECOVER_TIMEOUT
57. Which options to du will print a summary of information in a human-readable format?
A. -sh
B. -h
C. -s
D. -su
58. Which option to the find command causes it to follow symbolic links?
A. -S
B. -H
C. -P
D. -L
59. Which option to the tee command enables appending to the destination files rather than
overwriting?
A. -a
B. -m
C. -g
D. -d
60. When creating a backup for a system, which directory should be included so that most con-
figuration files will be backed up?
A. /var
B. /opt
C. /etc
D. /bin
1. To which file should you add an entry in order for a host to be blocked using TCP
wrappers?
A. /etc/hosts.deny
B. /etc/tcp.wrappers
C. /etc/wrap.config
D. /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?
A. alias "ps auwx" = "psa"
B. alias psa=ps uawx
C. alias psa="ps auwx"
D. psa="ps auwx"
3. Which of the following conditionals in a Bash script will test if the variable DAY is equal to
SUNDAY?
A. if ($DAY == "SUNDAY")
B. if ($DAY -eq "SUNDAY")
C. if [[ $DAY == "SUNDAY" ]]
D. if [ DAY = "SUNDAY" ]
4. Which of the following commands is necessary for making a variable defined in your
current shell available to child processes?
A. export
B. source
C. let
D. 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?
A. let variables.sh
B. set variables.sh
C. source variables.sh
D. var variables.sh
6. Which of the following commands adds ~/code/bin to the path?
A. PATH=~/code/bin:$PATH
B. PATH=/code/bin:$PATH C. PATH=/home/code/bin:$PATH
D. PATH=PATH:~/code/bin
7. Which of the following shows a valid Bash function called sayHello?
A. function sayHello () { echo "hello"; }
B. function sayHello{}
C. function sayHello() { echo Hello }
D. 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?
A. mail root > /etc/hostname
B. mail -s Update root > /etc/hostname
C. mail -s Update root < /etc/hostname
D. mail root -s Update /etc/hostname
9. Files that should be copied to a users home directory when their account is created should
be placed in which of the following directories?
A. /etc/usertemplate
B. /etc/template
C. /etc/skel
D. /etc/userskel
10. Which of the following areas within an Ubuntu system contains information and settings
for accessibility?
A. Accessibility
B. Access and Help
C. Universal Use
D. Universal Access
11. Which command can be used to set the delay and repeat rate for a keyboard?
A. keyboard
B. kbdrate
C. kbd
D. keyrate
12. Which variable is used to indicate the screen on which GUI applications will be shown?
A. DISPLAY
B. SCREEN
C. LIST
D. XWIN13. Users can be added or removed for access to the X server. Which command facilitates this?
A. xauthorization
B. xhost
C. xwin
D. xconnect
14. Which option to useradd sets the number of days between password expiration and when
the account is disabled?
A. -n
B. -f
C. -e
D. -g
15. Which of the following commands displays the current mail aliases known on the server?
A. getent aliases
B. getalias
C. listalias
D. 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?
A. *.*
B. All: *
C. ALL: ALL
D. LOC: ALL
17. Which of the following describes the result of running the atq command as root?
A. The current cron and at jobs for root will be listed.
B. The current at jobs for all users will be listed.
C. The current cron and at jobs for all users will be listed.
D. 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?
A. -d
B. -e
C. -r
D. -l19. Which option to the crontab command enables you to work with a different users cron
jobs?
A. -u
B. -m
C. -d
D. -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?
A. userdel <username>
B. userdel -r <username>
C. userdel -h <username>
D. 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?
A. -name
B. -group
C. -groupid
D. -gid
22. Which of the following commands changes the group name from admins to serveradmins?
A. groupmod -g admins serveradmins
B. groupmod -n serveradmins admins
C. groupchg -n serveradmins admins
D. groupchg admins -n serveradmins
23. Which command is used to parse log file entries on a systemd-based system?
A. logger
B. journalentry
C. jrnctl
D. 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?
A. -o
B. -v
C. -e
D. -r25. Within which directory are systemd journals stored by default?
A. /var/log/systemd
B. /var/systemd/journal
C. /var/log/journald
D. /var/log/journal
26. Which option to the logrotate command specifies the mailer to use?
A. -o
B. -s
C. -m
D. -v
27. Which option to date changes the output to Coordinated Universal Time (UTC) regardless
of the current time zone?
A. -u
B. -t
C. -s
D. -v
28. Which of the following commands can be used to delete a print job on a system that uses
the lp print system?
A. lpdel
B. rmprint
C. rm -print
D. lprm
29. Which of the following subnet masks represents a /23?
A. 255.255.255.0
B. 255.255.0.0
C. 255.255.255.255
D. 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?
A. The /etc/hosts file will be examined first.
B. The /etc/hosts file is not related to hostname lookup.
C. The /etc/hosts file will be queried second.
D. 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?
A. TCP port 25
B. TCP port 443
C. TCP port 143
D. TCP port 389
32. Which option to ssh changes the username to use for logging in to the server?
A. -v
B. -i
C. -l
D. -u
33. Which option to ping disables name resolution?
A. -d
B. -D
C. -f
D. -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?
A. ifconfig
B. ifstat
C. if -s
D. 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?
A. -N
B. -n
C. -C
D. -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?
A. 127.0.1.1 host.example.com host
B. 192.168.0.1 host.example.com host
C. host.example.com 127.0.0.1
D. host.example.com 172.16.31.3237. Which of the following options to ifup tells the command to ignore errors and continue?
A. --continue
B. --C
C. --ignore-errors
D. -h
38. Which option to passwd can be used to unlock an account that was locked with the passwd
command?
A. -S
B. -l
C. -u
D. -w
39. Which of the following is the correct syntax to connect using ssh to host.example.com on
port 2200?
A. ssh -l 2200 host.example.com
B. ssh host;example.com
C. ssh host.example.com:2200
D. ssh host:2200 -d example.com
40. Which option in /etc/sudoers sets the destination address for administrative and security
emails related to sudo?
A. mail
B. mailto
C. secmail
D. 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?
A. whois
B. who
C. loggedin
D. curusers
42. Which port should be allowed through a firewall for NTP communication?
A. Port 139
B. Port 161
C. Port 123
D. Port 19443. Which option to nmap causes it to scan using UDP?
A. -sT
B. -sS
C. -sP
D. -sU
44. Which of the following options to lsof searches an entire directory tree for open instances
of files or directories?
A. -d
B. +D
C. -f
D. -i
45. Which option to the ip command displays DNS names rather than merely IP addresses?
A. -n
B. -f
C. -r
D. -a
46. Which of the following commands and options enables you to examine timing related to
listening sockets?
A. ss -o
B. netstat -rn
C. ping -f
D. ls -l
47. Which of the following IP address and subnet mask pairs represents a private network in a
/24 size?
A. 192.168.3.0/255.255.255.128
B. 172.16.19.128/255.255.0.0
C. 192.168.2.0/255.255.255.0
D. 10.168.1.0/0.0.0.255
48. When viewing the results of a traceroute, you see !H. To what does !H refer?
A. Network unreachable
B. Host available
C. Host unreachable
D. High length49. On which port does the ping command operate for Internet Control Message Protocol
(ICMP) echo requests?
A. 53
B. 1337
C. 33433
D. No port is used for ICMP.
50. When using netstat -a, which file is consulted for the port number to name translation?
A. /etc/portnum
B. /etc/services
C. /etc/portnames
D. /proc/sys/net/ipv4/ports
51. Which of the following commands launches Orca with speech capabilities?
A. orca --no-setup --disable main-window
B. orca --screen
C. orca --screen-reader
D. orca --no-setup -s
52. Which of the following locations stores the configuration for LightDM?
A. /etc/lightdm/
B. /etc/lightdm.conf
C. /etc/lightdm-conf
D. /etc/lightdm.d
53. Which of the following commands displays statistics and information about windows in X
windows?
A. xinfo
B. xstats
C. xwin
D. xwininfo
54. Which of the following commands can be used to set the time zone on a Debian system?
A. tzconfig
B. /etc/timeconfig
C. timeconfig
D. timecfg55. Which of the following commands displays the available character maps?
A. charmap
B. charmap -l
C. locale -m
D. mapinfo
56. Within which directory hierarchy will you find information regarding the available time
zones on the server?
A. /usr/zoneinfo
B. /usr/share/zoneinfo
C. /etc/zoneinfo
D. /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?
A. /var/lib/ntp/drift
B. /var/ntp/drift
C. /usr/share/ntpdrift
D. /usr/share/lib/ntpdrift
58. Which character combination sets the body of the message to STDIN when using the mail
command?
A. <
B. >
C. <<<
D. |
59. Which of the following commands deletes a group from a CentOS Linux system?
A. groupdm
B. grouprm
C. groupdel
D. delgroup
60. Which of the following syslog facilities captures messages from the lp printing facility?
A. auth
B. messages
C. lpr
D. root