Lunix Exam 1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What script is included with the kernel source to patch a kernel? A. update-kernel B. patch-kernel C. apply-patch D. patch

Answer: B. patch-kernel

Which RPM command will output the name of the package which installed 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

Answer: B. rpm -qf /etc/exports

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

Answer: B. rpm -qf /etc/exports

An administrator is looking for an executable file foo. Which of the following commands would search for foo within directories set in the shell variable, PATH? A. locate B. which C. find D. query E. whereis

Answer: B. which

With Xorg 7.0, what is the name of the default font server? A. xfserv B. xfs C. fonts D. xfstt E. fserv

Answer: B. xfs

When removing a package, which of the following dpkg options will completely remove the files including configuration files? A. --clean B. --delete C. --purge D. remove

Answer: C. --purge

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

Answer: C. LD_LIBRARY_PATH

Which command will print line numbers before each line in a file? A. In B. nl C. cat-n D. numline

Answer: C. cat-n

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

Answer: C. dd if=/dev/zero of=/dev/sda bs=440 count=1

What command is used to mount a floppy disk image under /mnt/floppy? A. mount -loop root.img /mnt/floppy B. mount root.img /mnt/floppy C. mount -o loop root.img /mnt/floppy D. mount root.img E. mount -l root.img /mnt/floppy

Answer: C. mount -o loop root.img /mnt/floppy

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.

Answer: C. standard output to standard error.

You logged in as user tuxl, but now you want to switch users to tux2 with tux2's environment. How would you do this? A. su tux2 B. su-etux2 C. su - tux2 D. su -m tux2 E. su-ftux2

Answer: C. su - tux2

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

Answer: D. /etc/apt/sources.list

If the current directory is /root and the kernel source is located in /usr/src/linux, which of the following commands should be used to apply the patch /tmp/foopatch? A. cd /usr/src/linux; cat /tmp/foopatch | patch B. cd /usr/src/linux; cat /tmp/foopatch | patch -p0 C. cd /usr/src/linux; patch -p1 > /tmp/foopatch D. cd /usr/src/linux; patch -p1 < /tmp/foopatch E. cat /tmp/foopatch | patch -p0

Answer: D. cd /usr/src/linux; patch -p1 < /tmp/foopatch

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

Answer: D. cut -d: -f1,7 /etc/passwd

You have just added a CD.ROM drive (/dev/hdd) to your system and have added it to yourfstab. Typically you can use which of the following commands to mount media in that drive to /mnt/cdrom? A. mount /dev/cdrom /mnt/cdrom B. mount/dev/cdrom C. mount -t cdrom /dev/cdrom /mnt/cdrom D. mount /mnt/cdrom E. automount /mnt/hdd /mnt/cdrom

Answer: D. mount /mnt/cdrom

When building an RPM package, which rpmbuild option is used to unpack sources and apply patches before proceeding with the next steps? A. -bb B. -be C. -bs D. -ba E. -bp

Answer: E. -bp

How do you get a list of files that have been installed from a dpkg package? A. dpkg-I pkgname B. dpkg-C pkgname C. dpkg-s pkgname D. dpkg-S pkgname E. dpkg-L pkgname

Answer: E. dpkg-L pkgname

Which option is used in the Samba configuration file to set which files and directories are neither visible to or accessible by the clients? A. mangle names B. hide dot files C. hide special files D. hide files E. veto files

Answer: E. veto files

In which directory must definition files be placed to add additional repositories to yum?

Answer: /etc/yum.repos.d, /etc/yum.repos.d/, yum.repos.d, 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.)

Answer: /tmp, tmp, /var/tmp, /tmp/, /var/tmp/

Which umask value will result in the default access permissions of 600 (rw-------) for files and 700 (rwx------) for directories? (Specify only the numerical umask value.)

Answer: 0077, 077

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

Answer: A A. .bash_history

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

Answer: A A. /usr/share/man

You want the default permissions for your files to bE.rw-r-. How must you set umask? A. 037 B. 640 C. 038 D. 027

Answer: A A. 037

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"

Answer: AC A. shutdown -r now C. telinit 6

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

Answer: AC A. uptime C. top

Which of the following information is stored within the BIOS? (Choose TWO correct answers.) A. Boot device order B. Linux kernel version C. Timezone D. Hardware configuration E. The system's hostname

Answer: AD A. Boot device order D. Hardware configuration

An administrator is writing text in vi. Now the administrator wants to save their changes and exit. Which of the following sequence of inputs will accomplish this? (Select TWO). A. esc ZZ B. ctrl :w! C. esc zz D. esc :wq! E. ctrl XX

Answer: AD A. esc ZZ D. esc :wq!

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

Answer: AD A. esc ZZ D. esc :wq!

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

Answer: AE A. 0 E. 6

Which of the following commands will print the inode usage on each mounted filesystem? A. du -i B. df -i C. lsfs -i D. printfs -i

Answer: B

Which of the following commands will display the last 30 lines of /var/log/bigd.log as well as new content as it is appended to the file by another process? A. cut-30-v/var/log/bigd.log B. heaD.30-e/var/log/bigd.log C. tail-f-n 30/Var/log/bigd.log D. taC.30/var/log/bigd.log E. cat-r-n 30/var/log/bigd.log

Answer: C C. tail-f-n 30/Var/log/bigd.log

What single command (no options or arguments) can be used to fully extract a file called abc.tar.bz2? ) A. gzip B. gunzip C. tar D. bz2unzip

Answer: C C. tar

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

Answer: C C. timeout

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

Answer: C 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

Answer: C 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

Answer: C C. type

To allow a regular user account to mount and unmount a filesystem (for instance, a cdrom or floppy), which of the following options will need to be added to the corresponding line in /etc/fstab? A. nouidchk B. alluser C. user D. auto

Answer: C C. user

To allow a regular user account to mount and unmount a filesystem (for instance, a cdrom or floppy), which option need to be added to the corresponding line in /etc/fstab? A. nouidchk B. alluser C. user D. auto

Answer: C C. user

After installing and configuring XFree86, you notice that when you start X, the display is not centered. What program can you run to find a better modeline setting? A. XF86Setup B. xf86config C. xvidtune D. xvideoagent

Answer: C C. xvidtune

X is running okay but you're concerned that you may not have the right color depth set. What single command will show you the running color depth while in X? A. xcd B. xcdepth C. xwininfo D. xcolordepth E. cat /etc/X11

Answer: C C. xwininfo

You are having problems with a particular font and you want to see if its directory is included in XF86Config. Which section contains this information? A. Paths B. Fonts C. Files D. Graphics

Answer: C D. Graphics

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

Answer: C. rpm --query --all

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"

Answer: D D. TEST="FOO"

When using rpm --verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.) A. Timestamps B. MD5 checksums C. Inodes D. File sizes E. GnuPG signatures

Answer: A. Timestamps B. MD5 checksums D. File sizes

Which function key is used to start Safe Mode in Windows NT? A. F10 B. F8 C. F6 D. Windows NT does not support Safe Mode

Answer: D. Windows NT does not support Safe Mode

Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached? A. << B. <| C. !< D. &<

Answer: A. <<

What does the following script do? #!/bin/bash find/ -perm +4000 | mail -s "Daily find output" root A. Emails a report of all suid files to root. B. Emails a report of all important files to root. C. Emails a report of all writeable files to root. D. Emails a report of all guid files to root. E. Corrects permissions on files and emails the results to root.

Answer: A. Emails a report of all suid files to root.

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.

Answer: A. Every existing directory can be used as a mount point.

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

Answer: A. file /tmp/myfile.txt

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

Answer: B. -maxdepth

Which of the following commands will print to standard out only the lines that do not begin with # (pound symbol) in the file foobar? A. /bin/grep ^# foobar B. /bin/grep -v ^# foobar C. /bin/grep #$ foobar D. /bin/grep -v #$ foobar

Answer: B. /bin/grep -v ^# foobar

What is the default nice level when a process is started using the nice command? A. -10 B. 10 C. 20 D. 0

Answer: B. 10

What does the following command do? cat '$TEST' A. Displays a bash syntax error message. B. Displays the contents of the file named $TEST if it exists. C. Waits for the user to enter text and then echos the text back. D. Displays the contents of the file named inside the back quotes. E. Displays the contents of the file named by the environment variable TEST.

Answer: B. Displays the contents of the file named $TEST if it exists.

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.

Answer: 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 can be used to create a USB storage media from a diskimage? A. gdisk B. dd C. cc D. fdisk E. mount

Answer: B. dd

the following command and an abbreviated version of its output: $ netstat nr Kernel IP routing table Destination Gateway Genmask Flags Iface 192.168.165.0 0.0.0.0 255.255.255.0 U ethO 127.0.0.0 0.0.0.0 255.0.0.0 U loO 0.0.0.0 192.168.165.1 0.0.0.0 UG ethO What is the default gateway for the network? A. 192.168.165.1 B. 255.0.0.0 C. 255.255.255.0 D. 0.0.0.0 E. 192.168.165.0

Answer: A A. 192.168.165.1

Which of the following command line redirection characters instructs the shell to read from the current input source until a specific word, on a separate line and without and trailing spaces, is reached? A. << B. <| C. !< D. &<<

Answer: A A. <<

Which system administration command you can use to update Id.so.cache after the installation of new shared libraries? A. Idconfig B. Idd C. libpath D. newlibs

Answer: A A. Idconfig

You ran out of space and added a eighth disk to your SCSI-1 system. When you try to start, the system no longer boots. What is most likely the cause of this problem? A. SCSI-1 supports only 8 devices including the adaptor. B. SCSI-1 supports only 6 disks per adaptor. C. There is a SCSI-ID conflict that causes that problem. D. You forgot to set the SCSI-ID #8 for the new disk.

Answer: A A. SCSI-1 supports only 8 devices including the adaptor.

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

Answer: A A. The bootloader

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

Answer: A A. apt-get update

Given the following output: prompt> myapp [1]+ Stopped myapp prompt> Which of the following commands will resume executing the stopped process while allowing the user to continue to type commands at the command prompt? A. bg myapp B. continue myapp C. exec myapp D. fg myapp E. myapp &

Answer: A A. bg myapp

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

Answer: A A. chmod u=rwx,go=rx /bin/foo

Which of the following Debian package system commands will list all partially installed packages and suggest how to get them correctly installed? A. dpkg -C B. apt-get -u C. dpkg -Dh D. dpkg -l E. apt-get -y

Answer: A A. dpkg -C

Which of the following commands will change the quota for a specific user? A. edquota B. repquota C. quota -e D. quota

Answer: A A. edquota

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

Answer: A A. ext2

Which of the following Linux filesystems pre-allocates a fixed number of inodes at filesystems make/creation time, and does NOT generate them as needed? A. ext3 B. jfs C. reiserfs D. xfs

Answer: A A. ext3

An administrator is having some trouble with a disk partition and needs to do maintenance on this partition. The administrator's users home directories are on it and several are logged in. Which of the following commands would disconnect the users and allow the administrator to safely execute maintenance tasks? A. telinit 1 B. shutdown -r now C. killall -9 inetd D. /bin/netstop --maint E. /etc/rc.d/init.d/network stop

Answer: A A. telinit 1

What information is displayed by the command cat/proc/dma? A. whether DMA is enabled B. which DMA channels are in use C. which DMA mode is in use D. general information about DMA on the machine

Answer: A A. whether DMA is enabled

The system bell sound is annoying you. Which of the following can you use to change this and other userX preferences? A. xset B. xconf C. xbell D. xmag E. xpref

Answer: A A. xset

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

Answer: AB A. /sbin/mke2fs -j /dev/sdb1 B. /sbin/mkfs -t ext3 /dev/sdb1

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

Answer: AB A. source /usr/local/bin/runme.sh B. . /usr/local/bin/runme.sh

Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.) A. < B. <<< C. > D. >>> E. %>

Answer: ABC A. < B. <<< C. >

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

Answer: ABD A. Device IRQ settings B. PCI bus speed D. Device vendor identification

Which of the following does the Filesystem Hierarchy Standard enable? (Select TWO). A. Software to predict the location of installed files and directories. B. Software to predict the ownership and access rights to files and directories. C. Users to predict the location of installed files and directories. D. Users to predict how the filesystem should be formatted according to need.

Answer: AC A. Software to predict the location of installed files and directories. C. Users to predict the location of installed files and directories.

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

Answer: AC A. cat /proc/self/mounts C. mount

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

Answer: AC A. ext3 C. ext2

Select the line that BEST represents what permissions the /etc/passwd file should have. A. -rw------- 1 root root 531 Jun 5 22:45 /etc/passwd B. -rw-r--r-- 1 root root 531 Jun 5 22:45 /etc/passwd C. -rw-r--r-- 1 1 1 531 Jun 5 22:45 /etc/passwd D. All answers listed are not correct. E. All answers listed are correct.

Answer: B B. -rw-r--r-- 1 root root 531 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

Answer: B B. /dev/sda2

Which command will create an ext3 filesystem on /dev/hda2? A. /sbin/mke2fs -d /dev/hda2 B. /sbin/mke2fs -j /dev/hda2 C. /sbin/mke2fs -m 3 /dev/hda2 D. /sbin/mke2fs -c ext3 /dev/hda2

Answer: B B. /sbin/mke2fs -j /dev/hda2

The sticky bit is usually set on A. /var/log B. /tmp C. /home D. log files

Answer: B B. /tmp

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.

Answer: B B. /usr/bin/prog is executed with a nice level of 5.

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

Answer: B B. 19

What is the minimum number of disks required in a RAID5 array? A. 1 B. 3 C. 4 D. 5 E. 2

Answer: B B. 3

While editing a file in vi, an administrator realizes that the wrong file is being changed. Which of the following vi command sequences will allow the administrator to quit without saving any changes? A. :Q! B. :q! C. :w! D. :wq!

Answer: B B. :q!

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

Answer: B B. >filename 2>&1

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.

Answer: B B. A user has a file open in the /mnt directory.

In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows? A. By using the command :repeat followed by the number and the command. B. By specifying the number right in front of a command such as 4l or 2yj. C. By selecting all affected lines using the shift and cursor keys before applying the command. D. By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times.

Answer: B B. By specifying the number right in front of a command such as 4l or 2yj.

Which command will print out the attributes of the file foobar? A. Is-attrfoobar B. Isattr foobar C. printattr foobar D. fileattr foobar

Answer: B B. Isattr foobar

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.

Answer: B B. It only outputs non-matching lines.

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.

Answer: B B. It will break the file into new files of 1,000 line pieces each.

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

Answer: B B. SIGINT

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.

Answer: B B. The stdout from the command foo overwrites the file bar

You are running Linux 2.0.36 and you need to add a USB mouse to your system. Which of the following statements is true? A. You need to rebuild the kernel. B. You need to upgrade the kernel C. You need to load the USB modules for your existing modular kernel. D. USB support is not available in Linux.

Answer: B B. You need to upgrade the kernel

Suppose that the command netstat a hangs for a long time without producing output. You might suspect: A. a problem with NFS. B. a problem with DNS. C. a problem with NIS. D. a problem with routing. E. that the netstat daemon has crashed.

Answer: B B. a problem with DNS.

Which of the following commands moves and resumes in the background the last stopped shell job? A. run B. bg C. fg D. back

Answer: B B. bg

Which shell command is used to continue background execution of a suspended command? A. & B. bg C. cont D. exec E. :&

Answer: B B. bg

Which command displays information about connected USB devices? A. cat /proc/usb/devices B. cat /proc/bus/usb/devices C. cat /proc/usbdevices D. cat /proc/usbbus/devices E. cat /proc/hotplug/usb

Answer: B B. cat /proc/bus/usb/devices

Which of the following commands changes the ownership of file.txt to the user dan and the group staff? A. chown dan/staff file.txt B. chown dan:staff file.txt C. chown -u dan -g staff file.txt D. chown dan -g staff file.txt

Answer: B B. chown dan:staff file.txt

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

Answer: B 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.

Answer: B 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.

Answer: B B. i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.

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

Answer: B B. ls

What key combination is used to forcibly halt the X server in the event of the graphical session becoming unusable (eg., desktop manager or fullscreen application hanging)? A. press CTRL+ALT+DEL B. press CTRL+ALT+BACK_SPACE C. press CTRL+ALT+DEL twice D. press CTRL+ALT+F1 then run

Answer: B B. press CTRL+ALT+BACK_SPACE

How can you turn off the group quota in /pub? A. quotaoff/pub B. quotaoff-gv/pub C. quotadown /pub D. rm/pub/quota.group

Answer: B B. quotaoff-gv/pub

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

Answer: B B. set

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

Answer: B B. tar ztf archive.tgz

In xorg.conf, which section is concerned with fonts? A. the Fonts section B. the Files section C. the xfsCodes section D. the Graphics section E. the modeline section

Answer: B B. the Files section

What command can be used on an existing (formatted) partition, to configure the interval between disk checks when mounting partitions? A. e2fsckconfig B. tune2fs C. mke2fs D. config2fs E. e2fsck

Answer: B B. tune2fs

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

Answer: B. mesg

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

Answer: B. yumdownloader kernel

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

Answer: BC B. chmod +t /tmp C. chmod 1775 /tmp

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

Answer: BCE B. systemd C. Upstart E. SysV init

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.

Answer: BD 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.

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)

Answer: C

Of the ways listed, which is the best way to temporarily suspend a user's ability to interactively login? A. Changing the user's UID. B. Changing the user's password. C. Changing the user's shell to /bin/false. D. Removing the user's entry in /etc/passwd.

Answer: C . Changing the user's shell to /bin/false.

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. #

Answer: C C. &

Which of the following is the default Xorg configuration file? A. /usr/X11 R6/etcAtorg.conf B. /var/X11Atorg.conf C. /etc/X11/Xorg.conf D. /usr/etcyxi1Atorg.conf

Answer: C C. /etc/X11/Xorg.conf

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

Answer: C C. /etc/inittab

Which of the following configuration files 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

Answer: C C. /etc/inittab

The correct crontab entry to execute the script chklog once per hour between 3 p.m. and 5 p.m. on Monday and Thursday each week is: A. 0 3,4,5 * * 2,5 chklog B. 0 3,4,5 * * 1,4 chklog C. 0 15,16,17 * * 1,4 chklog D. 0 15,16,17 1,4 * * chklog E. * 15,16,17 * * 1,4 chklog

Answer: C C. 0 15,16,17 * * 1,4 chklog

Which of the following is the process ID number of the init program? A. -1 B. 0 C. 1 D. It is different with each reboot. E. It is set to the current run level.

Answer: C C. 1

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

Answer: C C. 10

Which of the following statements is correct when talking about /proc/? A. All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot. B. All files within /proc/ are read-only and their contents cannot be changed. C. All changes to files in /proc/ are immediately recognized by the kernel. D. All files within /proc/ are only readable by the root user.

Answer: C C. All changes to files in /proc/ are immediately recognized by the kernel.

While using the vi editor, you wish to move ahead one page. You should press the control key and: A. A B. D C. F D. U

Answer: C C. F

Which of the following lines from /etc/X11/XF86Config indicates what fonts can be found on a font server? A. FontPath= server B. Fonts "unix/: 7100" C. FontPath,lunix/:7100" D. Fonts= server E. Fontserver = "servername"

Answer: C C. FontPath,lunix/:7100"

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

Answer: C C. Hll Wrld

To what environment variable will an administrator assign or append a value if the administrator needs to tell the dynamic linker to look in a build directory for some of a program's shared libraries? A. LD_LOAD_PATH B. LD_LIB_PATH C. LD_LIBRARY_PATH D. LD_SHARE_PATH E. LD_RUN_PATH

Answer: C 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

Answer: C 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.

Answer: C C. Match the preceding qualifier zero or one times.

Which variable defines the directories in which a Bash shell searches for executable commands? A. BASHEXEC B. BASHRC C. PATH D. EXECPATH E. PATHRC

Answer: C C. PATH

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.

Answer: C C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored.

You have run out of disk space on a partition. Which of the following would be an easy way to move data to a new partition without reconfiguring the path to the data in existing applications? A. Run ext2fs ACL. B. Use a hard link. C. Use a symbolic link. D. Use the loopback device. E. Create a block device offset.

Answer: C C. Use a symbolic link.

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.

Answer: C 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

Answer: C C. apt-cache depends package

Which of the following chown commands will change the ownership to foo and the group to bar on a file named biglist? A. chown foo/bar biglist B. chown -u foo -g bar biglist C. chown foo:bar biglist D. chown --user foo --group bar biglist

Answer: C C. chown foo:bar biglist

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

Answer: C C. cut -d : -f 1,4 /etc/passwd

The command used to determine a file's type is A. type B. find C. file D. Is

Answer: C C. file

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types? A. magic B. type C. file D. pmagic E. hash

Answer: C 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

Answer: C C. find

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

Answer: C C. grep -v '/$' foo

Which of the following file permissions belong to a ymbolic link? A. -rwxrwxrwx B. +rwxrwxrwx C. lrwxrwxrwx D. srwxrwxrwx

Answer: C C. lrwxrwxrwx

What RPM command would show you detailed information for a package called openssh-3.6.i386.rpm? A. rpm-showinformation openssh-3.6.i386.rpm B. rpm-showdetails-package openssh-3.6.i386.rpm C. rpm-query-info-package openssh-3.6.i386.rpm D. rpm-verify openssh-3.6.i386.rpm

Answer: C C. rpm-query-info-package openssh-3.6.i386.rpm

On a system using shadowed passwords, the correct permissions for /etc/passwd are ___ and the correct permissions for /etc/shadow are ___. A. rwr, r B. rwrr, rrr C. rwrr, r D. rwrrw,rr E. rw, r

Answer: C C. rwrr, r

What command should be invoked to give the user sally read and write, but not execute, access to the file strategy.txt using Extended ACL entries? A. setfacl -setperm sally:rw strategy.txt B. setfacl -m user::sally+rw strategy.txt C. setfacl-m user: sally; rwstrategy.txt D. setfacl -setperm user:sally+rw strategy.txt

Answer: C C. setfacl-m user: sally; rwstrategy.txt

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

Answer: CD C. find /tmp -user root -print D. find /tmp -user root

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

Answer: CD C. init 1 D. telinit 1

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.

Answer: CE 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

Answer: CE C. LABEL E. UUID

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

Answer: D

In GRUB's configuration file an administrator finds the following line: root (hd1,4) Which of the following is the corresponding device name on a Linux system? A. /dev/hda4 B. /dev/hda5 C. /dev/hdb4 D. /dev/hdb5

Answer: D D. /dev/hdb5

Your department decided to change the Gnome Display Manager's greeting. What configuration file should you edit? A. /etc/gnome/greeting B. /opt/gnome/share/greeting C. /etc/X11/gmd.conf D. /etc/X11/gdm/lnit/Default

Answer: D D. /etc/X11/gdm/lnit/Default

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/ker

Answer: D D. /proc/sys/ker

Which of the following directories contains additional information about installed packages? A. /usr/share/documentation B. /usr/local/share/documentation C. /usr/local/doc D. /usr/share/doc E. /usr/packages/doc

Answer: D D. /usr/share/doc

Which of the following settings for umask ensures that new files have the default permissions -rwr-----? A. 0017 B. 0640 C. 0038 D. 0027

Answer: D D. 0027

An administrator wants the default permissions for their files to be -rw-r-----. How must the administrator set umask? A. 037 B. 640 C. 038 D. 027

Answer: D D. 027

How many fields are in a syntactically correct line of etc/fstab? A. 3 B. 4 C. 5 D. 6 E. 7

Answer: D D. 6

What information does the file modules.dep provide? A. A list of all modules compiled for this kernel. B. A list of modules the kernel needs to run. C. A list of all modules available to the kernel. D. A list of modules required by each module. E. A list of devices and their module name.

Answer: D D. A list of modules required by each module.

You have a user whose account you want to disable but not remove. What should you do? A. Edit /etc/gshadow and just remove his name. B. Edit /etc/passwd and change all numbers to 0. C. Edit /etc/shadow and remove the last field. D. Edit /etc/passwd and insert an * after thefirst : . E. Edit /etc/group file and put a # sign in front of his name.

Answer: D D. Edit /etc/passwd and insert an * after thefirst : .

Which of the following is the output when the below shell script executes? cat <<foobar Hello foobar foobar A. The contents of the file foobar. B. Hello C. No output but a file named foobar is created. D. Hello foobar E. Hello foobar foobar

Answer: D D. Hello foobar

In order to append the output of Is to a file called bazz, which of the following command lines would you use? A. Is > bazz B. Is >&bazz C. Is &> bazz D. Is ?bazz

Answer: D D. Is ?bazz

What does the command mount -a do? A. It ensures that all file systems listed with the option noauto in /etc/fstab are mounted. B. It shows all mounted file systems that have been automatically mounted. C. It opens an editor with root privileges and loads /etc/fstab for editing. D. It ensures that all file systems listed with the option auto in /etc/fstab are mounted. E. It ensures that all file systems listed in /etc/fstab are mounted regardless of their options.

Answer: D D. It ensures that all file systems listed with the option auto in /etc/fstab are mounted.

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.

Answer: D 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.

Answer: D 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.

Answer: D D. It sets up environment variables for applications.

In the command foo < bar | foobar, which of the following statements is correct? A. The stdout from the command foobar is saved to the file foo. B. The stdout from the command foo is saved to the file foobar. C. The command foobar receives its stdin from the stderr of foo. D. The command foobar receives its stdin from the stdout of foo. E. The command bar receives its stdin from the contents of the file foobar.

Answer: D D. The command foobar receives its stdin from the stdout of foo.

You are preparing a new set of shared libraries in /usr/local/applib and you have written and compiled some code that uses these libraries. You have already performed an Idconfig, however the system still cannot find the shared libraries. What is most likely the cause of this? A. You used the wrong compil|er. B. You did not update your PATH variable. C. You compiled the code with wrong library. D. You forgot to put the library path in ld.so.conf.

Answer: D D. You forgot to put the library path in ld.so.conf.

Which of the following commands makes /bin/foo executable by everyone but writable only by its owner? A. chmod 557 /bin/foo B. chmod o+rwx.a+rx/bin/foo C. chown 557 /bin/foo D. chmod 755/bin/foo

Answer: D D. chmod 755/bin/foo

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

Answer: D D. kill -TERM 123

An administrator has just added a CD-ROM drive (/dev/hdd) to a system and added it to the administrator's fstab. Typically the administrator can use which of the following commands to mount media in that drive to /mnt/cdrom? A. mount /dev/cdrom /mnt/cdrom B. mount /dev/cdrom C. mount -t cdrom /dev/cdrom /mnt/cdrom D. mount /mnt/cdrom E. automount /mnt/hdd /mnt/cdrom}

Answer: D D. mount /mnt/cdrom

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

Answer: D D. myapp | tee file1.log

Which of the following kernel parameters instructs the kernel to suppress most boot messages? A. silent B. verbose=0 C. nomesg D. quiet

Answer: D D. quiet

Which of the following commands is run LAST during boot on a system with quotas enabled? A. fsck B. mount C. quotacheck D. quotaon

Answer: D D. quotaon

Identify the statement that would create a default route using a gateway of 192.168.1.1. A. netstat add defaultgw B. route default 192.168.1.1 C. ip route default 192.168.1.1 D. route add defaultgw 192.168.1.1 E. ifconfig defaultgw 192.168.1.1 eth0

Answer: D D. route add defaultgw 192.168.1.1

You want to preview where the package file, apachE.xml.i386.rpm, will install its files before installing it. What command do you issue? A. rpm-qp apachE.xml.i386.rpm B. rpm-qv apachE.xml.i386.rpm C. rpm-ql apachE.xml.i386.rpm D. rpm-qpl apachE.xml.I386.rpm

Answer: D D. rpm-qpl apachE.xml.I386.rpm

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

Answer: D D. sed 's/bob/Bob/g' letter > newletter

You have created a really long letter and after you are done you notice that you used the name "Bob" many times but you forgot to capitalize it in many instances. Which command would replace "bob" with "Bob" in all instances and generate a new letter for printing? 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

Answer: D D. sed 's/bob/Bob/g' letter > newletter

When you start XWindows, which series of programs and/or scripts would most closely describe the start-up process? A. xdm -> xinit -> xinitrC.> Xclients B. kdE.> xinitrC.> xinit -> Xclients C. startx -> xinitrC.> Xclients -> kde D. startx -> xinit -> xinitrC.> Xclients E. startx -> xinit -> Xclients -> xinitrc

Answer: D D. startx -> xinit -> xinitrC.> Xclients

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

Answer: D D. tail -n 10 filename

Which of the following commands will allow an administrator to adjust the number of mounts after which an existing filesystem will be checked by e2fsck? A. debugfs B. dumpe2fs C. mode2fs D. tune2fs E. mke2fs

Answer: D D. tune2fs

According to the File System Hierarchy Standard, the lost+found directory is used for: A. files with unknown owners. B. missing device files found by/proc. C. unknown binary files found by find. D. unlinked files found by fsck.

Answer: D D. unlinked files found by fsck.

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.

Answer: D D. vi starts in command mode and opens a new empty file.

Which of the following commands will print the current video settings to stdout in XF86Config "Modeline" format? A. xinfo-mode B. xset-info C. xf86config -list D. xvidtune -show

Answer: D D. xvidtune -show

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

Answer: D D. yy

Which crontab entry could be used to set the system time at regular intervals? A. 1 0 * * * date $d $t $24 B. 1 0 * * * settime $d $t $24 C. 1 0 * * * date<ntp1.digex.net D. 1 0 * * * /usr/sbin/runcron date <ntp1.digex.net E. 1 0 * * * /usr/sbin/ntpdate ntp1.digex.net > /dev/null 2>&1

Answer: E E. 1 0 * * * /usr/sbin/ntpdate ntp1.digex.net > /dev/null 2>&1

For which of the following can the tee command be used? A. Print the contents of a file in reverse order. B. Use the output of one command as arguments to another. C. Add line numbers to the output of a command. D. Pipe the output of one command into the input of another. E. Send a command's output to stdout and a to file at the same time.

Answer: E E. Send a command's output to stdout and a to file at the same time.

An administrator is trying to make a hard link to an ordinary file but ln returns an error. Which of the following could cause this? A. The source file is hidden. B. The source file is read-only. C. The source file is a shell script. D. The administrator does not own the source file. E. The source and the target are on different filesystems.

Answer: E E. The source and the target are on different filesystems.

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.

Answer: E E. The source and the target are on different filesystems.

Which shell built-in command can be used to create a shortcut or pseudonym for a longer command? Assume a modern bournE.like shell, such as bash. A. shortcut B. In C. sudo D. link E. alias

Answer: E E. alias

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

Answer: E E. rmdir ~/\\dir

Bob accidentally created the subdirectory \bobsdir in his home directory. He tried to remove the subdirectory with the command rmdir \bobsfile only to receive the error: "No such file or directory." Which of the following commands will remove the directory? A. rmdir '~bob/\bobsdir' B. rmdir "~bob/\bobsdir" C. rmdir ~bob/'bobsdir' D. rmdir ~bob/\bobsdir E. rmdir ~bob/\\bobsdir

Answer: E E. rmdir ~bob/\\bobsdir

Which command will list all the files installed from the RPM package file named, vorbis-tools- 1.1 .i386.rpm? A. rpm-qfvorbis-tools-1.1 .i386.rpm B. rpm -F vorbis-tools-1.1 .i386.rpm C. rpm -pf vorbis-tools-1.1 .i386.rpm D. rpm -ql vorbis-tools-1.1.1386.rpm E. rpm-qlp vorbis-tools-1.1.1386.rpm

Answer: E E. rpm-qlp vorbis-tools-1.1.1386.rpm

All of the following commands will execute the bash script /usr/local/bin/runme.sh EXCEPT: 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

Answer: E E. run /usr/local/bin/runme.sh

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

Answer: E 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

Answer: E E. tr -s ' ' < a.txt > b.txt

You suspect that a gateway machine on your network has failed but you are unsure which machine. Which command will help locate the problem? A. ps B. netstat C. nslookup D. ifconfig E. traceroute

Answer: E E. traceroute

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

Answer: E E. whereis

If the path parameter is not set for a share in the smb.conf file, the share will refer to which of the following directories? A. /var/samba B. /var/smb/tmp C. /var/spool/samba D. /tmp E. ~/.samba

Answer: E E. ~/.samba

Which of the following commands updates the linker cache of shared libraries? A. mkcache B. soconfig C. mkldconfig D. lddconfig E. ldconfig

Answer: E. ldconfig

Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)

Answer: HISTFILE

Which signal is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files? killall -s _______ daemon

Answer: HUP, SIGHUP, 1

Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)

Answer: cmdline, /proc/cmdline

Which command will display messages from the kernel that were output during the normal boot sequence?

Answer: dmesg, /bin/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.)

Answer: dpkg-reconfigure

Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)

Answer: jobs

What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)

Answer: menu.lst, grub.conf, grub.cfg

Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)

Answer: mkdir, /usr/bin/mkdir

Which command is used to create and initialize the files used to store quota information? (Specify ONLY the command without any path or parameters.)

Answer: quotacheck

Which command will disable swapping on a device? Specify ONLY the command without any path or parameters.)

Answer: swapoff, /sbin/swapoff

Which option to the yum command will update the entire system? (Specify ONLY the option name without any additional parameters.)

Answer: update, upgrade


Kaugnay na mga set ng pag-aaral

Glacial Landscapes 5:Glaciers, Deserts, and Wind

View Set

Assignment - 16 The Globally Harmonized System & Hazard Communication

View Set

chapter 10 medical terminology - reproductive system

View Set