Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?
chmod 577 /bin/foo
chmod o+rwx,a+rx /bin/foo
chmod 775 /bin/foo
chmod u=rwx,go=rx /bin/foo
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?
whereis
which
apropos
query
find
Which grep command will print only the lines that do not end with a / in the file foo?
grep '/#' foo
grep -v '/#' foo
grep -v '/$' foo
grep'/$' foo
What is the first program the Linux kernel starts at boot time when using System V init?
/lib/init.so
/sbin/init
/etc/rc.d/rcinit
/proc/sys/kernel/init
/boot/init
Which of the following statements describes a difference between GNU GRUB Legacy and GRUB 2?
Grub-mkconfig only works with GRUB Legacy if the --version 1 option is used.
Partition numbers start at 0 in GRUB Legacy and 1 in GRUB 2.
GRUB 2 no longer requires a configuration file.
The configuration file menu.lst (and grub.conf) have been replaced with grub.config.
Typically, which top level system directory is used for files and data that change regularly while the system is running and are to be kept between reboots? (Specify only the top level directory)
Which variable defines the directories in which a Bash shell searches for executable commands?
PATHRC
BASHEXEC
PATH
EXECPATH
BASHRC
Which of the following examples for Bash file globbing matches a file named root-can-do-this.txt when used in the directory holding that file? (Choose three correct answers.)
Which of the following files, located in a user's home directory, contains the Bash history?
.history
.bashrc_history
.history_bash
.bash_histfile
.bash_history
When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces?
-ignore-space
-rep-space
-nospace
-print0
-printnul
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?
tr -s '^M' '^J' userlist.txt newlist.txt
tr '\r\n' '' < userlist.txt > newlist.txt
tr -d '\r' < userlist.txt > newlist.txt
tr -c '\n\r' '' < newlist.txt > userlist.txt
tr '\r' '\n' userlist.txt newlist.txt
What is true regarding UEFI firmware? (Choose two.)
Which command shows all shared libraries required by a binary executable or another shared llibrary? (Specify ONLY the command without any path or parameters.)
Which of the following statements is correct regarding the command foo 1> bar?
The stderr from the command foo is saved to the file bar.
The stdout from the command foo overwrites the file bar.
The stdout from the command foo is appended to the file bar.
The command foo receives its stdin from the stdout of the command bar.
The command foo receives its stdin from the file bar.
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.)
Which of the following commands changes the ownership of file.txt to the user dan and the group staff?
chown dan -g staff file.txt
chown dan/staff file.txt
chown -u dan -g staff file.txt
chown dan:staff file.txt
Which of the following commands displays the output of the foo command on the screen and also writes it to a file called /tmp/foodata?
foo | less /tmp/foodata
foo | cp /tmp/foodata
foo > stdout >> /tmp/foodata
foo > /tmp/foodata
foo | tee /tmp/foodata
Which command displays the current disk space usage for all mounted file systems? (Specify ONLY the command without any path or parameters.)
Which of the following command sets the Bash variable named TEST with the content FOO?
set TEST="FOO"
var TEST="FOO"
TEST="FOO"
TEST = "FOO"
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
/proc/keys
/etc/inittab
/etc/keys
/proc/inittab
/etc/reboot
What is the purpose of the Filesystem Hierarchy Standard?
It provides unified tools to create, maintain and manage multiple filesystems in a common way.
It defines a common internal structure of inodes for all compliant filesystems.
Itis a distribution neutral description of locations of files and directories.
It is a security model used to ensurefiles are organized according to their permissions and accessibility.
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
/sbin/init
/proc/sys/kernel/init
/etc/rc.d/rcinit
/boot/init
/lib/init.so
Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?
tr -d '\r' < userlist.txt > newlist.txt
tr '\r\n' '' newlist.txt
tr -s '/^M/^J/' userlist.txt newlist.txt
tr -c '\n\r' '' userlist.txt
tr '\r' '\n' userlist.txt newlist.txt
A Debian package creates several files during its installation. Which of the following commands searches for packages owning the file /etc/debian_version?
find /etc/debian_version -dpkg
apt -r /etc/debian_version
apt-file /etc/debian_version
dpkg -S /etc/debian_version
apt-get search /etc/debian_version
How many fields are in a syntactically correct line of /etc/fstab?
3
5
7
4
6
Which of the following commands changes all occurrences of the word "bob" in file data to "Bob" and prints the result to standard output?
sed 's/bob,Bob/' data
sed 's/bob/Bob/g' data
sed '/bob/Bob' data
sed '/bob/Bob/' data
sed 's/bob/Bob/' data
Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose TWO correct answers.)
Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)
The dpkg-____ command will ask configuration questions for a specified package, just as if the package were being installed for the first time.
Which daemon handles power management events on a Linux system?
batteryd
psd
pwrmgntd
inetd
acpid
What is the default action of the split command on an input file?
It will break the file into new files of 1,000 line pieces each.
It will break the file into new files of 1,024 byte pieces each.
It will break the file into new files that are no morethan 5% of the size of the original file.
It will break the file into new files of 1,024 kilobyte pieces each.
What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?
9
49
99
19
Which file should be edited to select the network locations from which Debian installation package files are loaded?
/etc/apt/apt.conf
/etc/apt/sources.list
/etc/dpkg/dselect.cfg
/etc/apt/apt.conf.d
/etc/dpkg/dpkg.cfg
Which of the following statements is correct for a command line ending with a & character?
The result of the command defines if the next command will be run.
The command's output is redirected to/dev/null.
The command is run in background of the current shell.
The command is run as a direct child of the init process.
Which of the following apt-get subcommands installs the newest versions of all currently installed packages?
dist-upgrade
install
auto-update
full-upgrade
update
When using regular expressions, which of the following characters match the beginning of a line?
?
^
+
$
*
How is a symbolic link called bar.conf pointing to foo.conf created?
ln foo.conf bar.conf
ln -s bar.conf foo.conf
ln -s foo.conf bar.conf
ln bar.conffoo.conf
Which of the following commands can be used to display the inode number of a given file?
inode
ln
ls
cp
What is the difference between the --remove and the --purge action with the dpkg command?
--remove removes the program, --purge also removes the config files
--remove only removes the program, --purge only removes the config files
--remove removes a package, --purge also removes all packages dependent on it
--remove removes only the package file itself, --purge removes all files related to the package
You suspect that a new ethernet card might be conflicting with another device. Which file should you check within the /proc tree to learn which IRQs are being used by which kernel drivers?
During a system boot cycle, what program is executed after the BIOS completes its tasks?
The inetd program
The kernel
The init program
The bootloader
To what environment variable will you assign or append a value if you need to tell the dynamic linker to look in a build directory for some of a program's shared libraries?
LD_SHARE_PATH
LD_LOAD_PATH
LD_RUN_PATH
LD_LIBRARY_PATH
LD_LIB_PATH
Which of the following shell redirections will write standard output and standard error output to a file named filename?
>filename 2>&1
1&2>filename
>>filename
2>&1 >filename
1>&2>filename
In Bash, inserting 1>&2 after a command redirects
standard output to standard error.
standard input to standard error.
standard error to standard output.
standard output to standard input.
standard error to standard input.
Which of the following command lines creates or, in case it already exists, overwrites a file called data with the output of ls? (Choose TWO correct answers.)
When in Normal mode in vi, which character can be used to begin a reverse search of the text?
?
F
r
/
Which of the following commands prints a list of available package updates when using RPM-based package management?
yum list-update
dpkg list
yum list
yum check-update
dpkg check-update
Which of the following commands will print important system information such as the kernel version and machine hardware architecture?
uname
lspci
sysinfo
arch
info
During a system boot cycle, what is the program that is run after the BIOS completes its tasks?
The bootloader
The inetd program
The init program
The kernel
Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct?
/usr/bin/prog is executed with a nice level of 5.
/usr/bin/prog is executed with a nice level of -5.
/usr/bin/prog is executed with a priority of -5.
/usr/bin/prog is executed with a priority of 5.
Which of the following commands can be used to create a new file that is 100kB in size?
touch
file
dd
mkfile
What does the + symbol mean in the following grep regular expression: grep '^d[aei]\+d$' /usr/share/dict/words
Match the preceding character set ([aei]) zero or more times.
Match the preceding character set ([aei]) zero or one times.
Match a literal + symbol.
Match the preceding character set ([aei]) one or more times.
Which of the following settings for umask ensures that new files have the default permissions -rw-r----- ?
0017
0640
0027
1337
0038
Which command will display messages from the kernel that were output during the normal boot sequence?
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? (Choose TWO correct answers.)
Which of the following shell commands makes the already defined variable TEST visible to new child processes? (Choose two.)
Which of the following commands list all files and directories within the /tmp/ directory and its subdirectories which are owned by the user root? (Choose two.)
Which of the following commands lists the dependencies of a given dpkg package?
apt-cache dependencies package
apt-cache depends-onpackage
apt-cache requires package
apt-cache depends package
Which of the following is true for hard linked files? (Choose three.)
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?
&<
!<
<|
<<
What does the ? symbol within regular expressions represent?
Match the preceding qualifier zero or one times.
Match the preceding qualifier one or more times.
Match the preceding qualifier zero or more times.
Match a literal ?character.
The USB device filesystem can be found under /proc/______/usb/. (Please fill in the blank with the single word only)
The system is having trouble and the engineer wants to bypass the usual /sbin/init start up and run /bin/sh. What is the usual way to pass this change to the kernel from your boot loader
Pass /bin/sh on the kernel parameter line.
Pass start=/bin/sh on the kernel parameter line.
Pass init=/bin/sh on the kernel parameter line.
Start in runlevel 1.
When piping the output of find to the xargs command, what option to find is useful if the filenames have spaces in them?
-print0
-rep-space
-ignore-space
-nospace
What is the process ID number of the init process on a System V init based system?
0
-1
It is different with each reboot.
1
It is set to the current run level.
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?
mount -t cdrom /dev/sr0 /mnt/cdrom
mount -f /dev/sr0 /mnt/cdrom
mount /dev/sr0 /mnt/cdrom
mount -l cdrom /dev/sr0 /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
Which of the following statements is correct when talking about /proc/?
All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot.
All files within /proc/ are only readable by the root user.
All changes to files in /proc/ are immediately recognized by the kernel.
All files within /proc/ are read-only and their contents cannot be changed.
Which command displays the contents of the Kernel Ring Buffer on the command line? (Provide only the command name without any options or path information)
When given the following command line. echo "foo bar" | tee bar | cat Which of the following output is created?
foo bar
tee bar
foo
cat
bar
What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)
When is the content of the kernel ring buffer reset? (Choose two.)
Which of the following commands is used to update the list of available packages when using dpkg based package management?
apt-get upgrade
apt-get update
apt-cache update
apt-get refresh
apt-cache upgrade
Which of the following options must be passed to a filesystem's entry in /etc/fstab in order to mount the file system without root privileges?
norestrict
auto
noauto
user
Which of the following is true when a file system, which is neither listed in /etc/fstab nor known to system, is mounted manually?
systemd ignores any manual mounts which are not done using the systemctl mount command
systemctl unmount must be used to remove the mount because system opens a file descriptor on the mount point
The command systemctl mountsync can be used to create a mount unit based on the existing mount
Unless a systemd mount unit is created, systemd unmounts the file system after a short period of time
systemd automatically generates a mount unit and monitors the mount point without changing it
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?
tune2fs -d 200 /dev/sda1
tune2fs -i 200 /dev/sda1
tune2fs -c 200 /dev/sda1
tune2fs -n 200 /dev/sda1
tune2fs --days 200 /dev/sda1
Which SysV init configuration file is commonly used to set the default run level? (Specify the full name of the file, including path.)
Which command uninstalls a package but keeps its configuration files in case the package is re-installed?
dpkg -s pkgname
dpkg -L pkgname
dpkg -v pkgname
dpkg -P pkgname
dpkg -r pkgname
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.
Which of the following commands will print the last 10 lines of a text file to the standard output?
tail -n 10 filename
head -n 10 filename
dump -n 10 filename
cat -n 10 filename
The /etc/_______ file lists currently mounted devices.
What happens after issuing the command vi without any additional parameters?
vi starts and requires the user to explicitly either create a new or load an existing file.
vi starts and loads the last file used andmoves the cursor to the position where vi was when it last exited.
vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.
vi exits with an error message as it cannot be invoked without a file name to operate on.
vi starts in command mode and opens a new empty file.
Which wildcards will match the following filenames? (Choose two.) ttyS0 ttyS1 ttyS2
Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?
kill -TERM 123
kill -PIPE 123
kill -STOP 123
kill -KILL 123
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
Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.)
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?
-n
-maxdepth
-maxlevels
-s
-dirmax
Which of the following commands is used to modify quota settings? (Choose two.)
Which of the following commands is used to change metadata and options for ext3 filesystems?
mod3fs
dump2fs
mod2fs
tune2fs
tune3fs
Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters?
VFAT
ext2
ext4
ext3
XFS
Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.)
When planning a partition scheme, which of the following directories could be considered for separate partitions? (Choose three.)
Which of the following statements are true about the boot sequence of a PC using a BIOS? (Choose two.)
What does the command mount -a do?
It mounts all filesystems listed in /etc/fstab which have the option noauto set.
It shows all mounted filesystems.
It mounts all user mountable filesystems for the current user.
It mounts all available filesystems onto the current directory.
It mounts all filesystems listed in /etc/fstab which have the option auto set.
Which of the following apt-get commands will install the newest versions of all currently installed packages?
full-upgrade
update
install
dist-upgrade
auto-update
Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.)
Which of the following are modes of the vi editor? (Choose two.)
Which of the following environment variables overrides or extends the list of directories holding shared libraries?
LD_LIB_PATH
LD_LIBRARY_PATH
LD_LOAD_PATH
LD_SHARE_PATH
LD_RUN_PATH
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.)
Which of the following kernel parameters instructs the kernel to suppress most boot messages?
verbose=0
quiet
silent
nomesg
In which directory must definition files be placed to add additional repositories to yum?
Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?
apropos foo
lsattr foo
locate foo
whatis foo
which foo
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)
Which of the following commands enables the setuid (suid) permission on the executable /bin/foo?
chmod 4755 /bin/foo
chmod 755+s /bin/foo
chmod u-s /bin/foo
chmod 1755 /bin/foo
What information can the lspci command display about the system hardware? (Choose THREE correct answers.)
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.)
Which of the following commands installs GRUB 2 into the master boot record on the third hard disk?
grub-mkrescue /dev/sdc
grub-mbrinstall /dev/sdc
grub2 install /dev/sdc
grub-install /dev/sdc
grub-setup /dev/sdc
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.)
Which of the following information is stored within the BIOS? (Choose TWO correct answers.)
In the vi editor, which of the following commands will copy the current line into the vi buffer?
yy
1c
cc
1y
c
What command will generate a list of user names from /etc/passwd along with their login shell?
column -s : 1,7 /etc/passwd
colrm 1,7 /etc/passwd
chop -c 1,7 /etc/passwd
cut -d: -f1,7 /etc/passwd
Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?
sed 's/bob/Bob/g' letter > newletter
sed 's/bob, Bob/' letter > newletter
sed's/bob/Bob' letter > newletter
sed '/bob/Bob' letter > newletter
sed s/bob/Bob/ letter < newletter
Which of the following apt-get commands will install the newest versions of all currently installed packages without removing any packages or installing new packages that are not already installed?
auto-update
dist-upgrade
update
upgrade
install
Which of the following commands converts spaces in a file to tab characters and prints the result to standard output?
expand
unexpand
tab
iconv
Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)
What output will be displayed when the user fred executes the following command? echo 'fred $USER'
fred fred
fred /home/fred/
'fred $USER'
fred $USER
'fred fred'
Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?
SIGKILL
SIGINT
SIGTERM
SIGSTOP
SIGCONT
Which of the following properties of a Linux system should be changed when a virtual machine is cloned? (Choose two.)
Which of the following commands print the current working directory when using a Bash shell? (Choose two.)
To prevent users from being able to fill up the / partition, the ____________ directory should be on a separate partition if possible because it is world writeable.
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?
timeout
hidemenu
splash
showmenu
What does the command mount --bind do?
It makes the contents of one directory available in another directory
It mounts all available filesystems to the current directory
It mounts all file systems listed in /etc/fstab which have the option userbind set
It mounts all user mountable filesystems to the user's home directory
It permanently mounts a regular file to a directory
You want to preview where the package file, apache-xml.i386.rpm, will install its files before installing it. What command do you issue?
rpm -qv apache-xml.i386.rpm
rpm -qpl apache-xml.i386.rpm
rpm -ql apache-xml.i386.rpm
rpm -qp apache-xml.i386.rpm
After modifying GNU GRUB's configuration file, which command must be run for the changes to take effect?
kill -HUP $(pidof grub)
grub-install
grub
No action is required
What does the command mount -a do?
It shows all mounted file systems that have been automatically mounted.
It ensures that all file systems listed in /etc/fstab are mounted regardless of their options.
It ensuresthat all file systems listed with the option auto in /etc/fstab are mounted.
It opens an editor with root privileges and loads /etc/fstab for editing.
It ensures that all file systems listed with the option noauto in /etc/fstab are mounted.
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?
P (uppercase
i (lowercase)
u (lowercase)
U (uppercase)
p (lowercase)
Which command is used to create and initialize the files used to store quota information? (Specify ONLY the command without any path or parameters.)
Which of the following commands lists the dependencies of the RPM package file foo.rpm?
rpm -dep foo
rpm -R foo.rpm
rpm -qpR foo.rpm
rpm -ld foo.rpm
rpm -pD foo
Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)
When running the command sed -e "s/a/b/" /tmp/file >/tmp/file While /tmp/file contains data, why is /tmp/file empty afterwards?
The command sed did not match anything in that file therefore the output is empty.
Redirection for shell commands do not work using the > character. It only works using the | character instead.
The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens itfor reading.
You are trying to make a hard link to an ordinary file but ln returns an error. Which of the following could cause this?
The source file is read-only.
You do not own the source file.
The source file is a shell script.
The source file is hidden.
The source and the target are on different filesystems.
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?
The kernel has not finished flushing disk writes to themounted device.
A user has a file open in the /mnt directory.
The files in /mnt have been scanned and added to the locate database.
Another file system still contains a symlink to a file inside /mnt.
The kernel thinks that a process is about to open a file in /mnt for reading.
What is contained on the EFI System Partition?
The Linux root file system
The first stage boot loader
The Linux default shell binaries
The default swap space file
The user home directories
Which of the following commands updates the already installed RPM package rpmname?
rpm -U rpmname
rpm -u rpmname
rpm --update rpmname
rpm -q rpmname
rpm --force rpmname
Pressing the Ctrl-C combination on the keyboard while a command is executing in the foreground sends which of the following signal codes?
3(SIGQUIT)
1(SIGHUP)
9(SIGKILL)
15(SIGTERM)
2(SIGINT)
What is the output of the following command? echo "Hello World" | tr -d aieou
Hello World
eoo Hll Wrld
eoo
Hll Wrld
What is the difference between the i and a commands of the vi editor?
i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.
i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line.
i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modesautomatically.
i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.
In compliance with the FHS, in which of the directories are man pages found?
/var/man
/var/pkg/man
/opt/man
/usr/share/man
/usr/doc/
Which of the following describes the correct order in which the components of the system boot process are started?
Bootloader, BIOS, kernel, init system
BIOS, bootloader,kernel, init system
BIOS, kernel, bootloader, init system
Bootloader, BIOS, init system, kernel
BIOS, bootloader, init system, kernel
Which of the following options for the kernel's command line changes the systemd boot target to rescue.target instead of the default target?
systemd.runlevel=rescue.target
systemd.target=rescue.target
systemd.unit=rescue.target
systemd.service=rescue.target
systemd.default=rescue.target
Which of the following commands can be used to perform a full text search on all available packages on a Debian system?
apt-get
dpkg
apt-cache
apt-search
apt
The system configuration file named _______ is commonly used to set the default runlevel. (Please provide the file name with full path information)
What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?
The command is SetUID and it will be executed with the effective rights of the owner.
The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
The command will be executed with the effective rights of the group instead of the owner.
The command will be executed with the effective rights of the owner and group.
Which of the following partition types is used for Linux swap spaces when partitioning hard disk drives?
fd
83
7
82
8e
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.)
What is the effect of the egrep command when the -v option is used?
It enables color to highlight matching parts.
It only outputs non-matching lines.
It shows the command's version information.
It changes the output order showing the last matching line first.
Which program updates the database that is used by the locate command? (Specify ONLY the command without any path or parameters).
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?
-c
--no-clobber
-a
--continue
Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)
Which of the following commands will produce the following output?
ps
proclist
jobs
netstat
Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.)
Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)
What is the purpose of the xargs command?
It passes arguments to an X server
It helps shellscripts take variable argument lists.
It asks a question, graphically, and returns the answer to the shell.
It reads standard input (STDIN) and builds up command lines to execute.
It allows users to specify long options for commands that normally only accept short options.
In Bash, inserting 2>&1 after a command redirects:
standard error to standard input.
standard error to standard output.
standard outputto standard input.
standard input to standard error.
standard output to standard error.
Which of the following commands will load a kernel module along with any required dependency modules?
modprobe
insmod
module_install
depmod
loadmod
The message "Hard Disk Error" is displayed on the screen during Stage 1 of the GRUB boot process. What does this indicate?
One or more of the filesystems on the hard disk has errors and a filesystem check should be run
The next Stage cannot be read from the hard disk because GRUB was unable to determine the size and geometry of the disk
The BIOS was unable to read the necessary data from the Master Boot Record to begin the boot process
The kernel was unable to execute /bin/init
Which signal is sent by the kill command by default?
SIGTERM(15)
SIGKILL(9)
SIGQUIT(3)
SIGHUP(1)
Which of the following commands will write a message to the terminals of all logged in users?
bcast
print
mesg
wall
yell
Which program runs a command in specific intervals and refreshes the display of the program's output? (Specify ONLY the command without any path or parameters.)
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?
foo would be removed while bar would remain accessible.
foo and bar would both be removed.
Both foo and bar would remain accessible.
The user is prompted whether bar should be removed, too.
foo would be removed. bar would still exist but would be unusable.
Which of the following commands will reduce all consecutive spaces down to a single space?
tr -s ' ' < a.txt > b.txt
tr '\s' ' ' < a.txt > b.txt
tr -c ' ' < a.txt > b.txt
tr -r ' ' '\n' < a.txt > b.txt
tr -d ' ' < a.txt > b.txt
Which of the following is the device file name for the second partition on the only SCSI drive?
/dev/sda2
/dev/sd0a2
/dev/hda1
/dev/sd1p2
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
which
query
basename
whereis
dirname
Which of the following commands moves and resumes in the background the last stopped shell job?
bg
back
run
fg
Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)
A faulty kernel module is causing issues with a network interface card. Which of the following actions ensures that this module is not loaded automatically when the system boots?
Adding a blacklist line including the name of the offending module to the file /etc/modprobe.d/blacklist.conf
Deleting the kernel module's directory from the file system and recompiling the kernel, including its modules
Using modinfo -k followed by the name of the offending module
Using lsmod --remove --autoclean without specifying the name of a specific module
Using modprobe -r followed by the name of the offending module
Which command is used to start another command with a given nice level? (Specify ONLY the command without any path or parameters.)
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?
fixe2fs
tune2fs
mke2fs
mod2fs
fsck
Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?
Modify timestamp
Inode number
Link count
File size
Permissions
What is the purpose of the Bash built-in export command?
It runs a command as a process in a subshell.
It allows disks to be mounted remotely.
It makes the command history available to subshells.
It sets up environment variables for applications.
It shares NFS partitions for use by other systems on the network.
Which of the following is a limitation of the cut command?
The cut command only works on ASCIItext.
The cut command cannot reorder fields.
The cut command cannot use different input and output delimiters.
The cut command can only select output by field position.
The command dbmaint & was used to run dbmaint in the background. However, dbmaint is terminated after logging out of the system. Which alternative dbmaint invocation lets dbmaint continue to run even when the user running the program logs out?
job -b dmaint
wait dbmaint
dbmaint &>/dev/pts/null
nohup dbmaint &
bg dbmaint
Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed? (Choose TWO correct answers.)
What command changes the nice level of a running process? (Specify ONLY the command without any path or parameters)
What is the default nice level when a process is started using the nice command?
-10
20
0
10
Which of the following commands will change the quota for a specific user?
edquota
repquota
quota
quota -e
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?
hash
magic
file
type
pmagic
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
0750
0029
0036
0027
7640
Which of the following commands is used to change options and positional parameters for a running Bash?
envsetup
history
bashconf
set
setsh
Which of the following explanations are valid reasons to run a command in the background of your shell?
The system is being shut down and the command needs to restart execution immediately after the reboot.
The command has to run immediately but the user needs to log out.
The command does not need to execute immediately.
The command can run at a lower priority than normal commands run on the command line.
In compliance with the FHS, in which of the following directories are documentation files found?
/usr/local/share/documentation
/usr/share/doc
/etc/share/doc
/var/share/doc
/usr/share/documentation
Which command creates a swap space on a block device or a file? (Specify ONLY the command without any path or parameters.)
Which of the following commands can be used to create a USB storage media from a disk image?
gdisk
mount
dd
cc
fdisk
What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct answers.)
What is true regarding the command ls > files if files does not exist?
files is created and contains the output of ls
The output of ls is printed to the terminal
The command files is executed and receives the output of ls
Any output of ls is discarded
An error message is shown and ls is not executed
Which of the following commands displays the contents of a gzip compressed tar archive?
tar –fzt archive.tgz
tar ztf archive.tgz
gzip -d archive.tgz | tar tvf -
tar cf archive.tgz
gzip archive.tgz | tar xvf -
Which function key is used to start Safe Mode in Windows NT?
F8
F10
F6
Windows NT does not support Safe Mode
Consider the following directory:
drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales Which command ensures new files created within the directory sales are owned by the group sales?
(Choose two.)
Which of the following files exist in a standard GRUB 2 installation? (Choose two.)
Which of the following commands updates the linker cache of shared libraries?
mkldconfig
soconfig
lddconfig
mkcache
ldconfig
Which command must be entered before exiting vi to save the current file as filea.txt?
:s filea.txt
%w filea.txt
%s filea.txt
:save filea.txt
:w filea.txt
Which of the following commands redirects the output of ls to standard error?
ls >&2
ls <<ERR
ls >-1
ls |error
ls >>2
Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it?
dd if=/dev/zero of=/dev/sda bs=512 count=1
dd if=/dev/zero of=/dev/sda bs=512
dd if=/dev/zero of=/dev/sda bs=440 count=1
dd if=/dev/zero of=/dev/sda bs=440
Which of the following commands instructs SysVinit to reload its configuration file?
initreload
reinit
telinit 7
init reinit
telinit q
Consider the following output from the command ls -i: How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?
ln c.txt a.txt
ln -h a.txt c.txt
ln a.txt c.txt
ln -i 525385 c.txt
ln -f c.txt a.txt
Given the following input stream: txt1.txt atxt.txt txtB.txt Which of the following regular expressions turns this input stream into the following output stream? txt1.bak.txt atxt.bak.txt txtB.bak.txt
s/txt$/bak.txt/
s/txt/bak.txt/
s/^.txt/.bak/
s/[.txt]/.bak$1/
s/^txt$/.bak^/
What is true regarding the configuration of yum? (Choose two.)
Which of the following files, located in the user home directory, is used to store the Bash history?
.bash_histfile
.history_bash
.history
.bashrc_history
.bash_history
Which file in /proc describes the IRQs that are used by various kernel drivers? (Specify the file name only without any path.)
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.)
Which of the following commands will display the inode usage of each mounted filesystem?
du -i
df -i
printfs -i
lsfs -i
When removing a package, which of the following dpkg options will completely remove the files including configuration files?
--clean
--purge
--delete
-remove
Which of the following are filesystems which can be used on Linux root partitions? (Choose two.)
Which option to the yum command will update the entire system? (Specify ONLY the option name without any additional parameters.)
Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.)
An administrator has issued the following command: grub-install --boot-directory=/custom-grub /dev/sda In which directory will new configuration files be found? (Provide the full directory path only without the filename)
What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)
Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)
Which command will uninstall a package but leave its configuration files in case the package is re-installed?
dpkg -L pkgname
dpkg -r pkgname
dpkg -P pkgname
dpkg -s pkgname
What does the command grub-install /dev/sda do?
GRUB sets the default BIOS boot device to/dev/sda.
GRUB creates partitions on the device/dev/sda to be used with Linux.
GRUB installs all required files and configures the boot loader on device/dev/sda.
GRUB recompiles the Linux Kernel and installs it on the Master Boot Record of device/dev/sda.
You are having some trouble with a disk partition and you need to do maintenance on this partition but your users home directories are on it and several are logged in. Which command would disconnect the users and allow you to safely execute maintenance tasks?
killall -9 inetd
/etc/rc.d/init.d/network stop
shutdown -r now
/bin/netstop --maint
telinit 1
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?
By using the command :repeat followed by the number and the command.
By selecting all affected lines using the shift and cursor keys before applying the command.
By specifying the number right in front of a command such as 4l or 2yj.
By issuing a command such as :set repetition=4 which repeats every subsequentcommand 4 times.
Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?
echo -n "Hello" >>/tmp/myfile.txt
echo "Hello" >/tmp/myfile.txt
sed -ie "s/1/2/" /tmp/myfile.txt
file /tmp/myfile.txt
touch/tmp/myfile.txt
Which is the default percentage of reserved space for the root user on new ext4 filesystems?
3%
10%
15%
5%
0%
Creating a hard link to an ordinary file returns an error. What could be the reason for this?
The source file is hidden.
The source file is read-only.
The source and the target are on different filesystems.
The source file is a shell script.
The source file is already a hard link.
Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?
fmt -f 1,4 /etc/passwd
cut -d : -f 1,4 /etc/passwd
paste -f 1,4 /etc/passwd
split -c 1,4 /etc/passwd
Which of the following directories on a 64 bit Linux system typically contain shared libraries? (Choose two.)
Which of the following are valid stream redirection operators within Bash? (Choose two.)
Which of the following vi commands deletes two lines, the current and the following line?
2d
2dd
de12
dd2
d2
Which RPM command will output the name of the package which supplied the file /etc/exports?
rpm -qf /etc/exports
rpm -qp /etc/exports
rpm -F /etc/exports
rpm -qi/etc/exports
rpm -Kl /etc/exports
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.)
Which of the following commands lists all currently installed packages when using RPM package management?
yum --query --all
rpm --query --all
yum --list --installed
rpm --list -installed
While editing a file in vi, the file changes due to another process. Without exiting vi, how can the file be reopened for editing with the new content?
:e
:r
:n
:w
Which of the following is correct when talking about mount points?
Directories need to have the SetUID flag set to be used as a mount point.
Every existing directory can be used as a mount point.
Only empty directories can be used as a mount point.
Files within a directory are deleted when the directory is used as a mount point
A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?
rmdir "~/\dir"
rmdir '~/\dir'
rmdir ~/'dir'
rmdir ~/\dir
rmdir ~/\\dir
Which of the following commands can be used to download the RPM package kernel without installing it?
yumdownloader kernel
rpm --download --package kernel
rpmdownload kernel
yum download --no-install kernel
Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)
In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.)
Which permissions and ownership should the file /etc/passwd have?
-rw-------1 root root 531 Jun 5 22:45 /etc/passwd
-rw-r--r--1 11531 Jun 5 22:45 /etc/passwd
-rw-------1 11531 Jun 5 22:45 /etc/passwd
-rw-r--r--1 root root 531 Jun 5 22:45 /etc/passwd
Which of the following file permissions belong to a symbolic link?
lrwxrwxrwx
+rwxrwxrwx
srwxrwxrwx
-rwxrwxrwx
When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?
20
0
-10
10
How can the list of files that would be installed by the RPM package file apache-xml.rpm be previewed?
rpm -qpl apache-xml.rpm
rpm -qp apache-xml.rpm
rpm -ql apache-xml.rpm
rpm -qv apache-xml.rpm
Which of the following regular expressions represents a single upper-case letter?
!a-z
[A-Z]
{AZ}
:UPPER:
%C
Which of the following commands shows the definition of a given shell command?
stat
case
where
type
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?
Which chown command will change the ownership to dave and the group to staff on a file named data.txt?
chown -u dave -g staff data.txt
chown dave:staff data.txt
chown dave/staff data.txt
chown --user dave --group staff data.txt
Which of the following commands are common Linux commands for file management? (Choose three correct answers.)
Which of the following commands installs all packages with a name ending with the string foo?
zypper add ".*foo"
zypper force "foo*"
zypper get "*foo"
zypper update "foo?"
zypper install "*foo"
Given a log file loga.log with timestamps of the format DD/MM/YYYY:hh:mm:ss, which command filters out all log entries in the time period between 8:00 am and 8:59 am
grep -E ':08:[0-9]+:[0-9]+' loga.log
grep -E ':08:[09]+:[09]+' loga.log
grep -E loga.log ':08:[0-9]+:[0-9]+'
grep loga.log ':08:[0-9]:[0-9]'
grep -E ':08:[00]+' loga.log
Which file from the /proc file system contains a list of all currently mounted devices? (Specify ONLY the command without any path or parameters.)
Where does the BIOS search for a bootloader?
On all connected storage media in the defined boot device order.
Only on hard disk drives in the defined boot device order.
The BIOS is not responsible to search for a valid bootloader.
On all connected storage media regardless of the boot device order.
Only on the last added storage media.
When considering the use of hard links, what are valid reasons not to use hard links?
Each hard link has individual ownership, permissions and ACLs which can lead to unintended disclosure of file content
Hard links are not available on all Linux systems because traditional filesystems, such as ext4, do not support them
Hard links are specific to one filesystem and cannot point to files on another filesystem
If users other than root should be able to create hard links, suln has to be installed and configured
When a hard linked file is changed, a copy of the file is created and consumes additional space
Which shell command is used to continue background execution of a suspended command?
exec
cont
&
bg
:&
Which character, added to the end of a command, runs that command in the background as a child process of the current shell?
+
!
&
%
#
Which command is used to query information about the available packages on a Debian system?
apt-get
apt-search
apt-cache
dpkg-search
dpkg
Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?