ccpq/data/tmp/lpic1_pratice_book_exam.csv

24 KiB
Raw Blame History

11. Which filesystem is used to store information about current running processes?
2A. /environment
3B. /proc
4C. /etc
5D. /dev
62. What is the default directory for configuration information related to the modprobe
7command?
8A. /etc/modprobe.conf
9B. /etc/modprobe
10C. /etc/modprobe.d
11D. /var/modprobe
12the operator group?
134. Which option to dmesg displays the time in local time?
14A. -rel
15B. -e
16C. -f
17D. -t
185. Which process ID is typically associated with the init process?
19A. 0
20B. 1
21C. 5
22D. 100
236. You have been troubleshooting a system issue that may be related to the driver in use for a
24PCI device in the system. Which command and option will display the PCI devices and the
25drivers being used for those devices?
26A. lsusb -v
27B. ls -pci
28C. lspci -k
29D. showpci7. Which option to the telinit command will cause the operation to not send any notice to
30logged-on users?
31A. -q
32B. -v
33C. --no-wall
34D. -l
358. Which file in the sysfs filesystem could you view in order to see the MAC address of eth0?
36A. /sys/class/net/eth0/address
37B. /sys/devices/eth0
38C. /sysfs/devices/eth0
39D. /sys/net/eth0
40A. SIGKILL
41B. SIGTERM
42C. SIGINT
43D. SIGCALL
4410. A newly added Serial ATA (SATA) disk is not showing up during the boot process. Where
45can you check to begin troubleshooting this issue?
46A. Using system logging
47B. Using debugfs
48C. Within the fdisk utility
49D. Within the computer BIOS
5011. Which command can be used to monitor communication taking place with dbus?
51A. dbus-mon
52B. dbus -m
53C. dbus-monitor
54D. dbus-debug
55A. systemd-udevd.service
56B. systemd-udev.service
57C. udevd-service
58D. systemd.udevd-service13. What is the correct syntax to indicate that the system should shut down at 8 p.m.?
59A. shutdown 20:00
60B. shutdown 8pm
61C. shutdown +20:00
62D. halt 20
6314. Which option to the systemctl kill command will change the signal sent to the process
64to be killed?
65A. -k
66B. -f
67C. -s
68D. -d
6915. Which systemd command and option is equivalent to the chkconfig --list command in
70a SysVinit environment?
71A. systemctl list-unit-files
72B. systemctl list-service
73C. systemctl --list
74D. systemctl list-unit-files --type=service
7516. Which option to ldconfig is used to change the location of the cache to be updated?
76A. -C
77B. -c
78C. --f
79D. -v
80configuration files?
81A. apt-get remove
82B. apt-cache clean
83C. dpkg -P
84D. apt-get conf-remove
8518. What is the prefix used to denote a Debian source repository in /etc/apt/sources.list?
86A. deb
87B. source
88C. deb-src
89D. debsrc19. Which options to rpm will upgrade a package while displaying progress and other addi-
90tional information about the operation?
91A. -Iv
92B. -Uvh
93C. -U
94D. -vh
9520. Which option to a yum install command will cause yum to assume yes and therefore not
96prompt for verification when performing actions deemed critical?
97A. -y
98B. -f
99C. -p
100D. -m
101certain packages are not upgraded or installed. Which option can you set in /etc/yum
102.conf to facilitate this behavior?
103A. exclude
104B. noupdate
105C. assumeupdate
106D. clearupdate
10722. You are having difficulty with shared libraries on the system. Which of the following com-
108mands will print the current directories and libraries in the cache?
109A. ldconfig -C
110B. ldd -f
111C. ldconfig -p
112D. ldd -b
11323. Which option within a .repo file in /etc/yum.repos.d/ is used to set the URL for the
114repository?
115A. url
116B. repourl
117C. httpurl
118D. baseurl
11924. Which command and option is used to display basic information about each available pack-
120age and its dependencies on a Debian system?
121A. apt-get list
122B. apt-cache dump
123C. apt-get list-all
124which partition is the system likely booted?
125A. There is a /boot directory under the / partition.
126B. The /boot partition is hidden.
127C. The system has not yet built the /boot partition.
128D. The /boot partition does not show up with lsblk.
12926. Within which hierarchy is cached data stored for both yum- and apt-style systems?
130A. /etc
131B. /var/cache
132C. /usr/lib
133D. /tmp
134installed?
135A. MBR
136B. /boot
137C. Sector 8192
138D. Front
13928. Which of the following best describes the contents of the / filesystem within Linux?
140A. The / filesystem is the root filesystem and contains temporary files.
141B. The / filesystem is roots home directory.
142C. The / filesystem is used for storage of device and swap information.
143D. The / filesystem is the root filesystem and is the logical root of the hierarchy within
144Linux.
14529. Which of the following commands will send the output of the grub-mkconfig command to
146the correct location for booting?
147A. grub-mkconfig --output=/boot/grub2/grub.cfg
148B. grub-mkconfig --file=/boot/grub2.menu
149C. grub-mkconfig --file=/boot/grub.lst
150D. grub-mkconfig --output=/boot/menu.lst
15130. Which of the following commands writes an image called from the current directory called
152raspbian.img to the SD card mounted at /dev/sdc?
153A. dd if=raspbian.img of=/dev/sdc bs=1M
154B. imgwrite raspbian.img > /dev/sdc
155C. imgw raspbian.img | cat /dev/sdc
156your current session. Which command can you use to view the commands that have been
157executed during the current session?
158A. cmdhist
159B. cmds
160C. pwd
161D. history
16232. Which option should be sent to grub-install if you want to install the boot images within
163a directory other than /boot?
164A. --boot
165B. --image
166C. --boot-directory
167D. --b
16833. Which command should be run in order to make changes take effect for a GRUB2 configu-
169ration change?
170A. update-grub
171B. grub-update
172C. grub-config
173D. grub-ins
17434. Which of the following commands will set the environment variable JAVA_PATH equal to
175/home/user/java2 when using the Bash shell?
176A. invoke JAVA_PATH=/home/user/java2
177B. export JAVA_PATH=/home/user/java2
178C. envvar JAVA_PATH=/home/user/java2
179D. echo JAVA_PATH=/home/user/java2
18035. Which option in the .bashrc sets the number of commands to keep in the .bash_history file?
181A. HISTLIMIT
182B. HISTORYFILE
183C. HISTFILESIZE
184D. HISTNUM
185for a file called code.php?
186A. nl code.php
187B. nl -a code.php
188C. nl -n code.php
189D. nl -b a code.php37. Which command can be used to create an octal representation of a given plaintext file?
190A. oct
191B. cat
192C. list
193D. od
19438. Which command and option can be used to format text with pagination in a double-space
195A. pr -d
196B. pag -db
197C. cat -pd
198D. print -d
199ning at the 30th line from the start of the file rather than the end of the file?
200A. -n +30
201B. -n 30
202C. -30
203D. +30
20440. Which option to the uniq command causes the matching to be done in a case-insensitive
205manner?
206A. -c
207B. -f
208C. -i
209D. -n
21041. Which of the following commands prints the username and real name of all users in
211/etc/passwd in a tab-separated format?
212B. sed 's/://' /etc/passwd
21342. Which option to cp will preserve symlinks in a recursive copy?
214A. -f
215B. -d
216C. -a
217D. -b43. Which of the following key combinations is a technique for moving to the 23rd line of a file
218in Vi?
219A. 23G
220B. /23
221C. i23
222D. ZZ
22344. Which option to the top command changes the update interval?
224A. -d
225B. -t
226C. -n
227D. -f
228A. listproc -uf
229D. ps -fa
23046. Which command can be used to search the contents of all files below your current location
231for files that contain the characters DB?
232C. cat * | less
233D. cat *.txt | grep DB
234ing from the current directory?
23548. Which of the following files is the location used to gather information about load average
236for use in the uptime command?
237A. /proc/uptime
238B. /proc/loadavg
239C. /proc/load
240prompt when attempting a repair action?
241A. -y
242B. -f
243C. -a
244D. No option required
24550. Which of the following files is updated dynamically with information about currently
246mounted filesystems?
247A. /etc/fstab
248B. /etc/files
249C. /boot/fstab
250D. /etc/mtab
251bytes instead of bytes. Which option will accomplish this task?
252A. -ST
253B. -BT
254C. -j
255D. -T
25652. What command can be used to create an image of important metadata for an ext3 filesys-
257tem?
258A. e2image
259B. e3image
260C. dumpe2fs
261D. dumpe3fs
26253. Which option to mke2fs is used to check for bad blocks during filesystem creation?
263A. -a
264B. -b
265C. -c
266D. -d
26754. Which of the following commands changes the ownership of the file called Class.java to
268the user steve and the group developers?
269A. chgrp steve:developers Class.java
270B. chown steve.developers Class.java
271C. chown developers.steve Class.java
272of a server to the known_hosts file?
273A. ssh-keyscan
274B. ssh-keyadd
275C. ssh-keylist
276D. ssh-getkey
27756. Which configuration option can be set within /etc/default/grub to affect the behavior of
278the system after a failed boot?
279A. GRUB_RECOVER
280B. GRUB_NOFAIL
281C. GRUB_RECORDFAIL_TIMEOUT
282D. GRUB_RECOVER_TIMEOUT
28357. Which options to du will print a summary of information in a human-readable format?
284A. -sh
285B. -h
286C. -s
287D. -su
28858. Which option to the find command causes it to follow symbolic links?
289A. -S
290B. -H
291C. -P
292D. -L
29359. Which option to the tee command enables appending to the destination files rather than
294overwriting?
295A. -a
296B. -m
297C. -g
298D. -d
299figuration files will be backed up?
300A. /var
301B. /opt
302C. /etc
303D. /bin
3041. To which file should you add an entry in order for a host to be blocked using TCP
305wrappers?
306A. /etc/hosts.deny
307B. /etc/tcp.wrappers
308C. /etc/wrap.config
309D. /etc/tcpwrap.conf
3102. Which of the following commands creates an alias for the ps command such that the
311options auwx are included when the user types psa?
312B. alias psa=ps uawx
3133. Which of the following conditionals in a Bash script will test if the variable DAY is equal to
314SUNDAY?
3154. Which of the following commands is necessary for making a variable defined in your
316current shell available to child processes?
317A. export
318B. source
319C. let
320D. def
3215. You are watching another administrator perform some work on a server. As part of that
322. variables.sh
323 Which of the following is the equivalent of . variables.sh?
324A. let variables.sh
325B. set variables.sh
326C. source variables.sh
327D. var variables.sh
3286. Which of the following commands adds ~/code/bin to the path?
329A. PATH=~/code/bin:$PATH
330B. PATH=/code/bin:$PATH C. PATH=/home/code/bin:$PATH
331D. PATH=PATH:~/code/bin
3327. Which of the following shows a valid Bash function called sayHello?
333B. function sayHello{}
334C. function sayHello() { echo Hello }
335D. function sayHello() { echo Hello } ;
3368. Which of the following commands sends an email to root with the subject of Update and
337the content of the /etc/hostname file?
338A. mail root > /etc/hostname
339B. mail -s Update root > /etc/hostname
340C. mail -s Update root < /etc/hostname
341D. mail root -s Update /etc/hostname
3429. Files that should be copied to a users home directory when their account is created should
343be placed in which of the following directories?
344A. /etc/usertemplate
345B. /etc/template
346C. /etc/skel
347D. /etc/userskel
34810. Which of the following areas within an Ubuntu system contains information and settings
349for accessibility?
350A. Accessibility
351B. Access and Help
352C. Universal Use
353D. Universal Access
35411. Which command can be used to set the delay and repeat rate for a keyboard?
355A. keyboard
356B. kbdrate
357C. kbd
358D. keyrate
35912. Which variable is used to indicate the screen on which GUI applications will be shown?
360A. DISPLAY
361B. SCREEN
362C. LIST
363D. XWIN13. Users can be added or removed for access to the X server. Which command facilitates this?
364A. xauthorization
365B. xhost
366C. xwin
367D. xconnect
36814. Which option to useradd sets the number of days between password expiration and when
369the account is disabled?
370A. -n
371B. -f
372C. -e
373D. -g
37415. Which of the following commands displays the current mail aliases known on the server?
375A. getent aliases
376B. getalias
377C. listalias
378D. mail aliases
37916. Which of the following configuration lines in /etc/hosts.deny creates a deny-by-default
380policy where clients will need to be specifically allowed in /etc/hosts.allow?
381A. *.*
382B. All: *
383C. ALL: ALL
384D. LOC: ALL
38517. Which of the following describes the result of running the atq command as root?
386A. The current cron and at jobs for root will be listed.
387B. The current at jobs for all users will be listed.
388C. The current cron and at jobs for all users will be listed.
389D. The last 10 entries in the at log will be shown.
39018. Which command option can be used to remove all cron jobs for a given user using the
391crontab command?
392A. -d
393B. -e
394C. -r
395D. -l19. Which option to the crontab command enables you to work with a different users cron
396jobs?
397A. -u
398B. -m
399C. -d
400D. -e
401than deleting it. Which option of the following commands deletes the user <username> but
402preserves their home directory?
403A. userdel <username>
404B. userdel -r <username>
405C. userdel -h <username>
406D. userdel -p <username>
407its group ID. Which option to the find command will search using the group ID?
408A. -name
409B. -group
410C. -groupid
411D. -gid
41222. Which of the following commands changes the group name from admins to serveradmins?
413A. groupmod -g admins serveradmins
414B. groupmod -n serveradmins admins
415C. groupchg -n serveradmins admins
416D. groupchg admins -n serveradmins
41723. Which command is used to parse log file entries on a systemd-based system?
418A. logger
419B. journalentry
420C. jrnctl
421D. journalctl
42224. Which option to the ntpdate command configures the version to use such that an older
423Network Time Protocol (NTP) server could be queried?
424A. -o
425B. -v
426C. -e
427D. -r25. Within which directory are systemd journals stored by default?
428A. /var/log/systemd
429B. /var/systemd/journal
430C. /var/log/journald
431D. /var/log/journal
43226. Which option to the logrotate command specifies the mailer to use?
433A. -o
434B. -s
435C. -m
436D. -v
43727. Which option to date changes the output to Coordinated Universal Time (UTC) regardless
438of the current time zone?
439A. -u
440B. -t
441C. -s
442D. -v
44328. Which of the following commands can be used to delete a print job on a system that uses
444the lp print system?
445A. lpdel
446B. rmprint
447C. rm -print
448D. lprm
44929. Which of the following subnet masks represents a /23?
450A. 255.255.255.0
451B. 255.255.0.0
452C. 255.255.255.255
453D. 255.255.254.0
45430. An entry in /etc/nsswitch.conf indicates hosts: files dns. In which order will
455/etc/hosts be queried for a hostname lookup?
456A. The /etc/hosts file will be examined first.
457B. The /etc/hosts file is not related to hostname lookup.
458C. The /etc/hosts file will be queried second.
459D. The /etc/hosts file will be queried last.31. Which port needs to be allowed through the firewall for standard Lightweight Directory
460Access Protocol (LDAP) traffic to be received by the server?
461A. TCP port 25
462B. TCP port 443
463C. TCP port 143
464D. TCP port 389
46532. Which option to ssh changes the username to use for logging in to the server?
466A. -v
467B. -i
468C. -l
469D. -u
47033. Which option to ping disables name resolution?
471A. -d
472B. -D
473C. -f
474D. -n
47534. Which of the following commands shows various statistics for a network interface such as
476packets and bytes received and transmitted along with errors and other such conditions?
477A. ifconfig
478B. ifstat
479C. if -s
480D. ifcond
481from each of the authoritative DNS name servers for the given domain?
482A. -N
483B. -n
484C. -C
485D. -a
48636. You need to specify an additional localhost address and hostname for a server in order to
487support a specialized network configuration. Which line in /etc/hosts sets the hostname
488with a unique IP address in the correct range for localhost?
489A. 127.0.1.1 host.example.com host
490B. 192.168.0.1 host.example.com host
491C. host.example.com 127.0.0.1
492D. host.example.com 172.16.31.3237. Which of the following options to ifup tells the command to ignore errors and continue?
493A. --continue
494B. --C
495C. --ignore-errors
496D. -h
49738. Which option to passwd can be used to unlock an account that was locked with the passwd
498command?
499A. -S
500B. -l
501C. -u
502D. -w
50339. Which of the following is the correct syntax to connect using ssh to host.example.com on
504port 2200?
505A. ssh -l 2200 host.example.com
506B. ssh host;example.com
507C. ssh host.example.com:2200
508D. ssh host:2200 -d example.com
50940. Which option in /etc/sudoers sets the destination address for administrative and security
510emails related to sudo?
511A. mail
512B. mailto
513C. secmail
514D. adminmail
51541. Which of the following commands displays a listing of who is logged in to the server along
516with the date and time that they logged in?
517A. whois
518B. who
519C. loggedin
520D. curusers
52142. Which port should be allowed through a firewall for NTP communication?
522A. Port 139
523B. Port 161
524C. Port 123
525D. Port 19443. Which option to nmap causes it to scan using UDP?
526A. -sT
527B. -sS
528C. -sP
529D. -sU
53044. Which of the following options to lsof searches an entire directory tree for open instances
531of files or directories?
532A. -d
533B. +D
534C. -f
535D. -i
53645. Which option to the ip command displays DNS names rather than merely IP addresses?
537A. -n
538B. -f
539C. -r
540D. -a
54146. Which of the following commands and options enables you to examine timing related to
542listening sockets?
543A. ss -o
544B. netstat -rn
545C. ping -f
546D. ls -l
54747. Which of the following IP address and subnet mask pairs represents a private network in a
548/24 size?
549A. 192.168.3.0/255.255.255.128
550B. 172.16.19.128/255.255.0.0
551C. 192.168.2.0/255.255.255.0
552D. 10.168.1.0/0.0.0.255
553A. Network unreachable
554B. Host available
555C. Host unreachable
556D. High length49. On which port does the ping command operate for Internet Control Message Protocol
557(ICMP) echo requests?
558A. 53
559B. 1337
560C. 33433
561D. No port is used for ICMP.
562A. /etc/portnum
563B. /etc/services
564C. /etc/portnames
565D. /proc/sys/net/ipv4/ports
56651. Which of the following commands launches Orca with speech capabilities?
567A. orca --no-setup --disable main-window
568B. orca --screen
569C. orca --screen-reader
570D. orca --no-setup -s
57152. Which of the following locations stores the configuration for LightDM?
572A. /etc/lightdm/
573B. /etc/lightdm.conf
574C. /etc/lightdm-conf
575D. /etc/lightdm.d
57653. Which of the following commands displays statistics and information about windows in X
577windows?
578A. xinfo
579B. xstats
580C. xwin
581D. xwininfo
58254. Which of the following commands can be used to set the time zone on a Debian system?
583A. tzconfig
584B. /etc/timeconfig
585C. timeconfig
586D. timecfg55. Which of the following commands displays the available character maps?
587A. charmap
588B. charmap -l
589C. locale -m
590D. mapinfo
59156. Within which directory hierarchy will you find information regarding the available time
592zones on the server?
593A. /usr/zoneinfo
594B. /usr/share/zoneinfo
595C. /etc/zoneinfo
596D. /etc/tz.conf.d
597location by default?
598A. /var/lib/ntp/drift
599B. /var/ntp/drift
600C. /usr/share/ntpdrift
601D. /usr/share/lib/ntpdrift
60258. Which character combination sets the body of the message to STDIN when using the mail
603command?
604A. <
605B. >
606C. <<<
607D. |
60859. Which of the following commands deletes a group from a CentOS Linux system?
609A. groupdm
610B. grouprm
611C. groupdel
612D. delgroup
61360. Which of the following syslog facilities captures messages from the lp printing facility?
614A. auth
615B. messages
616C. lpr
617D. root