Dump LPI
Dump LPI
001 - Which of the following commands updates the already installed RPM package
rpmname?
A. rpm –update rpmname
**B. rpm -U rpmname
C. rpm -q rpmname
D. rpm –force rpmname
E. rpm -u rpmname
002 - Which of the following commands will mount an already inserted CD-ROM in
/dev/sr0 onto
an existing directory /mnt/cdrom when issued with root privileges?
A. mount /dev/cdrom /mnt/cdrom
B. mount /dev/sr0 /mnt/cdrom
**C. mount -t cdrom /dev/sr0 /mnt/cdrom
D. mount -l cdrom /dev/sr0 /mnt/cdrom
E. mount -f /dev/sr0/mnt/cdrom
003 - Which of the following is the device file name for the second partition on
the only SCSI drive?
A. /dev/hda1
**B. /dev/sda2
C. /dev/sd0a2
D. /dev/sd1p2
004 - Which option to the tee command will cause the output to be concatenated on
the end of
the output file instead of overwriting the existing file contents?
**A. -a
B. -c
C. –no-clobber
D. –continue
005 - Which of the following commands is used to change metadata and options for
ext3 filesystems?
A. mod3fs
B. tune3fs
C. mod2fs
**D. tune2fs
E. dump2fs
006 - When using regular expressions, which of the following characters match the
beginning of a line?
**A. ^
B. ?
C. *
D. +
E. $
007 - Which of the following commands will change the quota for a specific user?
**A. edquota
B. repquota
C. quota -e
D. quota
008 - What command changes the nice level of a running process? (Specify ONLY the
command without
any path or parameters)
Anwser: renice
009 - What is the maximum niceness value that a regular user can assign to a
process with the nice
command when executing a new process?
A. 9
**B. 19
C. 49
D. 99
010 - Which of the following commands will produce the following output?
USER PID %CPU %MEM VSZ RSS TTY STAT START
TIME COMMAND
root 1255 4.4 0.9 60716 34824 ttu7 Ss+ 09:25 19:04
/usr/bin/X :0 -
A. jobs
B. proclist
C. netstat
**D. ps
011 - Which variable defines the directories in which a Bash shell searches for
executable commands?
A. BASHEXEC
B. BASHRC
**C. PATH
D. EXECPATH
E. PATHRC
012 - Which of the following statements is correct regarding the command foo 1>
bar?
A. The stdout from the command foo is appended to the file bar.
**B. The stdout from the command foo overwrites the file bar.
C. The command foo receives its stdin from the file bar.
D. The command foo receives its stdin from the stdout of the command bar.
E. The stderr from the command foo is saved to the file bar.
013 - Which file from the /proc file system contains a list of all currently
mounted devices?
(Specify ONLY the command without any path or parameters.)
Answer: mounts
014 - Which of the following commands prints all files and directories within
the /tmp directory or
its subdirectories which are also owned by the user root? (Choose TWO correct
answers.)
A. find /tmp -uid root -print
B. find -path /tmp -uid root
**C. find /tmp -user root -print
**D. find /tmp -user root
E. find -path /tmp -user root -print
015 - Which of the following describes the correct order in which the components of
the system
boot process are started?
A. BIOS, kernel, bootloader, init system
**B. BIOS, bootloader, kernel, init system
C. Bootloader, BIOS, kernel, init system
D. BIOS, bootloader, init system, kernel
E. Bootloader, BIOS, init system, kernel
016 - Which of the following are init systems used within Linux systems? (Choose
THREE correct answers.)
A. startd
**B. systemd
**C. Upstart
D. SysInit
**E. SysV init
017 - Which of the following commands will load a kernel module along with any
required dependency modules?
A. depmod
B. insmod
**C. modprobe
D. module_install
E. loadmod
018 - Which character, added to the end of a command, runs that command in the
background as a child
process of the current shell?
A. !
B. +
**C. &
D. %
E. #
019 - Which of the following commands can be used to display the inode number of a
given file?
A. inode
**B. ls
C. ln
D. cp
020 - Which umask value will result in the default access permissions of 600 (rw
——-) for files and 700
(rwx——) for directories? (Specify only the numerical umask value.)
Answer: 0077, 077
021 - Which of the following information is stored within the BIOS? (Choose TWO
correct
answers.)
**A. Boot device order
B. Linux kernel version
C. Timezone
**D. Hardware configuration
E. The system’s hostname
022 - Which of the following command lines creates or, in case it already exists,
overwrites a file
called data with the output of ls?
A. ls 3> data
B. ls >& data
**C. ls > data
D. ls >> data
023 - Creating a hard link to an ordinary file returns an error. What could be the
reason for this?
A. The source file is hidden.
B. The source file is read-only.
C. The source file is a shell script.
D. The source file is already a hard link.
**E. The source and the target are on different filesystems.
025 - When piping the output of find to the xargs command, what option to find is
useful if the
filenames have spaces in them?
A. -rep-space
**B. -print0
C. -nospace
D. -ignore-space
026 - What information can the lspci command display about the system hardware?
(Choose
THREE correct answers.)
**A. Device IRQ settings
**B. PCI bus speed
C. System battery type
**D. Device vendor identification
E. Ethernet MAC address
027 - Which Debian package management tool asks the configuration questions for a
specific already
installed package just as if the package were being installed for the first time?
(Specify ONLY the command without any path or parameters.)
Answer: dpkg-reconfigure
028 - Which of the following commands will print the last 10 lines of a text file
to the standard output?
A. cat -n 10 filename
B. dump -n 10 filename
C. head -n 10 filename
**D. tail -n 10 filename
029 - Which of the following commands moves and resumes in the background the last
stopped shell job?
A. run
**B. bg
C. fg
D. back
030 - Which of the following commands will print important system information such
as the kernel
version and machine hardware architecture?
A. sysinfo
**B. uname
C. lspci
D. arch
E. info
031 - Which of the following statements describes a difference between GNU GRUB
Legacy and GRUB 2?
A. GRUB 2 no longer requires a configuration file.
**B. Partition numbers start at 0 in GRUB Legacy and 1 in GRUB 2.
C. grub-mkconfigonly works with GRUB Legacy if the–version 1option is used.
D. The configuration filemenu.lst(andgrub.conf) have been replaced withgrub.config.
033 - In order to display all currently mounted filesystems, which of the following
commands could
be used? (Choose TWO correct answers.)
**A. cat /proc/self/mounts
B. free
**C. mount
D. lsmounts
E. cat /proc/filesystems
034 - In the vi editor, how can commands such as moving the cursor or copying lines
into the buffer be issued multiple times or applied to multiple rows?
A. By using the command :repeat followed by the number and the command.
**B. By specifying the number right in front of a command such as 4l or 2yj.
C. By selecting all affected lines using the shift and cursor keys before applying
the command.
D. By issuing a command such as :set repetition=4 which repeats every
subsequentcommand 4 times.
035 - Which of the following commands will write a message to the terminals of all
logged in users?
A. bcast
B. mesg
C. print
**D. wall
E. yell
036 - Which of the following files, located in the user home directory, is used to
store the Bash history?
**A. .bash_history
B. .bash_histfile
C. .history
D. .bashrc_history
E. .history_bash
038 - Which command will disable swapping on a device? (Specify ONLY the command
without any path or parameters.)
Answer: swapoff, /sbin/swapoff
039 - Which of the following statements is correct when talking about /proc/?
A. All changes to files in /proc/ are stored in /etc/proc.d/ and restored on
reboot.
B. All files within /proc/ are read-only and their contents cannot be changed.
**C. All changes to files in /proc/ are immediately recognized by the kernel.
D. All files within /proc/ are only readable by the root user.
041 - Which of the following commands will send output from the program myapp to
both standard output
(stdout) and the file file1.log?
A. cat < myapp | cat > file1.log
B. myapp 0>&1 | cat > file1.log
C. myapp | cat > file1.log
**D. myapp | tee file1.log
E. tee myapp file1.log
042 - In a nested directory structure, which find command line option would be used
to restrict the
command to searching down a particular number of subdirectories?
A. -dirmax
**B. -maxdepth
C. -maxlevels
D. -n
E. -s
043 - In compliance with the FHS, in which of the directories are man pages found?
**A. /usr/share/man
B. /opt/man
C. /usr/doc/
D. /var/pkg/man
E. /var/man
044 - Which of the following commands will change all CR-LF pairs in an imported
text file,
userlist.txt, to Linux standard LF characters and store it as newlist.txt?
A. tr ‘\\r\\n’ ” < userlist.txt > newlist.txt
B. tr -c ‘\\n\\r’ ” < newlist.txt > userlist.txt
**C. tr -d ‘\\r’ < userlist.txt > newlist.txt
D. tr ‘\\r’ ‘\\n’ userlist.txt newlist.txt
E. tr -s ‘^M’ ‘^J’ userlist.txt newlist.txt
045 - What happens after issuing the command vi without any additional parameters?
A. vi starts and loads the last file used andmoves the cursor to the position where
vi was when it last exited.
B. vi starts and requires the user to explicitly either create a new or load an
existing file.
C. vi exits with an error message as it cannot be invoked without a file name to
operate on.
**D. vi starts in command mode and opens a new empty file.
E. vi starts and opens a new file which is filled with the content of the vi buffer
if the buffer contains text.
047 - Which of the following shell redirections will write standard output and
standard error output to a file named filename?
A. 2>&1 >filename
**B. >filename 2>&1
C. 1>&2>filename
D. >>filename
E. 1&2>filename
048 - Which of the following environment variables overrides or extends the list of
directories holding shared libraries?
A. LD_LOAD_PATH
B. LD_LIB_PATH
**C. LD_LIBRARY_PATH
D. LD_SHARE_PATH
E. LD_RUN_PATH
050 - Which SysV init configuration file should be modified to disable the ctrl-
alt-delete key combination?
A. /etc/keys
B. /proc/keys
**C. /etc/inittab
D. /proc/inittab
E. /etc/reboot
051 - What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct
answers.)
A. To create RAID 9 arrays.
**B. To dynamically change the size of logical volumes.
C. To encrypt logical volumes.
**D. To create snapshots.
**E. To dynamically create or delete logical volumes.
052 - Which of the following commands can be used to create a new file that is
100kB in size?
**A. dd
B. file
C. mkfile
D. touch
053 - In the vi editor, what vi command will copy (but not paste) from the current
line at the cursor and the
following 16 lines (17 lines total)? Specify the correct vi command without spaces.
Answer: 17yy
055 - What is the process ID number of the init process on a SysV init based
system?
A. -1
B. 0
**C. 1
D. It is different with each reboot.
E. It is set to the current run level.
056 - When starting a program with the nice command without any additional
parameters, which
nice level is set for the resulting process?
A. -10
B. 0
**C. 10
D. 20
057 - Which signal is missing from the following command that is commonly used to
instruct a daemon to
reinitialize itself, including reading configuration files? killall -s _______
daemon
Answer: HUP, SIGHUP, 1
058 - Which of the following commands reboots the system when using SysV init?
(Choose TWO correct answers.)
**A. shutdown -r now
B. shutdown -r “rebooting”
**C. telinit 6
D. telinit 0
E. shutdown -k now “rebooting”
060 - What is the output of the following command? echo “Hello World” | tr -d aieou
A. Hello World
B. eoo
**C. Hll Wrld
D. eoo Hll Wrld
061 - Which of the following are filesystems which can be used on Linux root
partitions? (Choose two.)
A. NTFS
**B. ext3
C. XFS
D. VFAT
**E. swap
064 - Which of the following commands print the current working directory when
using a Bash shell? (Choose two.)
**A. echo “${PWD}”
B. echo “${WD}”
**C. pwd
D. printwd
E. echo “${pwd}”
065 - Which of the following commands displays the contents of a gzip compressed
tar archive?
A. gzip archive.tgz | tar xvf –
**B. tar ztf archive.tgz
C. gzip -d archive.tgz | tar tvf –
D. tar cf archive.tgz
066 - Which of the following commands kills the process with the PID 123 but allows
the process to “clean up” before exiting?
A. kill -PIPE 123
B. kill -KILL 123
C. kill -STOP 123
**D. kill -TERM 123
068 - Which of the following command sets the Bash variable named TEST with the
content FOO?
A. set TEST=”FOO”
B. TEST = “FOO”
C. var TEST=”FOO”
**D. TEST=”FOO”
069 - Which command shows all shared libraries required by a binary executable or
another shared library?
(Specify ONLY the command without any path or parameters.)
Answer: ldd
070 - What is the first program that is usually started, at boot time, by the Linux
kernel when using SysV init?
A. /lib/init.so
**B. /sbin/init
C. /etc/rc.d/rcinit
D. /proc/sys/kernel/init
E. /boot/init
072 - During a system boot cycle, what program is executed after the BIOS completes
its tasks?
**A. The bootloader
B. The inetd program
C. The init program
D. The kernel
073 - Which command displays a list of all background tasks running in the current
shell?
(Specify ONLY the command without any path or parameters.)
Answer: jobs
074 - Which of the following commands can be used to download the RPM package
kernel without installing it?
A. yum download –no-install kernel
**B. yumdownloader kernel
C. rpm –download –package kernel
D. rpmdownload kernel
076 - Which of the following commands changes the number of days before the ext3
filesystem on
/dev/sda1 has to run through a full filesystem check while booting?
A. tune2fs -d 200 /dev/sda1
B. tune2fs -c 200 /dev/sda1
**C. tune2fs -i 200 /dev/sda1
D. tune2fs -n 200 /dev/sda1
E. tune2fs –days 200 /dev/sda1
077 - What is the difference between the i and a commands of the vi editor?
A. i (interactive) requires the user to explicitly switch between vi modes whereas
a (automatic) switches modesautomatically.
**B. i (insert) inserts text before the current cursor position whereas a (append)
inserts text after the cursor.
C. i (independent rows) starts every new line at the first character whereas a
(aligned rows) keeps the indentation of the previous line.
D. i (interrupt) temporarily suspends editing of a file to the background whereas a
(abort) terminates editing.
078 - Which file should be edited to select the network locations from which Debian
installation package files are loaded?
A. /etc/dpkg/dpkg.cfg
B. /etc/apt/apt.conf
C. /etc/apt/apt.conf.d
**D. /etc/apt/sources.list
E. /etc/dpkg/dselect.cfg
079 - Which chown command will change the ownership to dave and the group to staff
on a file named data.txt?
A. chown dave/staff data.txt
B. chown -u dave -g staff data.txt
C. chown –user dave –group staff data.txt
**D. chown dave:staff data.txt
080 - Which of the following commands can be used to locate programs and their
corresponding man pages and configuration files?
A. dirname
B. which
C. basename
D. query
**E. whereis
081 - Which of the following commands is used to change options and positional
parameters for a running Bash?
A. history
**B. set
C. bashconf
D. setsh
E. envsetup
083 - Pressing the Ctrl-C combination on the keyboard while a command is executing
in the foreground sends which of the following signal codes?
A. 1(SIGHUP)
**B. 2(SIGINT)
C. 3(SIGQUIT)
D. 9(SIGKILL)
E. 15(SIGTERM)
084 - What command will generate a list of user names from /etc/passwd along with
their login shell?
A. column -s : 1,7 /etc/passwd
B. chop -c 1,7 /etc/passwd
C. colrm 1,7 /etc/passwd
**D. cut -d: -f1,7 /etc/passwd
085 - Which command is used to create and initialize the files used to store quota
information?
(Specify ONLY the command without any path or parameters.)
Answer: quotacheck
086 - What does the command grub-install /dev/sda do?
A. GRUB creates partitions on the device/dev/sdato be used with Linux.
B. GRUB sets the default BIOS boot device to/dev/sda.
**C. GRUB installs all required files and configures the boot loader on
device/dev/sda.
D. GRUB recompiles the Linux Kernel and installs it on the Master Boot Record of
device/dev/sda.
088 - After successfully creating a hard link called bar to the ordinary file foo,
foo is deleted from the filesystem.
Which of the following describes the resulting situation?
A. foo and bar would both be removed.
**B. foo would be removed while bar would remain accessible.
C. foo would be removed. bar would still exist but would be unusable.
D. Both foo and bar would remain accessible.
E. The user is prompted whether bar should be removed, too.
089 - What is the default action of the split command on an input file?
A. It will break the file into new files of 1,024 byte pieces each.
**B. It will break the file into new files of 1,000 line pieces each.
C. It will break the file into new files of 1,024 kilobyte pieces each.
D. It will break the file into new files that are no morethan 5% of the size of the
original file.
090 - Which of the following commands lists the dependencies of a given dpkg
package?
A. apt-cache depends-onpackage
B. apt-cache dependencies package
**C. apt-cache depends package
D. apt-cache requires package
091 - What is the effect of the egrep command when the -v option is used?
A. It enables color to highlight matching parts.
**B. It only outputs non-matching lines.
C. It shows the command’s version information.
D. It changes the output order showing the last matching line first.
092 - Which command will display messages from the kernel that were output during
the normal boot sequence?
Answer: dmesg, /bin/dmesg
094 - Which RPM command will output the name of the package which supplied the file
/etc/exports?
A. rpm -F /etc/exports
**B. rpm -qf /etc/exports
C. rpm -Kl /etc/exports
D. rpm -qp /etc/exports
E. rpm -qi/etc/exports
095 - Which of the following kernel parameters instructs the kernel to suppress
most boot messages?
A. silent
B. verbose=0
C. nomesg
**D. quiet
096 - Which command is used to start another command with a given nice level?
(Specify ONLY the command without any path or parameters.)
Answer: nice
097 - Which of the following commands updates the linker cache of shared libraries?
A. mkcache
B. soconfig
C. mkldconfig
D. lddconfig
**E. ldconfig
101 - Which of the following commands is used to modify quota settings? (Choose
two.)
A. editquota
**B. setquota
**C. edquota
D. quotaedit
E. quotaset
102 - Which of the following options is used in a GRUB Legacy configuration file to
define the amount of time
that the GRUB menu will be shown to the user?
A. hidemenu
B. splash
**C. timeout
D. showmenu
103 - What is the purpose of the Filesystem Hierarchy Standard?
A. It is a security model used to ensurefiles are organized according to their
permissions and accessibility.
B. It provides unified tools to create, maintain and manage multiple filesystems in
a common way.
C. It defines a common internal structure of inodes for all compliant filesystems.
**D. It is a distribution neutral description of locations of files and
directories.
104 - Which of the following settings for umask ensures that new files have the
default permissions -rw-r—– ?
A. 0017
B. 0640
C. 0038
**D. 0027
105 - Which file in the /proc filesystem lists parameters passed from the
bootloader to the kernel?
(Specify the file name only without any path.)
Answer: cmdline, /proc/cmdline
106 - From a Bash shell, which of the following commands directly executes the
instruction from the
file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO
answers.)
**A. source /usr/local/bin/runme.sh
**B. . /usr/local/bin/runme.sh
C. /bin/bash /usr/local/bin/runme.sh
D. /usr/local/bin/runme.sh
E. run /usr/local/bin/runme.sh
107 - Which of the following commands enables the setuid (suid) permission on the
executable /bin/foo?
A. chmod 1755 /bin/foo
**B. chmod 4755 /bin/foo
C. chmod u-s /bin/foo
D. chmod 755+s /bin/foo
109 - Which of the following commands converts spaces in a file to tab characters
and prints the
result to standard output?
A. iconv
B. expand
**C. unexpand
D. tab
110 - In compliance with the FHS, in which of the following directories are
documentation files found?
A. /usr/share/documentation
B. /usr/local/share/documentation
**C. /var/share/doc
D. /usr/share/doc
E. /etc/share/doc
111 - How can the list of files that would be installed by the RPM package file
apache-xml.rpm be previewed?
A. rpm -qp apache-xml.rpm
B. rpm -qv apache-xml.rpm
C. rpm -ql apache-xml.rpm
**D. rpm -qpl apache-xml.rpm
112 - When planning a partition scheme, which of the following directories could be
considered for
separate partitions? (Choose three.)
A. /etc
**B. /home
**C. /var
D. /lib
**E. /opt
113 - Which of the following signals is sent to a process when the key combination
CTRL+C is
pressed on the keyboard?
A. SIGTERM
**B. SIGINT
C. SIGSTOP
D. SIGKILL
114 - Which of the following commands will reduce all consecutive spaces down to a
single space?
A. tr ‘\\s’ ‘ ‘ < a.txt > b.txt
B. tr -c ‘ ‘ < a.txt > b.txt
C. tr -d ‘ ‘ < a.txt > b.txt
D. tr -r ‘ ‘ ‘\\n’ < a.txt > b.txt
**E. tr -s ‘ ‘ < a.txt > b.txt
115 - After running the command umount /mnt, the following error message is
displayed:
umount: /mnt: device is busy.
What is a common reason for this message?
A. The kernel has not finished flushing disk writes to themounted device.
**B. A user has a file open in the /mnt directory.
C. Another file system still contains a symlink to a file inside /mnt.
D. The files in /mnt have been scanned and added to the locate database.
E. The kernel thinks that a process is about toopen a file in /mnt for reading.
116 - What do the permissions -rwSr-xr-x mean for a binary file when it is executed
as a command?
A. The command is SetUID and it will be executed with the effective rights of the
owner.
B. The command will be executed with the effective rights of the group instead of
the owner.
**C. The execute flag is not set for the owner. Therefore the SetUID flag is
ignored.
D. The command will be executed with the effective rights of the owner and group.
118 - Which of the following commands determines the type of a file by using a
definition database
file which contains information about all common file types?
A. magic
B. type
**C. file
D. pmagic
E. hash
119 - Which of the following characters can be combined with a separator string in
order to read
from the current input source until the separator string, which is on a separate
line and without any
trailing spaces, is reached?
**A. <<
B. <|
C. !<
D. &<
120 - Which of the following commands will NOT update the modify timestamp on the
file
/tmp/myfile.txt?
**A. file /tmp/myfile.txt
B. echo “Hello” >/tmp/myfile.txt
C. sed -ie “s/1/2/” /tmp/myfile.txt
D. echo -n “Hello” >>/tmp/myfile.txt
E. touch /tmp/myfile.txt
121 - What of the following statements are true regarding /dev/ when using udev?
(Choose TWO
correct answers.)
A. Entries for all possible devices get created on boot even if those devices are
not connected.
**B. Additional rules for udev can be created by adding them to /etc/udev/rules.d/.
C. When using udev, it is not possible to create block orcharacter devices in /dev/
using mknod.
**D. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev
during system startup.
E. The content of /dev/ is stored in /etc/udev/dev and is restored during system
startup.
122 - Which of the following commands lists all currently installed packages when
using RPM
package management?
A. yum –query –all
B. yum –list –installed
**C. rpm –query –all
D. rpm –list -installed
123 - When removing a package, which of the following dpkg options will completely
remove the
files including configuration files?
A. –clean
B. –delete
**C. –purge
D. -remove
124 - Which of the following statements is correct for a command line ending with a
& character?
A. The command’s output is redirected to/dev/null.
B. The result of the command defines if the next command will be run.
**C. The command is run in background of the current shell.
D. The command is run as a direct child of theinitprocess.
125 - Which function key is used to start Safe Mode in Windows NT?
A. F10
B. F8
C. F6
**D. Windows NT does not support Safe Mode
126 - When in Normal mode invi, which character can be used to begin a reverse
search of the text?
**A. ?
B. /
C. F
D. r
128 - After modifying GNU GRUB’s configuration file, which command must be run for
the changes
to take effect?
A. kill -HUP $(pidof grub)
B. grub-install
C. grub
**D. No action is required
130 - Which of the following commands is used to update the list of available
packages when using
dpkg based package management?
**A. apt-get update
B. apt-get upgrade
C. apt-cache update
D. apt-get refresh
E. apt-cache upgrade
131 - Which run levels should never be declared as the default run level when using
SysV init?
(Choose TWO correct answers.)
**A. 0
B. 1
C. 3
D. 5
**E. 6
132 - Which of the following commands set the sticky bit for the directory /tmp?
(Choose TWO
correct answers.)
A. chmod +s /tmp
**B. chmod +t /tmp
**C. chmod 1775 /tmp
D. chmod 4775 /tmp
E. chmod 2775 /tmp
133 - Which of the following are modes of the vi editor? (Choose two.)
A. edit mode
**B. insert mode
C. change mode
D. review mode
**E. command mode
134 - Which of the following commands can be used to search for the executable file
foo when it
has been placed in a directory not included in $PATH?
A. apropos
B. which
**C. find
D. query
E. whereis
135 - Which command will uninstall a package but leave its configuration files in
case the package is
re-installed?
A. dpkg -s pkgname
B. dpkg -L pkgname
C. dpkg -P pkgname
**D. dpkg -r pkgname
136 - Which of the following commands prints a list of usernames (first column) and
their primary
group (fourth column) from the /etc/passwd file?
A. fmt -f 1,4 /etc/passwd
B. split -c 1,4 /etc/passwd
**C. cut -d : -f 1,4 /etc/passwd
D. paste -f 1,4 /etc/passwd
137 - Which of the following commands makes /bin/foo executable by everyone but
writable only
by its owner?
**A. chmod u=rwx,go=rx /bin/foo
B. chmod o+rwx,a+rx /bin/foo
C. chmod 577 /bin/foo
D. chmod 775 /bin/foo
138 - Which of the following apt-get commands will install the newest versions of
all currently
installed packages?
A. auto-update
B. full-upgrade
**C. dist-upgrade
D. install
E. update
139 - Which Bash environment variable defines in which file the user history is
stored when exiting a
Bash process? (Specify ONLY the variable name.)
Answer: HISTFILE
140 - Which of the following commands brings a system running SysV init into a
state in which it is
safe to perform maintenance tasks? (Choose TWO correct answers.)
A. shutdown -R 1 now
B. shutdown -single now
**C. init 1
**D. telinit 1
E. runlevel 1
141 - Which utility would be used to change how often a filesystem check is
performed on an ext2
filesystem without losing any data stored on that filesystem?
A. mod2fs
B. fsck
**C. tune2fs
D. mke2fs
E. fixe2fs
142 - Which of the following commands are common Linux commands for file
management?
(Choose three correct answers.)
A. copy
**B. mv
C. move
**D. cp
**E. mkdir
143 - Which of the following partition types is used for Linux swap spaces when
partitioning hard
disk drives?
**A. 82
B. 83
C. 8e
D. fd
E. 7
144 - What is the default nice level when a process is started using the nice
command?
A. -10
**B. 10
C. 20
D. 0
145 - Which of the following are valid stream redirection operators within Bash?
(Choose THREE
correct answers.)
**A. <
**B. <<<
**C. >
D. >>>
E. %>
146 - Which of the following commands can be used to create a USB storage media
from a disk
image?
A. gdisk
**B. dd
C. cc
D. fdisk
E. mount
147 - Which command creates a swap space on a block device or a file? (Specify ONLY
the command
without any path or parameters.)
Answer: mkswap
148 - Which file in /proc describes the IRQs that are used by various kernel
drivers? (Specify the file name
only without any path.)
Answer: interrupts
149 - Which permissions and ownership should the file /etc/passwd have?
A. -rw——-1 rootroot531 Jun 5 22:45 /etc/passwd
**B. -rw-r–r–1 rootroot531 Jun 5 22:45 /etc/passwd
C. -rw-r–r–1 11531 Jun 5 22:45 /etc/passwd
D. -rw——-1 11531 Jun 5 22:45 /etc/passwd
150 - Which of the following shell commands makes the already defined variable TEST
visible to new
child processes? (Choose two.)
A. visible TEST
B. declare +x TEST
**C. declare -x TEST
**D. export TEST
E. export -v TEST
151 - Which of the following is correct when talking about mount points?
**A. Every existing directory can be used as a mount point.
B. Only empty directories can be used as a mount point.
C. Directories need to have the SetUID flag set to be used as a mount point.
D. Files within a directory are deleted when the directory is used as a mount
point.
152 - Which of the following options for the kernel’s command line changes the
systemd boot target
to rescue.target instead of the default target?
A. systemd.target=rescue.target
B. systemd.runlevel=rescue.target
C. systemd.service=rescue.target
D. systemd.default=rescue.target
**E. systemd.unit=rescue.target
153 - Which of the following commands changes the ownership of file.txt to the user
dan and the group staff?
A. chown dan/staff file.txt
**B. chown dan:staff file.txt
C. chown -u dan -g staff file.txt
D. chown dan -g staff file.txt
154 - After moving data to a new filesystem, how can the former path of the data be
kept intact in
order to avoid reconfiguration of existing applications? (Choose TWO correct
answers.)
A. By creating an ACL redirection from the old to the new path of the data.
B. By creatinga hard link from the old to the new path of the data.
**C. By creating a symbolic link from the old to the new path of the data.
D. By running the command touch on the old path.
**E. By mounting the new filesystem on the original path of the data.
155 - A user accidentally created the subdirectory \\dir in his home directory.
Which of the following
commands will remove that directory?
A. rmdir ‘~/\\dir’
B. rmdir “~/\\dir”
C. rmdir ~/’dir’
D. rmdir ~/\\dir
**E. rmdir ~/\\\\dir
156 - Which of the following commands will display the inode usage of each mounted
filesystem?
A. du -i
**B. df -i
C. lsfs -i
D. printfs -i
157 - Which of the following commands prints a list of available package updates
when using
RPM-based package management?
A. dpkg list
B. yum list
C. dpkg check-update
**D. yum check-update
E. yum list-update
158 - Which type of filesystem is created by mkfs when it is executed with the
block device name
only and without any additional parameters?
**A. ext2
B. ext3
C. ext4
D. XFS
E. VFAT
160 - What is the name of the main configuration file for GNU GRUB? (Specify the
file name only without any path.)
Answer: menu.lst, grub.conf, grub.cfg
161 - Which command is used to query information about the available packages on a
Debian system?
**A. apt-cache
B. apt-get
C. apt-search
D. dpkg
E. dpkg-search
162 - Which of the following commands can be used to determine how long the system
has been
running? (Choose TWO correct answers.)
**A. uptime
B. up
**C. top
D. uname -u
E. time -up
163 - When using rpm –verify to check files created during the installation of RPM
packages, which
of the following information is taken into consideration? (Choose THREE correct
answers.)
**A. Timestamps
**B. MD5 checksums
C. Inodes
**D. File sizes
E. GnuPG signatures
164 - In the vi editor, which of the following commands will copy the current line
into the vi buffer?
A. c
B. cc
C. 1c
**D. yy
E. 1y
165 - Following the Filesystem Hierarchy Standard (FHS), where should binaries that
have been compiled
by the system administrator be placed in order to be made available to all users on
the system?
Answer: /usr/local/bin/
166 - Which of the following commands overwrites the bootloader located on /dev/sda
without
overwriting the partition table or any data following it?
A. dd if=/dev/zero of=/dev/sda bs=512
B. dd if=/dev/zero of=/dev/sda bs=512 count=1
**C.dd if=/dev/zero of=/dev/sda bs=440 count=1
D. dd if=/dev/zero of=/dev/sda bs=440
166 - Which command reads and displays the current contents of the Kernel Ring
Buffer on the command
line? (Specify ONLY the command without any path or parameters.)
Answer: dmesg
167 - Which command reads and displays the current contents of the Kernel Ring
Buffer on the command
line? (Specify ONLY the command without any path or parameters.)
Answer: dmesg
170 - Which of the following examples for Bash file globbing matches a file named
root-can-dothis.txt when used in the directory holding that file? (Choose three
correct answers.)
**A. root*can?do-this.{txt,odt}
B. r[oOoO]t-can-do*.txt
**C. {root,user,admin}-can-??-this.txt
D. root*can*do??this.txt
**E. root***{can,may}-do-this.[tT][xX][tT]
171 - Which of the following is true for hard linked files? (Choose three.)
A. The output ofstatwill reporthardinstead ofregular file.
**B. The hard linked files have the same permissions and owner.
**C. The hard linked files share the same inode.
D. The hard linked files are indicated by a -> when listed withls -1.
**E. The hard linked files must be on the same filesystem.
172 - Which grep command will print only the lines that do not end with a / in the
file foo?
A. grep’/$’ foo
B. grep ‘/#’ foo
**C. grep -v ‘/$’ foo
D. grep -v ‘/#’ foo
173 - Immediately after deleting 3 lines of text in vi and moving the cursor to a
different line, which
single character command will insert the deleted content below the current line?
A. i (lowercase)
B. P (uppercase)
**C. p (lowercase)
D. U (uppercase)
E. u (lowercase)
174 - Which option to the yum command will update the entire system? (Specify ONLY
the option name
without any additional parameters.)
Answer: update, upgrade
175 - Which of the following commands replaces each occurrence of ‘bob’ in the file
letter with
‘Bob’ and writes the result to the file newletter?
A. sed ‘/bob/Bob’ letter > newletter
B. sed s/bob/Bob/ letter < newletter
C. sed’s/bob/Bob’ letter > newletter
**D. sed ‘s/bob/Bob/g’ letter > newletter
E. sed ‘s/bob, Bob/’ letter > newletter
176 - Which of the following commands shows the definition of a given shell
command?
A. where
B. stat
**C. type
D. case
177 - Which SysV init configuration file is commonly used to set the default run
level? (Specify the full
name of the file, including path.)
Answer: inittab
178 - Which of the following commands changes all occurrences of the word “bob” in
file data to
“Bob” and prints the result to standard output?
A. sed’/bob/Bob’ data
**B. sed’s/bob/Bob/g’ data
C. sed’s/bob/Bob/’ data
D. sed’/bob/Bob/’ data
E. sed’s/bob,Bob/’ data
179 - Which of the following sequences in the vi editor saves the opened document
and exits the
editor? (Choose TWO correct answers.)
**A. esc ZZ
B. ctrl :w!
C. esc zz
**D. esc :wq!
E. ctrl XX
182 - Which of the following statements are true about the boot sequence of a PC
using a BIOS? (Choose two.)
**A. Some parts of the boot process can be configured from the BIOS
B. Linux does not require the assistance of the BIOS to boot a computer
C. The BIOS boot process starts only if secondary storage, such as the hard disk,
is functional
**D. The BIOS initiates the boot process after turning the computer on
E. The BIOS is started by loading hardware drivers from secondary storage, such as
the hard disk
184 - What is the process ID number of the init process on a System V init based
system?
A. -1
B. 0
**C. 1
D. It is different with each reboot
E. It is set to the current run level
185 - In compliance with the FHS, in which of the directories are man pages found?
A. /opt/man/
B. /usr/doc/
**C. /usr/share/man/
D. /var/pkg/man
E. /var/man/
186 - When considering the use of hard links, what are valid reasons not to use
hard links?
**A. Hard links are not available on all Linux systems because traditional
filesystems, such as ext4, do not support them
B. Each hard link has individual ownership, permissions and ACLs which can lead to
unintended disclosure of file content
C. Hard links are specific to one filesystem and cannot point to files on another
filesystem
D. If users other than root should be able to create hard links, suln has to be
installed and configured
E. When a hard linked file is changed, a copy of the file is created and consumes
additional space
187 - Which chown command changes the ownership to dave and the group to staff on a
file named data.txt?
A. chown dave/staff data.txt
B. chown –u dave –g staff data.txt
C. chown –user dave –group staff data.txt
D. chown dave+staff data.txt
**E. chown dave:staff data.txt
188 - In order to display all currently mounted filesystems, which of the following
commands could be used? (Choose two.)
**A. cat /proc/self/mounts
B. free
C. lsmounts
**D. mount
E. cat /proc/filesystems
192 - Which is the default percentage of reserved space for the root user on new
ext4 filesystems?
A. 10%
B. 3%
C. 15%
D. 0%
**E. 5%
193 - Which of the following commands changes the number of days before the ext3
filesystem on /dev/sda1 has to run through a full filesystem check while booting?
A. tune2fs –d 200 /dev/sda1
**B. tune2fs –i 200 /dev/sda1
C. tune2fs –c 200 /dev/sda1
D. tune2fs –n 200 /dev/sda1
E. tune2fs –days 200 /dev/sda1
194 - Which umask value ensures that new directories can be read, written and
listed by their owning user, read and listed by their owning group and are not
accessible at all for everyone else?
A. 0750
**B. 0027
C. 0036
D. 7640
E. 0029
195 - Which type of file system is created by mkfs when it is executed with the
block device name only and without any additional parameters?
A. XFS
B. VFAT
**C. ext2
D. ext3
E. ext4