Linux Practice Test

1.3/1/1multiple alphabetic
Suppose that you have an application whose behavior depends on the environment variable BAR. Which of the following command lines may be used in a bash shell to configure the application?
  • A. export $BAR=baz; echo $BAR
  • B. set BAR=baz
  • C. BAR=baz ; export BAR
  • D. echo $BAR=baz
  • E. declare -x BAR=baz
  • F. echo BAR=baz
1.3/1/2alphabetic
Which of the following commands can be used to assure that a file 'myfile' exists?
  • A. cp myfile /dev/null
  • B. touch myfile
  • C. create myfile
  • D. mkfile myfile
1.3/2/1alphabetic
Which of the following command lines can be used to convert a file containing DOS-style CR-LF line endings into Unix-style LF line endings? Assume for this question that the DOS-style file is called 'dosfile', and we want the modified contents in 'unixfile'
  • A. sed 's/\r//' dosfile > unixfile
  • B. tr -d '\r' < dosfile > unixfile
  • C. dos2unix dosfile unixfile
  • D. strip '\r' < dosfile > unixfile
1.3/2/2alphabetic
Suppose for this question that you have a file called 'wordlist' that contains a number of words, one per line. You would like to produce an ad-hoc report that contains a numbered list of the first five words, according to alphabetical order. Which of the following command lines can be used to produce this report to the console?
  • A. sort wordlist | nl | head -5
  • B. split -1 wordlist ; cat xa? | head -5
  • C. nl wordlist | sort | sed '/^     [^12345]/d'
  • D. nl wordlist | sort | head -5
1.3/2/3alphabetic
The command 'ps -A' displays an ordered list of all running processes, with the right-justifed process ID in the first space-separated field. Suppose you would like to display to screen a list of the five most recently launched processes (those with the highest process IDs). Which of the following
commands will display the desired items?
  • A. ps -A | tail -5 | cut -f 1 -d " "
  • B. ps -A | tail -5 | sed 's/[ ]*[0-9]*//'
  • C. ps -A | head -5 | nl
  • D. ps -A | tac | head -5 | cut -b 0-5
1.3/2/4alphabetic
Suppose that a file 'names' contains a list of names in the form, "firstname lastname", one per line. These names are unsorted, and you would like them sorted by lastname; however, the format of names on each line should remain the same. Which ONE of the following commands will NOT output an appropriately sorted list of names to the console?
  • A. cut -f 2 -d " " names | paste names - | sort -k 3 | cut -f 1
  • B. sort -k 2 names
  • C. sed 's/\(\w*\) \(\w*\)/\2\1\2/' names | sort | cut -f2-3 -d" "
  • D. cut -f 2 -d " " names | sort
  • E. cut -f 2 -d " " names | paste - names | sort | cut -f 2
1.3/3/1alphabetic
Assume that your current working directory is '/tmp' and your home directory is '/home/jane'. Which of the below commands will copy all the content of '/tmp/test/' to a 'test' subdirectory of your home directory?
  • A. cp -r test/* /home/jane
  • B. cp -r ./test ~
  • C. cp -r ~/test .
  • D. cp -r /tmp/test /home/jane/test
1.3/4/1multiple alphabetic
Suppose that you have several files matching the filename pattern 'file[0-9]'. You would like to visually compare the contents of all such files, in a side-by-side fashion. Which of the following commands would let you view the desired adhoc report?
  • A. ls file[0-9] | xargs paste | less
  • B. paste `ls file[0-9]` > report ; vi report ; rm report
  • C. cat file[0-9] | paste - | more | less
  • D. ls file[0-9] | tee fnames | paste `cat fnames`
  • E. ls file[0-9] | tee fnames | xargs paste | more
  • F. ls *word* > fnames ; paste < xargs `cat fnames` | vi
1.3/5/1alphabetic
Which of the following Linux utilities does NOT include the capability to list the process IDs of running applications?
  • A. jobs
  • B. ps
  • C. nice
  • D. top
1.3/5/2alphabetic
# jobs -l
    [1]   5110 Running                 kedit &
    [2]-  5382 Stopped (signal)        pine
    [3]+  5457 Stopped (tty output)    vi
Given the 'jobs' display in the exhibit, which command could you use to switch display focus to the application 'vi'?
  • A. bg %3
  • B. fg %3
  • C. top -p 5457
  • D. switch %5457
1.3/5/3alphabetic

# jobs -l
    [1]   5110 Running                 kedit &
    [2]-  5382 Stopped (signal)        pine
    [3]+  5457 Stopped (tty output)    vi
Given the 'jobs' display in the exhibit, which command could you use to terminate the application 'vi'?
  • A. bg %3
  • B. kill -9 5457
  • C. term -i %3
  • D. fg 5457
1.3/6/1alphabetic
Suppose you have a running program called 'myprog', that is a child of the current shell. You would like to decrease the CPU usage of this program. Which of the following command lines can you use to make 'myprog' yield more CPU resources?
  • A. nice +1 myprog
  • B. ps h -o pid -C myprog | xargs nice +1 -
  • C. renice +1 -u `whoami` myprog
  • D. renice +1 -p `ps -a | grep myprog | cut -b 1-6`
1.3/7/1alphabetic
int double(int n)
    { /* int arg, int return */
       return n*2;
    }
    char hello(int n)
    { /* int arg, char return */
       printf("hello %i\n", n);
    }
    int five()
    { /* no args, int return */
       return 5;
    }
    int        triple(int n, int other, char nonsense)
    { /* int arg, int return */
       return n*3;
    }

Correctly parsing a C source file requires a full-fledged parser (such as that built into a C compiler). Nonetheless, regular expressions can be used to provide a pretty good approximate descriptions of many program constructs. Which of the following searches will locate at least most of the C functions that accept an int as a first argument, and return an int (and will not produce false positives very often). The exhibit contains a fragment of C code with several annotated matching and non-matching functions (for non-C programmers).
  • A. grep -E "int[ \t]+\w+[ \t]*\([ \t]*int" *.c
  • B. grep -E "^int\w+[A-Za-z_]+\w*\(\w*int" *.c
  • C. grep -E "int.+\([ \t]+int.*\) " *.c
  • D. grep -E "int[ \t]+[A-Za-z_][ \t]+\(int" *.c
1.3/7/2alphabetic
Some tools that use regular expressions support so-called "extended" regular expressions. For example, GNU 'grep' with the '-E' option uses extended regular expressions. Other tools like 'sed' only support "basic" regular expressions. As a consequence, one must be careful in selecting the right regular expression syntax. Which of the following characters have a special meaning in extended regular expressions, but not in basic regular expressions. That is, which of the following is an extended regular expression "meta-character", but only a regular character in basic regular expressions?
  • A. ^
  • B. [
  • C. +
  • D. *
2.4/1/1multiple alphabetic
Based on Linux' partition naming system, which of the following device names point to "logical" partitions (assuming the corresponding partitions exist at all on the system in question)?
  • A. /dev/sda3
  • B. /dev/fd0
  • C. /dev/hdb7
  • D. /dev/hda4
  • E. /dev/fd7
  • F. /dev/sdc11
2.4/1/2alphabetic
Which of the following command lines can (possibly) be used to format a partition? Assume required partitions exist, and also that logical partitioning is used on each hard-disk.
  • A. mkfs -t msdos /dev/sda1
  • B. mkfs.ext2 /dev/null
  • C. mkfs -t ext2 /dev/hda4
  • D. mkfs --type=ext2 /dev/hdb7
2.4/2/1alphabetic
Which Linux command can be used to repair improperly shutdown, or otherwise potentially corrupt partitions?
  • A. chkdsk
  • B. scandisk
  • C. fsck
  • D. fdisk
2.4/2/2alphabetic
Which of the following command lines will produce an ad hoc report on the total disk space used personally by the current user?
  • A. fsck ~
  • B. df ~/.
  • C. quota --used
  • D. du -hs ~
2.4/2/3alphabetic
Which Linux command can be used to determine the available space on local hard-disk partitions?
  • A. free
  • B. df
  • C. du
  • D. fdisk
2.4/3/1alphabetic
Please examine the exhibit for this question which displays the actual '/etc/fstab' file for the system on which this exam was created. Which of the following lines in the file causes a fixed and  user-writeable partition to be mounted?
  • A. Line 5
  • B. Line 11
  • C. Line 9
  • D. Line 7
2.4/4/1alphabetic
Which Linux command can be used to limit the disk space usage allowance of a particular user? Assume for this question that quotas are enabled for the filesystem(s) in use on the system in question.
  • A. edquota
  • B. setquota
  • C. quotaon
  • D. repquota
2.4/5/1alphabetic
Suppose you have created a new application 'myapp', and copied it to the directory '/usr/local/bin'. You would like all the users of the system to be able to run your application. Which of the following command lines would allow the appropriate access?
  • A. chmod o+x /usr/local/bin/myapp
  • B. chgrp bin /usr/local/bin/myapp
  • C. umask 0022 /usr/local/bin/myapp
  • D. chown 755 /usr/local/bin/myapp
2.4/5/2alphabetic
Proper file security is particularly important for CGI applications invoked over the web, given the diversity of users. Which of the command lines setup reasonable file permissions for a CGI applications? Even though particular web servers may require slightly different configurations, you should be able to rule out all the wrong answers below.
  • A. chmod a-x ~/www/cgi-bin/myapp.cgi
  • B. chmod 075 ~/www/cgi-bin/myapp.cgi
  • C. chmod 711 ~/www/cgi-bin/myapp.cgi
  • D. chmod o+w ~/www/cgi-bin/myapp.cgi
2.4/6/1alphabetic
Which Linux command is used to assign privileges over a particular file to a designated user
  • A. chroot
  • B. chown
  • C. assign
  • D. chgrp
2.4/7/1alphabetic
One advantage of hard links over symbolic links is:
  • A. A hard link can span different filesystems
  • B. A hard link does not become disconnected from the
           underlying file if the file is moved.
  • C. You can determine the inode used by a hard link, but not
           for a symbolic link.
  • D. A hard link allows you to change the permissions on the
           underlying file.
2.4/8/1alphabetic
According to the Linux filesystem hierarchy standard, which of the following directories would be an appropriate location for a user to install a shared application to?
  • A. /sbin
  • B. /dev/user/bin
  • C. /usr/local/bin
  • D. /etc/bin
2.6/1/1alphabetic
Which of the following Linux command lines can be used to examine kernel bootup messages after boot time?
  • A. dmesg | less
  • B. less /proc/kmsg
  • C. bootlog -v
  • D. vi /var/log/messages
2.6/1/2alphabetic
boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    vga=791
    default=redhat
    keytable=/boot/us.klt
    lba32
    prompt
    timeout=200
    message=/boot/message
    menu-scheme=wb:bw:wb:bw
    image=/boot/vmlinuz
            label=failsafe
            root=/dev/hda10
            initrd=/boot/initrd.img
            append=" devfs=mount failsafe"
            read-only
    image=/boot/vmlinuz-2.4.16
            label=redhat
            alias=redhat-2.4.16
            root=/dev/hda9
            read-only
    image=/boot/vmlinuz-2.4.8-26mdk
            label=mandrake81
            root=/dev/hda10
            initrd=/boot/initrd.img
            append=" devfs=mount"
            read-only
    other=/dev/hda2
            label=eComStation
            table=/dev/hda
    other=/dev/fd0
            label=floppy
            unsafe
Please examine the exhibit for this question which displays the file '/etc/lilo.conf'. Assume that the 'lilo' command has been run while this configuration file is as listed. Which of the following statements correctly describes what happens when this machine boots up?
  • A. The system boots after a 20 second delay, and absent user
           intervention the root filesystem is on /dev/hda10.
  • B. The system boots after a 20 second delay, and absent user
           intervention the root filesystem is on /dev/hda9.
  • C. The system boots after 2 seconds delay, and absent user
           intervention the root filesystem is on /dev/hda9.
  • D. The system boots after a 200 second delay, and absent user
           intervention the floppy disk is a fallback boot device.
2.6/2/1alphabetic
Which command line can be used to restart a running Linux system immediately?
  • A. restart --delay=0
  • B. reboot -w
  • C. halt -p
  • D. shutdown -r now
1.8/1/1alphabetic
Suppose that you know that a task deals with the general concept "floozflam", but you are not certain what Linux command(s) are available for working with floozflams. Which of the following Linux command lines would be the BEST first step in finding out about available tools?
  • A. man floozflam
  • B. locate floozflam
  • C. apropos floozflam
  • D. whatis floozflam
1.8/1/2alphabetic
Suppose you know that an application 'someapp' is installed on the current system. You have already examine the man and info pages for 'someapp', but are trying to find additional information about 'someapp'. Which of the following directories is the BEST first place to look for further documentation files?
  • A. /usr/local/doc/someapp-2.37
  • B. /usr/share/doc/someapp-2.37
  • C. /etc/someapp-2.37/doc
  • D. /etc/doc/someapp-2.37
1.8/1/3alphabetic
Which of the following Linux commands are you likely to use to display hypertextual documentation on a command?
  • A. info
  • B. man
  • C. whatis
  • D. locate
1.8/2/1alphabetic
Which of the following URLs is a BEST first internet site to go to for information about how to perform an unfamiliar Linux task?
  • A. http://www.linuxman.com/
  • B. http://www.linuxhowto.net/
  • C. http://www.linuxtoday.com/
  • D. http://www.linuxdoc.org/
1.8/3/1alphabetic
Suppose you have created an application that you wish to distribute to other users and system. Your application archive already contains the necessary executables, source code, and configuration files. But you would like to provide user with a quick explanation of the purpose and requirements of your application. Which of the following filenames BEST matches users' expectations about where first to look for application documentation
  • A. START
  • B. README
  • C. FIRST
  • D. MAKEFILE
2.11/1/1alphabetic
Which of the following Linux commands can be used to set an expiration date for a user's password?
  • A. chage
  • B. vipw
  • C. passwd
  • D. usermod
2.11/1/2alphabetic
jdoe:x:502:1000:John Doe:/home/jdoe:/bin/bash

The exhibit for this question contains a line from the file '/etc/passwd'. Which of the following statements is true, based on the information in the exhibit?
  • A. User John Doe belongs to the group with groupID 502.
  • B. Shadow passwords are used on the current system.
  • C. The username 'jdoe' belongs to the group 'jdoe'.
  • D. Members of groupID 1000 can read directory /home/jdoe.
2.11/1/3alphabetic
Which Linux command can be used to create a new user account?
  • A. newuser
  • B. useradd
  • C. mkuser
  • D. usercfg
2.11/1/4multiple alphabetic
Which Linux command(s) can be used to modify the list of groups a user belongs to?
  • A. usermod
  • B. groupadd
  • C. groups
  • D. gpasswd
  • E. chgrp
  • F. userinfo
2.11/2/1alphabetic
Which Linux file can be used to configure the default bash shell behavior for EVERY users on a system?
  • A. /etc/skel/.bashrc
  • B. /home/.bash_profile
  • C. /etc/profile
  • D. /etc/passwd
2.11/2/2alphabetic
Which of the following BEST describes the purpose of the '/etc/skel' directory?
  • A. The contents of the directory control the initialization of
           the shell environment during each login.
  • B. The contents of the directory determine the actions
           performed during the system boot process.
  • C. The contents of the directory provide a default
           environment for newly created users.
  • D. The contents of the directory list the background
           processes that run during a user's session.
2.11/3/1alphabetic
Which of the following command lines would allow you to examine how many times remote users have opened secure shells into the current system?
  • A. dmesg | less
  • B. less /proc/kmsg
  • C. sshd --log | more
  • D. vi /var/log/messages
2.11/4/1alphabetic
SHELL=/bin/bash
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    MAILTO=root
    HOME=/
    # run-parts
    01 * * * * root run-parts /etc/cron.hourly
    02 4 * * * root run-parts /etc/cron.daily
    22 4 * * 0 root run-parts /etc/cron.weekly
    42 4 1 * * root run-parts /etc/cron.monthly
    23 4 * 1,6 1 root run-parts /etc/cron.special

Refer to the '/etc/crontab' file listed in the exhibit for this question. Which of the following statements is true?
  • A. The script file '/etc/cron.special is run once a week, on
           Mondays.
  • B. The contents of the '/etc/cron.special directory are run
           during January and June.
  • C. During some parts of the year '/etc/cron.special' is run
           one minute after '/etc/cron.weekly'.
  • D. During the month of March, '/etc/cron.special' is run on
           Mondays.
2.11/4/2alphabetic
# cat /etc/cron.daily/slocate.cron
    #!/bin/sh
    renice +19 -p $$ >/dev/null 2>&1
    /usr/bin/updatedb -f "nfs,smbfs,ncpfs,proc,devpts" -e "/tmp,/var/tmp,/usr/tmp"

Based on the what the exhibit shows, which of the following statements is the BEST assumption?
  • A. When cron runs updatedb, confirmations are logged to the
           root console.
  • B. The /etc/crontab file is configured to automatically index
           remote filesystems.
  • C. cron runs updatedb at a high processor priority in
           order to complete it quickly.
  • D. The locate database is automatically refreshed on a daily
           basis.
2.11/5/1alphabetic
Which of the following Linux commands can be used to create backups of filesystems and directories?
  • A. backup
  • B. gzip
  • C. tar
  • D. archive

1.1/1/1alphabetic
Suppose that after installing a serial multi-port card on a system, the mouse connected to a serial port on your motherboard stops functioning. Which of the following commands is MOST likely to be useful in diagnosing this problem?
  • A. setserial /dev/com1 -v auto_irq
  • B. cat /dev/mouse > serial-info.dump
  • C. setserial -a /dev/cua0
  • D. ioaddr /dev/ttyS1
1.1/2/1alphabetic
To determine what SCSI devices are attached to and recognized on either of the two SCSI channels by the currently running system, which command line would be BEST to run?
  • A. cat /proc/scsi/scsi
  • B. ls -l -i /dev/sd*
  • C. stinit -v /dev/sda /dev/sdb
  • D. scsiinfo --all --probe
1.1/2/2alphabetic
Which of the following command lines would provide the most useful information in diagnosing a suspected hardware address conflict between an an EISA ethernet NIC card and a video controller?
  • A. cat /proc/irq
  • B. cat /proc/meminfo
  • C. cat /proc/iomem
  • D. cat /proc/modules
1.1/3/1alphabetic
Whick of the following Linux utilities is MOST useful in determining what sort of motherboard audio support exists on the current system?
  • A. less -f /dev/audio
  • B. pnpdetect
  • C. modprobe
  • D. sndconfig
2.2/1/1alphabetic
Which Linux utility would provide BEST guidance to determining the relative performance characteristics of the several local hard-disks installed on a system?
  • A. nfsstone
  • B. hdparm
  • C. fdisk
  • D. modprobe
2.2/2/1multiple alphabetic
boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    vga=791
    default=redhat
    keytable=/boot/us.klt
    lba32
    prompt
    timeout=200
    message=/boot/message
    menu-scheme=wb:bw:wb:bw
    image=/boot/vmlinuz-2.4.7-10
     label=redhat-2.4.7
     root=/dev/hda9
     read-only
    image=/boot/vmlinuz-2.4.16
        label=redhat
     alias=redhat-2.4.16
     root=/dev/hda9
     read-only
    image=/boot/vmlinuz-2.4.8-26mdk
     label=mandrake81
     root=/dev/hda10
     initrd=/boot/initrd.img
     append=" devfs=mount"
     read-only
    image=/boot/vmlinuz-2.2.15-4mdk
     label=mandrake71
     root=/dev/hda7
     read-only
    other=/dev/hda2
     label=eComStation
     table=/dev/hda
    other=/dev/fd0
     label=floppy
     unsafe
Please examine the '/etc/lilo.conf' file listed in the exhibit. Assume for purposes of this question that this configuration accurately matches the partitioning of the current system, and also that 'lilo' has been run while this configuration file is as listed. Which of the following statements do you know to be true?
  • A. lilo is installed to the master boot record of the first
           IDE hard-disk.
  • B. lilo is installed on the partition '/dev/hda9' where there is
           a kernel image called '/boot/vmlinuz-2.4.7-10' on that
           partition.
  • C. Exactly three partitions on '/dev/hda' contain separate
           Linux installation.
  • D. The default boot kernel image is in a file named
           'vmlinuz-2.4.16'.
  • E. The kernel image /boot/vmlinuz-2.4.8-26mdk is stored on
           the partition '/dev/hda10'.
  • F. The current system contains exactly one IDE hard-disk.
2.2/3/1mutliple alphabetic
Suppose that you have just downloaded the application 'someapp' in the form of the file
'someapp-1.3.7.src.tar.bz2'. You have placed this file in your '~/tmp' directory. Which of the following command lines would be a reasonable first step for installation of the application
  • A. rpm Uvh someapp-1.3.7.src.tar.bz2
  • B. tar xvfj someapp-*
  • C. bunzip2 someapp-1.3.7.src.tar.bz2 | tar tvf -
  • D. cat someapp-1.3.7* | tar xvfz -
  • E. dbkg -L someapp-1.3.7.src.tar.bz2 | less
  • F. make --all someapp-1.3.7.src.tar.bz2
2.2/3/2alphabetic
Which of the following commands is frequently run first when compiling an unpacked Linux application from C source code?
  • A. rpm Uvh *
  • B. make install
  • C. setup -c
  • D. configure
2.2/4/1alphabetic
Which of the following command lines would be MOST useful in determining a list of the shared libraries loaded with the application '/usr/local/bin/someapp'?
  • A. cat /etc/ld.so.conf | grep someapp
  • B. ldd -v /usr/local/bin/someapp
  • C. ldconfig -l /usr/local/bin/someapp
  • D. readlink /usr/local/bin/someapp
2.2/5/1alphabetic
Assume you are maintaining a Debian-based Linux system. You wish to install the application 'someapp'. Which of the following command lines would be the most common way to install the application?
  • A. dselect someapp
  • B. apt-setup someapp
  • C. dpkg --install someapp
  • D. apt-get install someapp
2.2/5/2alphabetic
Assume you are maintaining a Debian-based Linux system. You find a file on your system called '/usr/local/bin/curious', and are unsure why the file is present. Which of the following commands would provide you with information about the Debian package from which the file was installed?
  • A. dpkg -s /usr/local/bin/curious
  • B. dpkg -L /usr/local/bin/curious
  • C. dpkg -S /usr/local/bin/curious
  • D. dpkg -l /usr/local/bin/curious
2.2/6/1alphabetic
Assume you are maintaining a RPM-based Linux sysem. Which of the following command lines would be a likely choice for installing a precompiled distribution of the application 'someapp'
  • A. rpm -i someapp-1.3.7.src.rpm
  • B. rpm -Uvh someapp-1.3.7.i586.rpm
  • C. tar xvfz someapp-1.3.7.i386.tgz | rpm -qpl
  • D. rpm -Kv someapp-1.3.7.i386.rpm
2.2/6/2multiple alphabetic
Assume you are maintaining a RPM-based Linux sysem. Which of the following applications can be used (if present on your system) for interactive management of installed packages?
  • A. dselect
  • B. kpackage
  • C. gpackage
  • D. xrpm
  • E. rpmfind
  • F. gnorpm
2.2/6/3alphabetic
Which of the following command lines would you use to verify that a Red Hat Package for 'someapp' that you wish to install has not become corrupted, or been tampered with?
  • A. rpm -Kv someapp-1.3.7.i586.rpm | tee someapp-1.3.7.md5
  • B. md5sum someapp-1.3.7.i586.rpm | diff - someapp-1.3.7.md5
  • C. gpg --verify someapp-1.3.7.i586.rpm
  • D. checkrpm someapp-1.3.7.i586.rpm
1.5/1/1multiple alphabetic
Which of the following utilities can be used to load driver support for an additional hardware device at runtime?
  • A. modprobe
  • B. lsmod
  • C. insmod
  • D. chmod
  • E. modules
  • F. modinfo
1.5/2/1multiple alphabetic
boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    vga=791
    default=redhat
    keytable=/boot/us.klt
    lba32
    prompt
    timeout=200
    message=/boot/message
    menu-scheme=wb:bw:wb:bw
    image=/boot/vmlinuz-2.4.7-10
     label=redhat-2.4.7
     root=/dev/hda9
     read-only
    image=/boot/vmlinuz-2.4.16
        label=redhat
     alias=redhat-2.4.16
     root=/dev/hda9
     read-only
    image=/boot/vmlinuz-2.4.8-26mdk
     label=mandrake81
     root=/dev/hda10
     initrd=/boot/initrd.img
     append=" devfs=mount"
     read-only
    image=/boot/vmlinuz-2.2.15-4mdk
     label=mandrake71
     root=/dev/hda7
     read-only
    other=/dev/hda2
     label=eComStation
     table=/dev/hda
    other=/dev/fd0
     label=floppy
     unsafe
The exhibit for this question is one screen of the kernel config utility at '/usr/src/linux-2.4.17/scripts/Menuconfig'. Based on this screen which of the following statements describe the kernel that would be created after saving the listed options?
  • A. Multi-IO card drivers are contained in loadable modules
           rather than in the base kernel.
  • B. The compiled system supports parallel ports at a hardware
           level, but we cannot determine whether parallel printer
           support is installed.
  • C. IEEE 1284 (enhanced parallel) mode drivers are contained
           in loadable modules rather than in the base kernel.
  • D. PCMCIA management drivers are contained in loadable
           modules rather than in the base kernel.
  • E. Kernel support for SuperIO chipsets is included in this
           base kernel.
  • F. IEEE 1284 (enhanced parallel) mode drivers are compiled
           directly into this base kernel.
1.5/2/2alphabetic
Which of the following command lines can NOT be used to configure the compilation of a new Linux kernel and kernel modules?
  • A. make xconfig
  • B. make menuconfig
  • C. make kernconfig
  • D. make config
1.7/1/1alphabetic
Which of the following key sequences will save changes made during a 'vi' editing session, and end the application?
  • A. <esc>:qw
  • B. <esc>:sx
  • C. <esc>:wq
  • D. <esc>:xs
1.7/2/1alphabetic
Which of the following utilities can be used to terminate a spooled print job without printing it?
  • A. lpr
  • B. lpc
  • C. lpd
  • D. lpq
1.7/3/1multiple alphabetic
Which of the following Linux comand lines will convert a plain text file 'file.txt' to postscript for later (prettified) printing or viewing? Assume for this question that any mentioned utilities are actually installed to the system in question.
  • A. enscript -p - file.txt > file.ps
  • B. a2ps -o file.ps file.txt
  • C. text2ps < file.txt > file.ps
  • D. cat file.txt | lpr -P file.ps
  • E. ps2ascii file.ps file.txt
  • F. gs --source=file.txt --output=file.ps
1.7/4/1alphabetic
There have been a number of print-spooling systems developed for Linux, often offering a different range of capabilities such as format conversions and job-control tools. Which ONE of the following is NOT a widely used print-spooling system?
  • A. CUPS
  • B. GPR
  • C. PDQ
  • D. LPD
1.7/4/2alphabetic
There have been a number of document-type filtering systems developed for Linux, and working in cooperation with print-spooling daemons. Which ONE of the following is NOT a widely used filtering tool?
  • A. Apsfilter
  • B. Magicfilter
  • C. printfilter
  • D. doctype-filter
1.9/1/1alphabetic
# head -2 /home/jdoe/.bashrc
    PS1='From .bashrc --* '
    export PS1
    # head -2 /home/jdoe/.bash_login
    PS1='From .bash_login --* '
    export PS1
    # head -2 .bash_profile
    PS1='From .bash_profile --* '
    export PS1
    # grep 'PS1=' /etc/bashrc
    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
The exhibit for this question shows several shell configuration files. Assume for this exercise that the PS1 environment variable is not modified elsewhere in the (partially) displayed files, nor is it set anywhere else. If user 'jdoe' opens a secure shell connection to this system (named 'fury') from a remote location, what will his bash prompt display?
  • A. From .bashrc --*
  • B. From .bash_login --*
  • C. From .bash_profile --*
  • D. [jdoe@fury jdoe]$
1.9/1/2alphabetic
# head -2 /home/jdoe/.bashrc
    PS1='From .bashrc --* '
    export PS1
    # head -2 /home/jdoe/.bash_login
    PS1='From .bash_login --* '
    export PS1
    # head -2 .bash_profile
    PS1='From .bash_profile --* '
    export PS1
    # grep 'PS1=' /etc/bashrc
    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
The exhibit for this question shows several shell configuration files on machine 'fury'. Assume for this exercise that the PS1 environment variable is not modified elsewhere in the (partially) displayed files, nor is it set anywhere else. If the root user issues a 'su jdoe' command, what will her bash prompt display?
  • A. From .bashrc --*
  • B. From .bash_login --*
  • C. From .bash_profile --*
  • D. [jdoe@fury root]$
1.9/2/1alphabetic
Which of the following bash command lines could be used to "run every executable file in the current directory"?
  • A. for i in * ; do { case [ -x $i ] ; { ./$i; } esac } done
  • B. while i in * ; do { if [ -x $i ] ; then { ./$i; } fi } done
  • C. foreach i in * ; do { if [ -x $i ] ; then { ./$i; } done }
  • D. for i in * ; do { if [ -x $i ] ; then { ./$i; } fi } done
1.9/2/2alphabetic
What special line is normally placed at the top of a custom bash shell script?
  • A. #/usr/local/bin/bash
  • B. #!/bin/bash
  • C. #!/usr/env bash
  • D. #!/bash
2.10/1/1multiple alphabetic
Which of the following utilities are commonly available on a Linux system, and have the capability to detect chipset details and installed memory on local video cards (useful for configuring XFree86)?
  • A. XF86Config
  • B. SuperProbe
  • C. scanpci
  • D. XConfigurator
  • E. X11Setup
  • F. scanvideo
2.10/1/2alphabetic
The file '/etc/X11XF86Config' contains configuration information about the local X server. Where within this file can you specify the video resolutions available when using the Ctrl-Alt-(Plus/Minus) toggles?
  • A. Section "Device" / Subsection "Resolutions"
  • B. Section "Screen" / Subsection "Display"
  • C. Section "Monitor" /Subsection "Mode"
  • D. Section "Video" / Subsection "ModeLine"
2.10/2/1alphabetic
Which of the following XFree86 tools is used to configure access to remote X11 clients?
  • A. xf86config
  • B. xeyes
  • C. xaccess
  • D. xdm
2.10/3/1alphabetic
Unfortunately, not all X11 applications are well behaved. In particular, some applications are notorious for leaving behind phantom processes when an X session is exited. Which command line below might you use to make sure the application 'Xsomeapp' is terminated?
  • A. ps h -o pid -C Xsomeapp | xargs kill -9
  • B. kill -1 -C Xsomeapp
  • C. terminate `top -n Xsomeapp`
  • D. proc -kill Xsomeapp
2.10/4/1alphabetic
Suppose that you would like to allow the current system to act as an X client for SOME remote X servers. Also assume that the current system is configured to recognize the alias TRUSTED for a corresponding IP address. Which of the following command lines would allow the machine TRUSTED to run an X11 application that lives on the current system?
  • A. xallow -a TRUSTED
  • B. addremote TRUSTED
  • C. xhost +TRUSTED
  • D. Xclient --allow TRUSTED
2.10/4/2alphabetic
Which of the following environment variables is used to determine which workstation--local or remote--a launched X11 application will display on?
  • A. XTERM
  • A. CLIENT
  • A. SERVER
  • D. DISPLAY
1.12/1/1alphabetic
RFC 1700 defines a set of standard port numbers for TCP/IP services. Some of these ports are fairly obscure, while a number are used on a daily basis by a Linux systems administrator for diagnosis of network issues. Which three services are mapped to the TCP/IP ports 80, 110 and 21 (in the listed order)?
  • A. http, telnet, ssh
  • B. http, pop3, ftp
  • C. kerberos, smtp, ftp
  • D. whois, telnet, pop3
1.12/1/2alphabetic
Which of the following files is used to define aliases for IP addresses, especially within a local TCP/IP network?
  • A. /etc/hosts
  • B. /etc/services
  • C. /etc/aliases
  • D. /etc/networks
1.12/3/1alphabetic
Which of the following statements BEST describes a reason why you would want to run a DHCP server on an internal company LAN network?
  • A. To serve as a gateway between the external internet and an
           internal network, and to provide IP address translation of
           packets.
  • B. To filter network packets that may contain unauthorized or
           malicious contents, such as "hacker" portscans or overly
           large email attachments.
  • C. To allow in-company machines to access a central
           "web-services" application that is utilized in common by
           various employees.
  • D. To avoid confict between assigned IP addresses on various
           in-company machines, especially where machines such as
           laptops may between different ethernet hubs.
1.12/3/2alphabetic
Which of the following TCP/IP network utilities is the BEST tool to use to establish if a given IP address is reachable under the current network configuration?
  • A. ping
  • B. finger
  • C. route
  • D. host
1.12/3/3alphabetic
Which of the following TCP/IP network utilities is BEST used to determine the hardware ethernet address of the card(s) installed in the current machine?
  • A. netstat
  • B. ifconfig
  • C. ethers
  • D. arpwatch
1.12/3/4alphabetic
Which of the following TCP/IP network utilities is the BEST tool to use in identifying bottlenecks between remote machines on the network? Specifically, assume a goal in this debugging is to determine the paths travelled in the forwarding of network packets, and identify intermediate routers that may be dropping packets.
  • A. route
  • B. netstat
  • C. ping
  • D. traceroute
1.12/3/5multiple alphabetic
Suppose that you find that your ISPs DNS service is slow or unreliable, and you would like to configure aliases for a few frequently targetted sites directly on the machines of users of the company internal network you maintain. Which of the following TCP/IP network utilities could you use to determine the IP address assigned to symbolic domain names (e.g. "www.somehostsite.com")?
  • A. hostname
  • B. whois
  • C. host
  • D. nslookup
  • E. netstat
  • F. ping
1.12/4/1alphabetic
Which of the following commands is NOT a widely used Linux utility for initiating and configuring PPP connections?
  • A. KPPP
  • B. WvDial
  • C. netconf
  • D. netppp
1.13/1/1alphabetic
Which of the following utilities is often used in conjunction with inetd to log and filter incoming connection requests?
  • A. tcpd
  • B. logwatch
  • C. ipfilt
  • D. xinetd
1.13/1/2alphabetic
# description: the floozflam server handles
# flamflooz client connections
    service floozflam
    {
            disable         = yes
            flags           = NORETRY
            socket_type     = stream
            wait            = yes
            user            = root
            server          = /usr/sbin/in.floozflamd
            log_on_failure  += USERID
    }
The exhibit for this question shows the content of a hypothetical '/etc/xinetd.d/floozflam' configuration file. Assume that '/etc/xinetd.conf' includes the line "includedir /etc/xinetd.d", and that xinetd is used on the current system. Which of the following statements can you deduce from the provided information?
  • A. The floozflam service is carried over the UDP protocol.
  • B. Multiple floozflam servers will be forked if multiple
           incoming requests are received.
  • C. The floozflam service in not activated on the current
           system.
  • D. If a floozflam connection fails, the IP address of the
           requesting client is logged.
1.13/2/1alphabetic
Suppose that the 'sendmail' application is used on the current system as a mail transport agent. What file may user 'jdoe' modify in order to cause mail sent to him to be temporarily directed to an address outside the system's domain?
  • A. /etc/sendmail/jdoe/forward
  • B. /home/jdoe/aliases
  • C. /etc/mail/aliases
  • D. /home/jdoe/.forward
1.13/2/2alphabetic
Suppose that the 'sendmail' application is used on the current system as a mail transport agent. If the file '/etc/aliases' has been manually updated, what command needs to be run in order to cause the changes to take effect?
  • A. sendmail -bh
  • B. sendmail -ba
  • C. sendmail -bi
  • D. sendmail -bp
1.13/3/1alphabetic
Which of the following command lines can be used to determine the list of modules that have been compiled into the Apache web server?
  • A. ls /etc/httpd/modules/
  • B. httpd -l
  • C. apache --modules
  • D. less /etc/httpd/conf/modules.conf
1.13/4/1alphabetic
Which of the following files or directories is used to configure the local directories that are made available remotely by an Network File System server?
  • A. /etc/fstab
  • B. /mnt/nfs
  • C. /etc/smb.conf
  • D. /etc/exports
1.13/4/2alphabetic
Which of the following protocols/tools is MOST likely to be used in integrating a Linux system into a Windows network, and for accessing Windows files?
  • A. NFS
  • B. SAMBA
  • C. FTP
  • D. SCP
1.13/5/1alphabetic
Suppose that you have configured one Linux system on an internal LAN to run a DNS server. Which of the following files need to be updated on each DNS client on the LAN to get them to utilize the DNS service?
  • A. /etc/hosts
  • B. /etc/exports
  • C. /etc/resolv.conf
  • D. /etc/dns.conf
1.14/1/1alphabetic
In performing a security audit on a Linux system, one well-known security issue is applications that are configured to run as root (or from other high-permission accounts) that may be subject to call vulnerabilities such as buffer overruns. Which of the following command lines can be used for an initial sweep in analyzing this issue?
  • A. suid --list /*
  • B. chmod -R u-s ./*
  • C. find / -perm +4000 -user root
  • D. chgrp root `find / -suid`
1.14/1/2alphabetic
Which of the following protocols or tools is BEST used to batch copy files between networked machines in a manner that protects their contents from an intruder using a packet sniffer?
  • A. ssh/scp
  • B. httpd/SSL
  • C. gpg/snmp
  • D. nfs/md5sum
1.14/2/1alphabetic
Which of the following Linux utilities is used to update the user passwords stored in '/etc/passwd' to utilize the more secure "shadow password" style.
  • A. passwd -s
  • B. mkshadow
  • C. shadowpw
  • D. pwconv
1.14/2/2multiple alphabetic
Which of the following websites are well-known and important resources for monitoring known security problems in Linux distributions, and for obtaining patches and updates for vulnerable applications and components?
  • A. http://www.securityfocus.com/
  • B. http://www.bugtraq.com/
  • C. http://www.securityupdate.net/
  • D. http://www.cert.org/
  • E. http://www.linux-bugwatch.gov/
  • F. http://www.linuxsecurity.com
1.14/3/1alphabetic
One danger of a poorly written (or malicious) CGI application is that it can fork overly many child processes, eventually swamping the host system. Which of the following steps could BEST be used to control this specific danger?
  • A. Include the line 'ulimit -u 512'  in the file
           /etc/profile.
  • B. For each CGI user, run the command 'edquota username', and
           set blocks to 2048 (or other appropriate value).
  • C. If a user is discovered to have an errant CGI application,
           run the command line 'ps hU username -o pid |xargs kill -9'
           to terminate their stray processes.
  • D. Edit the file /etc/limits to include a line similar to
           'CGI 512 2048 0 0 -' (or other appropriate values).

6 comments:

  1. Very Good Help full site ,Thanks Dear

    ReplyDelete
  2. test looks very familiar haha, nevertheless :)

    ReplyDelete
  3. Was very helpful. ..thanks alot looking forward for more of such practice quiz as I prepare for my Linux certification

    ReplyDelete