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