P4S - Master Deck (almost all)
In Bash, inserting 1>&2 after a command redirects: a.) standard error to standard input. b.) standard input to standard error. c.) standard output to standard error. d.) standard error to standard output. e.) standard output to standard input.
c.) standard output to standard error.
Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user? a.) hidemenu b.) splash c.) timeout d.) showmenu
c.) timeout
Which of the following commands will change all CR-LF pairs in an imported text file, userlist.txt, to Linux standard LF characters and store it as newlist.txt? a.) tr '\r\n' '' <userlist.txt> newlist.txt b) tr -c '\n\r' '' <newlist.txt> userlist.txt c.) tr -d '\r' <userlist.txt> newlist.txt d.) tr '\r' '\n' <userlist.txt> newlist.txt e.) tr -s '^M' '^J' userlist.txt newlist.txt
c.) tr -d '\r' <userlist.txt> newlist.txt
Which utility would be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem? a.) mod2fs b.) fsck c.) tune2fs d.) mke2fs e.) fixe2fs
c.) tune2fs
Which of the following commands changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting? a.) tune2fs -d 200 /dev/sda1 b.) tune2fs -c 200 /dev/sda1 c.) tune2fs -i 200 /dev/sda1 d.) tune2fs -n 200 /dev/sda1 e.) tune2fs -days 200 /dev/sda1
c.) tune2fs -i 200 /dev/sda1
Which of the following commands shows the definition of a given shell command? a.) where b.) stat c.) type d.) case
c.) type
Which of the following commands converts spaces in a file to tab characters and prints the result to standard output? a.) iconv b.) expand c.) unexpand d.) tab
c.) unexpand
Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.) ___________________
cmdline what other way is the direct pass between? the command-line! aka. /proc/cmdline
In which directory must definition files be placed to add additional repositories to yum? ________________
/etc/yum.repos.d
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.) _________________________________
/tmp
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? ______________________
/usr/local/bin/
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.) __________________________________
0077
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
1 or HUP or SIGHUP
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination? A. /etc/keys B. /proc/keys C. /etc/inittab D. /proc/inittab E. /etc/reboot
C. /etc/inittab
When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process? A. -10 B. 0 C. 10 D. 20
C. 10
After moving data to a new filesystem, how can the former path of the data be kept intact in order to avoid reconfiguration of existing applications? (Choose TWO correct answers.) A. By creating an ACL redirection from the old to the new path of the data. B. By creating a hard link from the old to the new path of the data. C. By creating a symbolic link from the old to the new path of the data. D. By running the command touch on the old path. E. By mounting the new filesystem on the original path of the data.
C. By creating a symbolic link from the old to the new path of the data. E. By mounting the new filesystem on the original path of the 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.) A. FIND B. ID C. LABEL D. NAME E. UUID
C. LABEL E. UUID
What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command? A. The command is SetUID and it will be executed with the effective rights of the owner. B. The command will be executed with the effective rights of the group instead of the owner. C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored. D. The command will be executed with the effective rights of the owner and group.
C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
Which grep command will print only the lines that do not end with a / in the file foo? A. grep '/$' foo B. grep '/#' foo C. grep -v '/$' foo D. grep -v '/#' foo
C. grep -v '/$' foo the -v (^ begins v ends) ^ (empty at beginning of line) $ (empty at the end of line) these are anchors
Which file should be edited to select the network locations from which Debian installation package files are loaded? A. /etc/dpkg/dpkg.cfg B. /etc/apt/apt.conf C. /etc/apt/apt.conf.d D. /etc/apt/sources.list E. /etc/dpkg/dselect.cfg
D. /etc/apt/sources.list
After modifying GNU GRUB's configuration file, which command must be run for the changes to take effect? A. kill -HUP $(pidof grub) B. grub-install C. grub D. No action is required
D. No action is required eliminate bad answers! not installing anything, no need to "kill" anything, grub does not make sense... so no action (but that's the best answer, anyway... config file changes are read immediately by the kernel)
Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.) _________________________
HISTFILE
Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.) a.) shutdown-r now b.) shutdown -r "rebooting" c.) telinit 6 d.) telinit 0 e.) shutdown -k now "rebooting"
a.) shutdown-r now c.) telinit 6 -r stands for reboot
From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.) a.) source /usr/local/bin/runme.sh b.) ./usr/local/bin/runme.sh c.) /bin/bash /usr/local/bin/runme.sh d.) /usr/local/bin/runme.sh e.) run /usr/local/bin/runme.sh
a.) source /usr/local/bin/runme.sh b.) ./usr/local/bin/runme.sh
Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers) a.) uptime b.) up c.) top d.) uname -u e.) time --up
a.) uptime c.) top
In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories? a.) -dirmax b.) -maxdepth c.) -maxlevels d.) -n e.) -s
b.) -maxdepth
When piping the output of find to the xargs command, what option to find is useful if the filenames have spaces in them? a.) -rep-space b.) -print0 c.) -nospace d.) -ignore-space
b.) -print0
Which permissions and ownership should the file /etc/passwd have? a.) -rw-------1 rootroot531 Jun 5 22:45 /etc/passwd b.) -rw-r--r--1 rootroot531 Jun 5 22:45 /etc/passwd c.) -rw-r--r--1 11531 Jun 5 22:45 /etc/passwd d.) -rw------1 11531 Jun 5 22:45 /etc/passwd
b.) -rw-r--r--1 rootroot531 Jun 5 22:45 /etc/passwd
Which of the following is the device file name for the second partition on the only SCSI drive? a.) /dev/hda1 b.) /dev/sda2 c.) /dev/sd0a2 d.) /dev/sd1p2
b.) /dev/sda2
When planning a partition scheme, which of the following directories could be considered for separate partitions? (Choose three.) a.) /etc b.) /home c.) /var d.) /lib e.) opt
b.) /home c.) /var e.) opt
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init? a.) /lib/init.so b.) /sbin/init c.) /etc/rc.d/rcinit d.) /proc/sys/kernel/init e.) /boot/init
b.) /sbin/init
What is the default nice level when a process is started using the nice command? a.) -10 b.) 10 c.) 20 d.) 0
b.) 10
What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process? a.) 9 b.) 19 c.) 49 d.) 99
b.) 19
Pressing the Ctrl-C combination on the keyboard while a command is executing in the foreground sends which of following signal codes? a.) 1(SIGHUP) b.) 2(SIGINT) c.) 3(SIGQUIT) d.) 9(SIGKILL) e.) 15(SIGTERM)
b.) 2(SIGINT)
Which of the following shell redirections will write standard output and standard error output to a file named filename? a.) 2>&1 >filename b.) >filename 2>&1 c.) 1>&2>filename d.) >>filename e.) 1&2>filename
b.) >filename 2>&1
What does the command grub-install /dev/sda do? a.) GRUB creates partitions on the device/dev/sdato be used with Linux. b.) GRUB sets the default BIOS boot device to /dev/sda. c.) GRUB installs all required files and configures the boot loader on device /dev/sda. d.) GRUB recompiles the Linux Kernel and installs it on the Master Boot Records of device /dev/sda.
c.) GRUB installs all required files and configures the boot loader on device /dev/sda. boot loader in device file system, in this case, to load Linux on an sda drive
What is the output of the following command? echo "Hello World" |tr -d aieou a.) Hello World b.) eoo c.) Hll Wrld d.) eoo Hll Wrld
c.) Hll Wrld
Which of the following environment variables overrides or extends the list of directories holding shared libraries? a.) LD_LOAD_PATH b.) LD_LIB_PATH c.) LD_LIBRARY_PATH d.) LD__SHARE_PATH e.) LD_RUN_PATH
c.) LD_LIBRARY_PATH
Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created? a.) File size b.) Modify timestamp c.) Link count d.) Inode number e.) Permissions
c.) Link count
What does the ? symbol within regular expressions represent? a.) Match the preceding qualifier one or more times. b.) Match the preceding qualifier zero or more times. c.) Match the preceding qualifier zero or one times. d.) Match a literal ? character.
c.) Match the preceding qualifier zero or one times.
Which variable defines the directories in which Bash shell searches for executable commands? a.) BASHEXEC b.) BASHRC c.) PATH d.) EXECPATH e.) PATHRC
c.) PATH
Which of the following statements is correct for a command line ending with a & character? a.) The command's output is redirected to /dev/null. b.) The result of the command defines if the next command will be run. c.) The command is run in the background of the current shell. d.) The command is run as a direct child of the init process.
c.) The command is run in the background of the current shell.
Which of the following commands lists all currently installed packages when using RPM package management? a.) yum --query --all b.) yum --list --installed c.) rpm --query --all d.) rpm --list --installed
c.) rpm --query --all
In compliance with the FHS, in which of the following directories are documentation files found? a.) /usr/share/documentation b.) /usr/local/share/documentation c.) /var/share/doc d.) /usr/share/doc e.) /etc/share/doc
d.) /usr/share/doc
Which of the following settings for umask ensures that new files have the default permissions -rw-r-----? a.) 0017 b.) 0640 c.) 0038 d.) 0027
d.) 0027
How many fields are in a syntactically correct line of /etc/fstab? a.) 3 b.) 4 c.) 5 d.) 6 e.) 7
d.) 6
What is the purpose of the Filesystem Hierarchy Standard? a.) It is a security model used to ensure files are organized according to their permissions and accessibility. b.) It provides unified tools to create, maintain and manage multiple filesystems in a common way. c.) It defines a common internal structure of inodes for all compliant filesystems. d.) It is a distribution neutral description of locations of files and directories.
d.) It is a distribution neutral description of locations of files and directories.
What does the command mount -a do? a.) It mounts all available filesystems onto the current directory. b.) It shows all mounted filesystems. c.) It mounts all user mountable filesystems for the current user. d.) It mounts all filesystems listed in /etc/fstab which have the option auto set. e.) It mounts all filesystems listed in /etc/fstab which have the option noauto set.
d.) It mounts all filesystems listed in /etc/fstab which have the option auto set.
What is the purpose of the Bash built-in export command? a.) It allows disks to be mounted remotely. b.) It runs a command as a process in a subshell. c.) it makes the command history available to subshells. d.) It sets up environment variables for applications. e.) It shares NFS partitions for use by other systems on the network.
d.) It sets up environment variables for applications.
Which signal is sent by the kill command by default? a.) SIGHUP (1) b.) SIGQUIT(3) c.) SIGKILL(9) d.) SIGTERM(15)
d.) SIGTERM(15) Kill the signal is to terminate it.
Which of the following command sets the Bash variable named TEST with the content FOO? a.) set TEST='FOO" b.) TEST = "FOO" c.) var TEST = "FOO" d.) TEST="FOO"
d.) TEST="FOO" (this is similar to b, but b has spaces)
Which chown command will change the ownership to dave and the group to staff on a file named data.txt? a.) chown dave/staff data.txt b.) chown -u dave -g staff data.txt c.) chown ---user dave --group staff data.txt d.) chown dave:staff data.txt
d.) chown dave:staff data.txt
What command will generate a list of user names from /etc/passwd along with their login shell? a.) column -s : 1,7 /etc/passwd b.) chop -c 1,7 /etc/passwd c.) colrm 1,7 /etc/passwd d.) cut -d: -f1,7 /etc/passwd
d.) cut -d: -f1,7 /etc/passwd
Which command will uninstall a package but leave its configuration files in case the package is re-installed? a.) dpkg -s pkgname b.) dpkg -L pkgname c.) dpkg -P pkgname d.) dpkg -r pkgname
d.) dpkg -r pkgname
Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting? a.) kill -PIPE 123 b.) kill -KILL 123 c.) kill -STOP 123 d.) kill -TERM 123
d.) kill -TERM 123 terminating a program is a neat way to end
Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log? a.) cat <myapp | cat> file1.log b.) myapp 0>&1 | cat> file1.log c.) myapp | cat> file1.log d.) myapp | tee file1.log e.) tee myapp file1.log
d.) myapp | tee file1.log
Which of the following commands will produce the following output? USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND a.) jobs b.) proclist c.) netstat d.) ps
d.) ps
Which of the following kernel parameters instructs the kernel to suppress most boot messages? a.) silent b.) verbose=0 c.) nomesg d.) quiet
d.) quiet
A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory? a.) rmdir '/\dir' b.) rmdir "~/\dir" c.) rmdir ~/'dir' d.) rmdir ~/\dir e.) rmdir ~/\\dir
d.) rmdir ~/\dir
How can the list of files that would be installed by the RPM package file apache-xml.rpm be previewed? a.) rpm -qp apache-xml.rpm b.) rpm -qv apache-xml.rpm d.) rpm -qpl apache-xml.rpm
d.) rpm -qpl apache-xml.rpm
Which SysV init configuration file is commonly used to set the default run level? (Specify the full name of the file, including path.) ___________________________
inittab
Which file from the /proc file system contains a list of all currently mounted devices? (Specify ONLY the command without any path or parameters.) ______________________________
mounts
Which command is used to start another command with a given nice level? (Specify ONLY the command without any path or parameters.) __________________________________-
nice
Which of the following commands changes all occurrences of the word "bob" in the file data to "Bob" and prints the result to standard output? a.) sed'/bob/Bob' data b.) sed's/bob/Bob/g' data c.) sed 's/bob/Bob/' data d.) sed's/bob,Bob/' data
b.) sed's/bob/Bob/g' data
Which of the following commands is used to change options and positional parameters for a running Bash? a.) history b.) set c.) bashconf d.) setsh e.) envsetup
b.) set
Which of the following commands is used to modify quota settings? (Choose two.) a.) editquota b.) setquota c.) edquota d.) quotaedit e.) quotaset
b.) setquota c.) edquota
Which of the following are init systems used within Linux systems? (Choose THREE correct answers.) a.) startd b.) systemd c.) Upstart d.) SysInit e.) SysV init
b.) systemd c.) Upstart e.) SysV init
Which of the following commands displays the contents of a gzip compressed tar archive? a.) gzip archive.tgz | tar xvf- b.) tar ztf archive.tgz c.) gzip -d archive.tgz | tar tvf- d.) tar cf archive.tgz
b.) tar ztf archive.tgz
Which of the following commands will print important system information such as the kernel version and machine hardware architecture? a.) sysinfo b.) uname c.) lspci d.) arch e.) info
b.) uname uname stands for "Unix name" and it tells general system information
Which of the following commands can be used to download the RPM package kernel without installing it? a.) yum download --no-install kernel b.) yumdownloader kernel c.) rpm --download --package kernel d.) rpmdownload kernel
b.) yumdownloader kernel
Which character, added to the end of a command, runs that command in the background, as a child process, of the current shell? a.) ! b.) + c.) & d.) % e.) #
c.) &
When removing a package, which of the following dpkg options will completely remove the files including configuratoin files? a.) --clean b.) --delete c.) --purge d.) --remove
c.) --purge
What is the process ID number of the init process on a SysV init based system? a.) -1 b.) 0 c.) 1 d.) It is different with each reboot. e.) It is set to the current run level.
c.) 1 init is process number 1 on SysV init systems
Which of the following statements is correct when talking about /proc/? a.) All changes to files in /proc/ are stored in /ext/proc.d and restored on reboot. b.) All files within /proc/ are read-only and their contents cannot be changed. c.) All changes to files in /proc/ are immediately recognized by the kernel. d.) All files within /proc/ are only readable by the root user.
c.) All changes to files in /proc/ are immediately recognized by the kernel.
Which command is used create and initialize the files used to store quota information? (Specify ONLY the command without any path or parameters.) _________________________________________________
quotacheck
What command changes the nice level of a running process? (Specify ONLY the command without any path or parameters) ___________________________
renice
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. _______________________________
17yy
Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct? A. /usr/bin/prog is executed with a nice level of -5. B. /usr/bin/prog is executed with a nice level of 5. C. /usr/bin/prog is executed with a priority of -5. D. /usr/bin/prog is executed with a priority of 5.
B. /usr/bin/prog is executed with a nice level of 5.
After running the command umount /mnt, the following error message is displayed: umount: /mnt: device is busy. What is a common reason for this message? A. The kernel has not finished flushing disk writes to the mounted device. B. A user has a file open in the /mnt directory. C. Another file system still contains a symlink to a file inside /mnt. D. The files in /mnt have been scanned and added to the locate database. E. The kernel thinks that a process is about to open a file in /mnt for reading.
B. A user has a file open in the /mnt directory.
Which shell command is used to continue background execution of a suspended command? A. & B. bg C. cont D. exec E. :&
B. bg
Which option to the tee command will cause the output to be concatenated on the end of the output file instead of overwriting the existing file contents? a.) -a b.) -c c.) -no-clobber d.) -continue
a.) -a
Which of the following files, located in the user home directory, is used to store the Bash history? a.) .bash_history b.) .bash_histfile c.) .history d.) .bashrc_history e.) .history_bash
a.) .bash_history
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.) a.) /sbin/mke2fs -j /dev/sdb1 b.) /sbin/mkfs -t ext3 /dev/sdb1 c.) /sbin/mkfs -c ext3 /dev/sdb1 d.) /sbin/mke3fs -j /dev/sdb1
a.) /sbin/mke2fs -j /dev/sdb1 b.) /sbin/mkfs -t ext3 /dev/sdb1
In compliance with the FHS, in which of the directories are man pages found? a.) /usr/share/man b.) /opt/man c.) /usr/doc/ d.) /var/pkg/man e.) /var/man
a.) /usr/share/man
Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.) a.) 0 b.) 1 c.) 3 d.) 5 e.) 6
a.) 0 e.) 6
Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.) a.) 0 b.) 1 c.) 3 d.) 5 e.) 6
a.) 0 e.) 6
Which of the following partition types is used for Linux swap spaces when partitioning hard disk drives? a.) 82 b.) 83 c.) 8e d.) fd e.) 7
a.) 82
Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.) a.) < b.) <<< c.) > d.) >>> e.) %?
a.) < b.) <<< c.) >
Which of the following characters can be combined with a separator string in order to read from the current input source until the separator sting, which is on a separate line and without any trailing space is reached? a.) << b.) <| c.) !< d.) &<
a.) << The special symbol << precedes the limit string. This has the effect of redirecting the output of a command block into the stdin of the program or command.
When in Normal mode in vi, which character can be used to begin a reverse search of the text? a.) ? b.) / c.) F d.) r
a.) ?
Which of the following information is stored within the BIOS? (Choose TWO correct answers.) a.) Boot device order b.) Linus kernel version c.) Timezone d.) Hardware configuration e.) The system's hostname
a.) Boot device order d.) Hardware configuration
What information can the lspci command display about the system hardware? (Choose THREE correct answers.) a.) Device IRQ settings b.) PCI bus speed c.) System battery type d.) Device vendor identification e.) Ethernet MAC address
a.) Device IRQ settings b.) PCI bus speed d.) Device vendor identification
Which of the following is correct when talking about mount points? a.) Every existing directory can be used as a mount point. b.) Only empty directories can be used as a mount point. c.) Directories need to have the SetUID flag set to be used as a mount point. d.) Files within a directory are deleted when the directory is used as a mount point.
a.) Every existing directory can be used as a mount point.
During a system boot cycle, what program is executed after the BIOS completes its tasks? a.) The bootloader b.) The inetd program c.) The init program d.) The kernel
a.) The bootloader
When using rpm --verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.) a.) Timestamps b.) MD5 checksums c.) Inodes d.) File sizes e.) GunPG signatures
a.) Timestamps b.) MD5 checksums d.) File sizes
When using regular expressions, which of the following characters match the beginning of a line? a.) ^ b.) ? c.) * d.) + e.) $
a.) ^
Which command is used to query information about the available packages on a Debian system? a.) apt-cache b.) apt-get c.) apt-search d.) dpkg e.) dpkg-search
a.) apt-cache
Which of the following commands is used to update the list of available packages when using dpkg based package management? a.) apt-get update b.) apt-get upgrade c.) apt-cache update d.) apt-get refresh e.) apt-cache upgrade
a.) apt-get update
In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.) a.) cat /proc/self/mounts b.) free c.) mount d.) lsmounts e.) cat /proc/filesystems
a.) cat /proc/self/mounts c.) mount
Which of the following commands makes /bin/foo executable by everyone but writable only by its owner? a.) chmod u=rwx,go=rx /bin/foo b.) chmod o+rwx,a+rx /bin/foo c.) chmod 577 /bin/foo d.) chmod 775 /bin/foo
a.) chmod u=rwx,go=rx /bin/foo
Which of the following commands can be used to create a new file that is 100kb in size? a.) dd b.) file c.) mkfile d.) touch
a.) dd
Which of the following commands print the current working directory when using a Bash shell? (Choose two.) a.) echo "$[PWD}" b.) echo "$[WD}" c.) pwd d.) printwd e.) echo "${pwd}"
a.) echo "$[PWD}" c.) pwd
Which of the following commands will change the quota for a specific user? a.) edquota b.) repquota c.) quota -e d.) quota
a.) edquota
Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.) a.) esc ZZ b.) ctrl :w! c.) esc zz d.) esc :wq! e.) ctrl XX
a.) esc ZZ d.) esc :wq!
Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters? a.) ext2 b.) ext3 c.) ext4 d.) XFS e.) VFAT
a.) ext2
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.) a.) ext3 b.) JFS c.) ext2 d.) XFS e.) procfs
a.) ext3 c.) ext2
Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt? a.) file /tmp/myfile.txt b.) echo "Hello" >/tmp/mysile.txt c.) sed -ie "s/1/2/" /tmp/myfile.txt d.) echo -n "Hello" >>/tmp/myfile.txt e.) touch /tmp/myfile.txt
a.) file /tmp/myfile.txt
Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt a.) file /tmp/myfile.txt b.) echo "Hello" >/tmp/myfile.txt c.) sed -ie "s/1/2/" /tmp/myfile.txt d.) echo -n "Hello" >>/tmp/myfile.txt e.) touch /tmp/myfile.txt
a.) file /tmp/myfile.txt file only tells type of file, but does not actually disturb the file to create a time/date stamp
How is a symbolic link called bar.conf pointing to foo.conf created? a.) ln -s foo.conf bar.conf b.) ln foo.conf bar.conf c.) ln -s bar.conf foo.conf d.) ln bar.conf foo.conf
a.) ln -s foo.conf bar.conf
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.) a.) root*can?do-this.[txt,dot] b.) r[oOoO]t-can-do*.txt c.) [root,user,admin]-can-??-this.txt d.) root*can*do??this.txt e.) root***[can,may]-do-this.[tT][xX][tT]
a.) root*can?do-this.[txt,dot] b.) r[oOoO]t-can-do*.txt c.) [root,user,admin]-can-??-this.txt
What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.) a.) Entries for all possible devices get created on boot even if those devices are not connected. b.) Additional rules for udev can be created by adding them to /etc/udev/rules.d/. c.) When using udev, it is not possible to create block or character devices in /dev/ using mknod. d.) The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup. e.) The content of /dev/ is stored in /etc/udev/dev and is restored during system startup.
b.) Additional rules for udev can be created by adding them to /etc/udev/rules.d/. d.) The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.
Which of the following describes the correct order in which the components of the system boot process are started? a.) BIOS, kernel, bootloader, init system b.) BIOS, bootloader, kernel, init system c.) Bootloader, BIOS, kernel, init system d.) Bootloader, BIOS, kernel, init system
b.) BIOS, bootloader, kernel, init system
In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows? a.) By using the command :repeat followed by the number and the command. b.) By specifying the number right in front of a command such a 4l or 2yj. c.) By selecting all affected lines using the shift and cursor keys before applying the command. d.) By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times.
b.) By specifying the number right in front of a command such a 4l or 2yj.
What is the effect of the egrep command when the -v option is used? a.) It enables color to highlight matching parts. b.) It only outputs non-matching lines. c.) It shows the command's version information. d.) It changes the output order showing the last matching line first.
b.) It only outputs non-matching lines.
What is the purpose of the xargs command? a.) It passes arguments to an X server. b.) It reads standard input (STDIN) and builds up command lines to execute. c.) It helps shell scripts take variable argument lists. d.) It asks a question, graphically, and returns the answer to the shell. e.) It allows users to specify long options for commands that normally only accept short options.
b.) It reads standard input (STDIN) and builds up command lines to execute.
What is the default action of the split command on an input file? a.) It will break the file into new files of 1,024 byte pieces each. b.) It will break the file into new files of 1,000 line pieces each. c.) It will break the file into new files of 1,024 kilobyte pieces each. d.) It will break the file into new files that are no more than 5% of the size of the original file.
b.) It will break the file into new files of 1,000 line pieces each.
Where does the BIOS search for a bootloader? a.) On all connected storage media regardless of the boot device order. b.) On all connected storage media in the defined boot device order. c.) Only on hard disk drives in the defined boot device order. d.) Only on the last added storage media. e.) The BIOS is not responsible to search for a valid bootloader.
b.) On all connected storage media in the defined boot device order.
Which of the following statements describes a difference between GNU GRUB Legacy and GRUB 2? a.) GRUB 2 no longer requires a configuration file. b.) Partition numbers start at 0 in GRUB Legacy and 1 in GRUB 2. c.) grub-mkconfig only works with GRUB Legacy if the --version 1 option is used. d.) The configuration file menu.lst (and grub.conf) have been replaced with grub.config.
b.) Partition numbers start at 0 in GRUB Legacy and 1 in GRUB 2.
Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard? a.) SIGTERM b.) SIGINT c.) SIGSTOP d.) SIGKILL
b.) SIGINT
Which of the following is a limitation of the cut command? a.) The cut command can only select output by field position. b.) The cut command cannot reorder fields. c.) The cut command only works on ASCII text. d.) The cut command cannot use different input and output delimiters.
b.) The cut command cannot reorder fields.
Which of the following is true for hard linked files? (Choose three.) a.) The output of stat will report hard instead of regular file. b.) The hard linked files have the same permissions and owner. c.) The hard linked files share the same inode. d.) The hard linked files are indicated by a -> when listed with ls -1. e.) The hard linked files must be on the same filesystem.
b.) The hard linked files have the same permissions and owner. c.) The hard linked files share the same inode. e.) The hard linked files must be on the same filesystem.
Which of the following statements is correct regarding the command foo 1> bar? a.) The stdout from the command foo is appended to the file bar. b.) The stdout from the command foo overwrites the file bar. c.) The command foo receives its stdin from the file bar. d.) The command foo receives its stdin from the stdout of the command bar. e.) The stderr from the command foo is saved to the file bar.
b.) The stdout from the command foo overwrites the file bar.
What can the Logical Volume Manager (LVM) be used for (Choose THREE correct answers.) a.) To create RAID 9 arrays. b.) To dynamically change the size of logical volumes. c.) To encrypt logical volumes. d.) To create snapshots. e.) To dynamically create or delete logical volumes.
b.) To dynamically change the size of logical volumes. d.) To create snapshots. e.) To dynamically create or delete logical volumes.
Which of the following commands moves and resumes in the background the last stopped shell job? a.) run b.) bg c.) fg d.) back
b.) bg
Which shell command is used to continue background execution of a suspended command? a.) & b.) bg c.) cont d.) exec e.) :&
b.) bg
Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.) a.) chmod +s /tmp b.) chmod +t /tmp c.) chmod 1775 /tmp d.) chmod 4775 /tmp e.) chmod 2775 /tmp
b.) chmod +t /tmp (add sticky bit) c.) chmod 1775 /tmp (chmod 1 being sticky bit?) The operator + causes the selected file mode bits to be added to the existing file mode bits of each file; - causes them to be removed; and = causes them to be added and causes unmentioned bits to be removed restricted deletion flag or sticky bit (t)
Which of the following commands enables the setuid (suid) permission on the executable /bin/foo? a.) chmod 1755 /bin/foo b.) chmod 4755 /bin/foo c.) chmod u-s /bin/foo d.) chmod 755+s /bin/foo
b.) chmod 4755 /bin/foo
Which of the following commands changes the ownership of file.txt to the user dan the the group staff? a.) chown dan/staff file.txt b.) chown dan:staff file.txt c.) chown -u dan -g staff file.txt d.) chown dan -g staff file.txt
b.) chown dan:staff file.txt
Which of the following commands can be used to create a USB storage media from a disk image? a.) gdisk b.) dd c.) cc d.) fdisk e.) mount
b.) dd
Which of the following commands will display the inode usage of each mounted filesystem? a.) du -i b.) df -i c.) lsfs -i d.) printfs -i
b.) df -i
Which of the following are filesystems which can be used on Linux root partitions? (Choose two.) a.) NTFS b.) ext3 c.) XFS d.) VFAT e.) swap
b.) ext3 e.) swap
When given the following command line. echo "foo bar" | tee bar | cat Which of the following output is created? a.) cat b.) foo bar c.) tee bar d.) bar e.) foo
b.) foo bar
After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation? a.) foo and bar would both be removed. b.) foo would be removed while bar would remain accessible. c.) foo would be removed. bar would still exist but would be unusable. d.) Both foo and bar would remain accessible. e.) The user is prompted whether bar should be removed, too.
b.) foo would be removed while bar would remain accessible.
What is the difference between the i and a commands of the vi editor? a.) i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modes automatically. b.) i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor. c.) i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line. d.) i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.
b.) i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.
Which of the following are modes of the vi editor? (Choose two.) a.) edit mode b.) insert mode c.) change mode d.) review mode e.) command mode
b.) insert mode e.) command mode
Which of the following commands can be used to display the inode number of a given file? a.) inode b.) ls c.) ln d.) cp
b.) ls actually ls -i
Which of the following commands are common Linux commands for file management? (Choose three correct answers.) a.) copy b.) mv c.) move d.) cp e.) mkdir
b.) mv d.) cp e.) mkdir
Which of the following commands updates the already installed RPM package rpmname? a.) rpm --update rpmname b.) rpm --U rpmname c.) rpm -q rpmname d.) rpm --force rpmname e.) rpm -u rpmname
b.) rpm --U rpmname
Which RPM command will output the name of the package which supplied the file /etc/exports? a.) rpm -F /etc/exports b.) rpm -qf /etc/exports c.) rpm -Kl /etc/exports d.) rpm -qp /etc/exports e.) rpm qi /etc/exports
b.) rpm -qf /etc/exports
When running the command sed -e "s/a/b" /tmp/file > /tmp/file While /tmp/file contains data, why is /tmp/file empty afterwards? a.) The file order is incorrect. The destination file must be mentioned before the command to ensure redirection. b.) The command sed did not match anything in that file therefore the output is empty. c.) When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading. d.) Redirection for shell commands do not work using the > character. It only works using the | character instead.
c.) When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading.
Which of the following commands lists the dependencies of a given dpkg package? a.) apt-cache depends-on package b.) apt-cache dependencies package c.) apt-cache depends package d.) apt-cache requires package
c.) apt-cache depends package
Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file? a.) fmt -f 1,4 /etc/passwd b.) split -c 1,4 /etc/passwd c.) cut -d : -f 1,4 /etc/passwd d.) paste -f 1,4 /etc/passwd
c.) cut -d : -f 1,4 /etc/passwd
Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it? a.) dd if=/dev/zero of=/dev/sda bs=512 b.) dd if=/dev/zero of=/dev/sda bs=512 count=1 c.) dd if=/dev/zero of=/dev/sda bs=440 count=1 d.) dd if=/dev/zero of=/dev/sda bs=440
c.) dd if=/dev/zero of=/dev/sda bs=440 count=1
Which of the following shell commands makes the already defined variable TEST visible to new child processes? (Choose two.) a.) visibile TEST b.) declare +x TEST c.) declare -x TEST d.) export TEST e.) export -v TEST
c.) declare -x TEST d.) export TEST
Which of the following apt-get commands will install the newest versions of all currently installed packages? a.) auto-update b.) full-upgrade c.) dist-upgrade d.) install e.) update
c.) dist-upgrade
Which of the following commands determines the type of a file by using a definition database which contains information about all common file types? a.) magic b.) type c.) file d.) pmagic e.) hash
c.) file
Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH? a.) apropos b.) which c.) find d.) query e.) whereis
c.) find
Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose TWO correct answers.) a.) find /tmp -uid root-print b.) find -path /tmp -uid root c.) find /tmp -user root-print d.) find /tmp -user root e.) find -path /tmp -user root --print
c.) find /tmp -user root-print d.) find /tmp -user root find, in tmp directory, by user specified (root), optional -print specification
Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.) a.) shutdown -R 1 now b.) shutdown -single now c.) init 1 d.) telinit 1 e.) runlevel 1
c.) init 1 d.) telinit 1
Which of the following file permissions belong to a symbolic link? a.) -rwxrwxrwx b.) +rwxrwxrwx c.) lrwxrwxrwx d.) srwxrwxrwx
c.) lrwxrwxrwx
Which of the following command lines creates or, in case it already exists, overwrites a file called data with the output of ls? a.) ls 3>data b.) ls >& data c.) ls > data d.) ls >> data
c.) ls > data
Which of the following commands will load a kernel module along with any required dependency modules? a.) depmod b.) insmod c.) modprobe d.) module_install e.) loadmod
c.) modprobe
Which of the following commands will mount an already inserted CD-ROM in /dev/sr0 onto an existing directory /mnt/cdrom when issued with root privileges? a.) mount /dev/cdrom /mnt/cdrom b.) mount /dev/sr0 /mnt/cdrom c.) mount -t cdrom /dev/sr0 /mnt/cdrom d.) mount -l cdrom /dev/sr0 /mnt/cdrom e.) mount -f /dev/sr0 /mnt/cdrom
c.) mount -t cdrom /dev/sr0 /mnt/cdrom
Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line? a.) i (lowercase) b.) P (uppercase) c.) p (lowercase) d.) U (uppercase) e.) u (lowercase)
c.) p (lowercase)
Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter? a.) sed '/bob/Bob' letter > newletter b.) sed s/bob/Bob letter < newletter c.) sed 's/bob/Bob' letter > newletter d.) sed 's/bob/Bob/g' letter > newletter e.) sed 's/bob, Bob/' letter > newletter
d.) sed 's/bob/Bob/g' letter > newletter
In Bash, inserting 2>&1 after a command redirects: a.) standard error to standard input. b.) standard input to standard error. c.) standard output to standard error. d.) standard error to standard output. e.) standard output to standard input.
d.) standard error to standard output.
Which of the following commands will print the last 10 lines of a text file to the standard output? a.) cat -n 10 filename b.) dump -n 10 filename c.) head -n 10 filename d.) tail -n 10 filename
d.) tail -n 10 filename
Which of the following commands instructs SysVinit to reload its configuration file? a.) reinit b.) init reload c.) telinit 7 d.) telinit q e.) init reinit
d.) telinit q
Which of the following commands instructs SysVinit to reload its configuration file? a.) reinit b.) init reload c.) telinit 7 d.) telinit q e.) init reinit
d.) telinit q Q or q to request that init(8) reload its configuration (reQuest)
Which of the following commands is used to change metadata and options for ext3 filesystems? a.) mod3fs b.) tune3fs c.) mod2fs d.) tune2fs e.) dump2fs
d.) tune2fs
Which of the following options must be passed to a filesystem's entry in the /etc/fstab in order to mount the file system without root privileges? a.) auto b.) norestrict c.) noauto d.) user
d.) user
What happens after issuing the command vi without any additional parameters? a.) vi starts and loads the last file used and moves the cursor to the position where vi was when it last exited. b.) vi starts and requires the user to explicitly either create a new or load an existing file. c.) vi exits with an error message as it cannot be invoked without a file name to operate on. d.) vi starts in command mode and opens a new empty file. e.) vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.
d.) vi starts in command mode and opens a new empty file.
Which of the following commands will write a message to the terminals of all logged in users? a.) bcast b.) mesg c.) print d.) wall e.) yell
d.) wall
Which of the following commands prints a list of available package updates when using RPM-based package management? a.) dpkg list b.) yum list c.) dpkg check-update d.) yum check-update e.) yum list-update
d.) yum check-update
In the vi editor, which of the following commands will copy the current line into the vi buffer? a.) c b.) cc c.) 1c d.) yy e.) 1y
d.) yy
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.) ____________________
dmesg
Which command will display messages from the kernel that were output during the normal boot sequence? _________________________
dmesg
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.) _____________________
dpkg-reconfigure
Creating a hard link to an ordinary file returns an error. What could be the reason for this? a.) The source file is hidden. b.) The source file is read-only. c.) The source file is a shell script. d.) The source file is already a hard link. e.) The source and the target are on different filesystems.
e.) The source and the target are on different filesystems. hard links are only allowed on same filesystems; symbolic links (soft links) are okay
Which of the following commands updates the linker cache of shared libraries? a.) mkcache b.) soconfig c.) mkldconfig d.) lddconfig e.) ldconfig
e.) ldconfig
Which of the following options for the kernel's command line changes the systemd boot target to rescue-target instead of the default target? a.) systemd.target=rescue.target b.) systemd.runlevel=rescue.target c.) systemd.service=rescue.target d.) systemd.default=rescue.target e.) systemd.unit=rescue.target
e.) systemd.unit=rescue.target
Which of the following commands will reduce all consecutive spaces down to a single space? a.) tr '\s' ' ' <a.txt> b.txt b.) tr -c ' ' <a.txt> b.txt c.) tr -d ' ' <a.txt> b.txt d.) tr -r ' ' '\n' <a.txt> b.txt e.) tr-s ' ' <a.txt> b.txt
e.) 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? a.) dirname b.) which c.) basename d.) query e.) whereis
e.) whereis
What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.) ______________________________________
grub.cfg
Which file in /proc describes the IRQs that are used by various kernel drivers? (Specify the file name only without any path.) _____________________________________
interrupts
Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.) _____________________
jobs
Which command shows all shared libraries required by a binary executable or another shared library? (Specify ONLY the command without any path or parameters.) ___________________________
ldd list dependencies for directories (shared can be considered dependent upon another)
Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.) ________________________
mkdir
Which command creates a swap space on a block device or a file? (Specify ONLY the command without any path or parameters.) ________________
mkswap
Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.) _____________________________
swapoff
Which option to the yum command will update the entire system? (Specify ONLY the option name without any additional parameters.) ________________________
update or upgrade
Which program updates the database that is used by the locate command? ____________________________________
updatedb simple... answer is totally in the question!