LPI”@Level 1”@101
| 1. | You are writing a script to automate some tasks. You would
like to be able to have a log of everything that you see printed to your
console, yet you want to be able to see the output on the console as well. What textutils command would typically be used to accomplish this? tee |
| 2. | The pppd daemon is needed to establish a PPP link to another computer? |
| 3. | What must be added to the following to enable group quotas for /usr ? /dev/hda2 /usr ext2 defaults 1 1 grpquota |
| 4. | Which command will tell you which groups you belong to ? groups |
| 5. | What utility is used to verify the integrity of a filesystem? (Do not specify path or parameters) fsck |
| 6. | What command could be used to get a hierarchical view of all the processes running on the system without requiring your to provide any switches or options ? pstree |
| 7. | which command can setup process's priority before process execute ? nice |
| 8. | Type in the command line that will execute cmd2 regardless of exit status of cmd1. Assume these commands are on the systems PATH and the command names are cmd1 and cmd2 ? cmd1;cmd2 |
| 9. | which command can return first few lines in a file ? head |
| 10. | You want to redirect the last 30 lines of a file to another file. What single command would best fit your needs? tail |
| 11. | The grep command is typically used to search files for a specified string. |
| 12. | Which of the following contains typical targets of a Makefile ? A. Prefix, exec_prefix, bindir, mandir B. CFLAGS, CPPFLAGS, LIBS, LDFLAGS C. PATHS, DESTDIR, MANPAGES, CONFIGFILES D. clean, test, install, uninstall |
| 13. | You have a system that uses LILO from the Master Boot Record. You have
just recompiled a new kernel. You already have a backup kernel setup to
boot from LILO so you overwrite your existing kernel with new kernel image
using the same name and location. When you reboot, you find the system does
not boot. What is likely to be the problem? A. The new kernel image is above the 1024 cylinder and therefore cannot be loaded. B. You did not update your /etc/lilo.conf file to boot the new kernel. C. You need to boot the new kernel with a boot floppy to restore the old kernel. D. You reboot before re-installing LILO in the Master Boot Record. |
| 14. | You are building a server that will undergo many hardware and operating
system upgrades. The server is the file server for all users on your 100
user network. Which directory should have its own mountpoint and/or hard
drive? A. /boot B. /sbin C. /home D. /etc |
| 15. | 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 could 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/' letter>newletter |
| 16. | You want to examine the changelog for the installed package "postfix".
Which command will display the changelog? A. rpm -Vc postfix B. rpm -qpil postfix C. rpm --changelog postfix D. rpm -q --changelog postfix E. rpm -qa --changelog postfix |
| 17. | Your lead system administrator has just instructed you to check the GPG
signature an upgrade RPM (linuxconf-1.16r10.2.i386.rpm) prior to installing
it. What is the correct command to accomplish this task? A. rpm -qV linuxconf-1.16r10.2.i386.rpm B. rpm -Vpil linuxconf-1.16r10.2.i386.rpm C. rpm -qpil linuxconf-1.16r10.2.i386.rpm D. rpm --checksig linuxconf-1.16r10.2.i386.rpm E. rpm -qp --checksig linuxconf-1.16r10.2.i386.rpm |
| 18. | After a minor security incident you are instructed by your lead sys-admin
to verify the RPM's installed on a running system. Which command will create a complete report which you can analyze for changes which may be security related ? A. rpm -Va >report B. rpm -Qavy >report C. rpm -Vqt --nomd5 >report D. rpm --checkfiles >report E. rpm -Va --nofiles >report |
| 19. | You need to know where all the configuration files for the installed package
named "postfix" are located. Assuming it was installed with rpm, which command will list this information for you? A. rpm -qc postfix B. rpm -Vc postfix C. prm --config postfix D. rpm -listconfig postfix E. prm -qa --config postfix |
| 20. | You have just typed the following three commands and got the folowing
output: prompt> echo $PATH /usr/bin:/usr/local/bin:usr/sbin:opt/kde/bin prompt> pwd /home/anna/games promt> ls game1 game2 game3 You want to run the program game1, but get the response that it is not found. What did you forget to do ? A. To type ./game1 rather than game1. B. To switch the directory /home/anna first. C. To unset your PATH before running the program. D. To set execution permissions for the program game1. |
| 21. | When the kill command is given with only the PID number of the process
to kill,this corresponds to which type of kill signal? A. 2-SIGINT B. 1-SIGHUP C. 9-SIGKILL D. 3-SIGOUIT E. 15-SIGTERM |
| 22. | In the command "test < king | testking" A. The stdout from the command testking is saved to the file test. B. The stdout from the command test is saved to the file testking. C. The command testking receives its stdin from the stderr of test. D. The command testking receives its stdin from the stdout of test. E. The command king receives its stdin from the contents of the file testking. |
| 23. | To keep a process running after you logged out, you start it with the
command: A. nohup B. fg C. live D. sh |
| 24. | You have just edited /etc/syslog.conf to log error messages from the mail
facility to the file /var/log/mail/errors. What else must you do to activate
the change you just made? A. nothing,it is now active. B. touch /var/log/mailerrors C. kill -9 `cat /var/run/syslog.pid` D. kill -HUP `pidof syslogd` E. touch /var/log/mailerrors;kill -HUP `syslogd` |
| 25. | You have a Linux system with a 100GB ext2 partition containing large amounts
of data. To minimize the boot time, you decide to convert it to a journaling
filesystem. Which journaling file system would be easiest to convert the
partition to (without destroying existing data)? A. resiserfs B. vfat C. ext3 D. xfs |
| 26. | You want to make sure certain directories are excluded when you update
your locate database file. Where would you typically store this configuration?
A. /etc/locatedb.conf B. /etc/slocatedb.conf C. /etc/searchdb.conf D. /etc/updatedb.conf |
| 27. | Which entry in /etc/fstab will allow any user to mount and unmount /dev/cdrom?
A. /dev/cdrom /cd ro,noauto,unhide, all iso9660 0 0 B. /dev/cdrom /cd iso9660 ro,noauto,nonroot 0 0 C. /dev/cdrom /cd iso9660 ro,user,noauto,unhide 0 0 D. /dev/cdrom /cd iso9660 ro,users,noauto,unhide 0 0 E. /dev/cdrom /cd iso9660 ro,noauto,defaults 0 0 |
| 28. | What does the command "ln test king" typically do ? A. It will create a symbolic link from test to king. B. It will create a hard link from king to test. C. It will create a symbolic link from king to test. D. It will create a copy of the file test in king. |
| 29. | What symbol can be placed at the end of a line to indicate that the command
continues on the next line? A. / B. \ C. ; D. | E. : |
| 30. | Two directories require different quota for file system usage. The /var/mail
directory needs a 20MB quota, and the /home directories require a 40MB quota.
What must be true about these directories? A. They must exist on Ext3 partitions B. They must be on different drives C. They must be on different partitions D. They must be mounted by the root user |
| 31. | You are writing text in vi. Now you want to save your changes and exit.
Which two sequence of inputs will accomplish this? A. ZZ B. :w! C. zz D. :wq! E. XX |
| 32. | Which of the following commands may be used to view PCI devices seen by
the Linux kernel? (Choose two) A. less lspci B. less /dev/pci C. less /proc/pci D. less /proc/devices/pci E. lspci | less |
| 33. | which file will be ldconfig command read ? A. /etc/ld.so.conf B. /etc/ldconfig C. /etc/update.db D. /etc/cache |
| 34. | What file would you edit in your home directory to change which window
manager you want to use? A. Xinit B. .xinitrc C. XF86Setup D. xstart E. xf86init |
| 35. | Which of the following best describes the order in which X Window files
are executed or read ? A. startx -> xinit -> xinitrc -> Xclients B. xinit -> startx -> Xclients -> xinitrc C. xinitrc -> Xclients -> startx -> xinit D. Xclients -> startx -> xinitrc -> xinit |
| 36. | What section of the XF86Config file contains the entry to set the path
for fonts used? A. Fonts B. Files C. Ttype D. ATM E. FontPath |
| 37. | What is the name of the default XFree86 Font Server? A. xfs B. xfserver C. xfree86fs D. Xfs E. xfontserver |
| 38. | You have a user whose account you need to lock but not remove. To accomplish
this, what file should you edit and what do 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 file and remove the last field. D. Edit /etc/passwd and insert an * after the first :. E. Edit /etc/group file put a # dign in front of his name. |
| 39. | The output from the jobs command in bash is : [1] Stopped joe superbatch. 1.sort [2]- Stopped (signal) lynx http://www.microsoft.com/ [3]+ Stopped(signal) top Which of these commands could be used to kill the process running top? A. kill %3 B. bg %3 C. kill -9 3 D. fg %3;kill E. job %3 -kill |
| 40. | One of the lines in the output from the command `ls -l /home/poms` is drwxrwsr-x 3 devel poms 1024 Oct 22 16:28 foo The output from the command `groups bubba` is ”V bubba:bubba poms acts. If user bubba executes the command `touch /home/poms/foo/bar`,which of the following must be true?(choose two) A. The group for /home/poms/foo/bar with be poms. B. The owner for /home/poms/foo/bar with be devel. C. The owner for /home/poms/foo/bar with be bubba. D. The group for /home/poms/foo/bar with be bubba. E. The permissions for /home/poms/foo/bar will allow group read. |
| 41. | What single command could you use to list a file contents in reverse order ? (Include only the command without options or arguments) tac |
| 42. | You are preparing to mount a new ext3 partition. What command would you use to check the filesystem for errors before mounting it? (Include only the command without path, options, or arguments) e2fsck |
| 43. | Which of the following is a typical rule for allocating swap space for
a Linux installation? A. Use 25% of available drive space for a swap partition. B. Use 10% of available drive space for a swap partition. C. Use 50% of total RAM for the size of a swap partition. D. Use 200% of total RAM for the size of a swap partition. E. Use 128MB on each hard disk in the system for swap. |
| 44. | You have compiled a program from source successfully, buy you are getting
permission errors when you try to install the binaries. What is most likely the problem? A. Both rpm and dpkg need to be run as root. B. You have the wrong permissions set on the /usr/bin directory. C. The wrong prefix was used during the configuration or was not properly defined for the compile stage. D. The binaries need to be installed into directories that need root privileges to write to them. |
| 45. | Which RPM command would produce the following output Name : xwhois Relocations: (not relocatable) Version : 0.3.7 Vendor: Tess King Release : 1 Build Data: Fri 06 Aug 1999 09:29:07 AM EDT Install date: (not installed) Build Host: desktop.infohvy.com Group : Application/Internet Source RPM: (none) Size : 74057 License: GPL Packager : Ryan Weaver <ryanv@testking.com> URL : http://www.goatnet.ml.org/software.html Summary : X Windows Whois Tool Description: xwhois is a small and fast query tool for the whois service. (rfc954) xwhois-0.3.7.tar.gz xwhois.spec A. rpm -qpil xwhois-0.3.7-1.src-rpm „H¤U²¤”C |
| 46. | You are about to install a new program on an RPM based Linux system. Which
of the following would be the best way to accomplish this? A. Get the source code in a tarball and install from that source. B. Get a source RPM and use rpm to install it. C. Use rpm to install the program's binaries from an RPM package. D. Use cpio to extract the binaries from a source RPM and use rpm to install those sources. |
| 47. | After starting vi to edit an existing text file, you press 'A' (shift
+a). This will let you: A. Insert text at the end of the current file. B. Insert text at the end of the current sentence. C. Insert text after your current cursor position. D. Insert text at the end of the file. E. Insert text at the end of your current paragraph. |
| 48. | You run the following commands: [user@prompt]$ nice -n 1 program1 [user@prompt]$ nice -n 5 program2 [user@prompt]$ nice -n 10 program3 Which of the program started will have the highest priority? A. program1 B. program2 C. program3 |
| 49. | You have a SCSI system with five SCSI hard disks. You add another SCSI
hard disk to your system and the system no longer boot, nor is the bootloader
loaded. What is the most likely cause of this problem? A. There are too many devices on the chain. B. The boot disk needs a different SCSI ID, C. The new disk is conflicting with the SCSI adapter. D. The new SCSI drive is conflicting with the IDE boot drive. E. The new SCSI drive needs a different SCSI ID. |
| 50. | Which command removes all subdirectories in /tmp, regardless of whether
they are non-existent or in use? A. del /tmp/* B. rm -rf /tmp C. rm -Ra /tmp/* D. rm -rf /tmp/* E. delete /tmp/*,* |
| 51. | After executing the following command line, what will be the contents
of the file myout.txt? echo \"test king\" | cat > myout.txt A. Test kinG B. "test king" C. test king cat D. the file is empty |
| 52. | How can you generate a report on disk usage and quotas for all filesystems
which are defined in /etc/mtab to be read-write with quotas. A. quotarep -a B. repquota /dev/hd* C. repquota -a D. quotarep /dev/hd* |
| 53. | If you set the umask to 022, by default what permissions will your files
have? A. 0220 B. 0557 C. 0644 D. 0755 |
| 54. | You installed a new experimental kernel and found that one of your ext2
partitions no longer functions. You tried unsuccessfully to repair it. What program can you use to interactively debug the filesystem? A. e2fsck B. tune2fs C. debugfs D. tine2fs E. dumpe2fs |
| 55. | You have the following file: -rwxrwxr-x 1 foo root 0 Feb 23 07:48 /bin/foo Which of the following commands will change the owner of the file /bin/foo from the foo user to the bar user without affecting group ownership? A. chown /bin/foo bar B. chown bar /bin/foo C. chown bar.foo /bin/foo D. chown.foo.bar /bin/foo |
| 56. | Which of the following programs can be used to the find the foo program
in the PATH and associated man pages, but not list every file containing
foo on the system? A. which B. search C. slocate D. where E. whereis |
| 57. | Your unmask is set to 002. If you create a new file, what will the permission
of the new file be? A. -rw-rw-r-- B. rwxrwx-w- C. ------w- D. rwxrwxr-x |
| 58. | You have just set up the X Display Manager. What file is typically used
as the primary configuration file for XDM? A. xdm.config B. XF86Config C. xdm.conf D. Xsetup E. xdm-config |
| 59. | What is the result of the following command? command > file1.out 2>&1 A. Redirects stderr to file1.out B. Redirects the stderr to the same location as the stdout. C. Redirects stdout to the screen and stderr to file.out D. Redirects all the output to the same location as the stderr |
| 60. | A user named TestKing needs to execute a system script file. What rights
do the user need to execute a script file? A. Read B.Write C. Execute D.The read right on Directory. E.Read-only for user, Execute for group”@”@ |