1. Trang chủ >
  2. Công Nghệ Thông Tin >
  3. Kỹ thuật lập trình >

Chapter 34. Exam 201 Practice Test

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (10.57 MB, 1,207 trang )


This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks



34.1. Questions



1.



You have just finished creating a custom kernel. Which of the following is a valid next step for creating the kernel image?

a.



make dep



b. make bzimage

c.



make kernel



d. make image

2.



Which of the following is a common name of a kernel image?

a.



vmlinuz-2.6.10-5-686



b. minix_stage1_5

c.



System.map-2.6.10-5-386



d. initrd.img-2.6.10-5-686

3.



Which of the following is the final stage of a kernel update?

a.



Compile dependencies.



b. Create a RAM disk image.

c.



Configure the boot loader (e.g., GRUB).



d. Copy the bzImage file to the kernel name in the /boot directory.

4.



What is the name of the file in GRUB that you need to edit in order to change the kernel that will be booted by default?

a.



boot.conf



b. grub.conf

c.



img.conf



d. vmlinux.conf

5.



Which of the following do you have to accomplish before you can use an initrd image on your Debian system?

a.



Install all necessary modules for initrd.



b. Switch from LILO to GRUB.

c.



Compile cramfs support into the kernel.



d. Create a monolithic kernel.

6.



Which of the following commands allows you to easily inspect a compressed kernel patch?

a.



less



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

b. bzip2

c.



bzmore



d. source

7.



You discover that you need to remove two levels of path from a patch in order to proceed with patching a kernel. Which of the

following commands will work on a file named patch-2.6.14.4.bz2?

a.



bzip2 -dc patch-2.6.14.4.bz2 | patch -p2



b. patch -dc | bzip2 -dc patch-2.6.14.4.bz2

c.



bzip2 -dc patch-2.6.14.4.bz2 | make -p2



d. patch -dc patch-2.6.14.4.bz2 | bzImage -m2

8.



Consider the following entry in /etc/inittab:

23:respawn:/sbin/getty 38400 tty2



You wish to add another entry to start a terminal (tty) that operates at runlevels 2, 3, 4, and 5 on tty1. Which of the following is

the correct inittab entry?

a.



0 2345:respawn:/sbin/tty01 38400 getty



b. /sbin/getty 38400 tty1 :1:2345

c.



0:2,3,4,5:respawn:/sbin/getty 38400 tty0



d. 1:2345:respawn:/sbin/getty 38400 tty1

9.



What is the name of the first startup script in a Debian-based system?

a.



/boot/grub.conf



b. /etc/init.d/rc1

c.



/etc/init.d/rcS



d. /etc/rc.sysinit/init

10. Of the following options, which requireroot privileges? (Choose two.)

a.



Using the make modules install command



b. Running the make xconfig command

c.



Editing the boot loader file (e.g., grub.conf or lilo.conf)



d. Editing the Makefile that comes with the kernel

11. You have decided to have Sendmail start automatically on levels 3 and 5 of your Linux system. Which one of the following

commands makes this change?

a.



init sendmail 35



b. init 35 sendmail --on

c.



chkconfig 35 sendmail on



d. chkconfig --level 35 sendmail on

12. Write in the command that allows you to adjust the system so that a filesystem check is run every 200 boots.



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

13. You have just issued the following command:

mkisofs -T -r -L -l -J -o /var/tmp/image.iso /home/james/backup/



Which of the following describe the results of this command? (Choose two.)

a.



mkisofs will generate a warning that it is creating a filesystem that is not ISO9660-compatible.



b. The command will fail because you are not creating a filesystem that is ISO9660-compatible.

c.



mkisofs will generate the image in such a way that non-root users can mount it on any Linux system.



d. The command will create a filesystem that allows long filenames and Unix-style symbolic links.

14. You have just added a SCSI disk to a production system. The new drive is recognized as /dev/sdb. You wish to create the

ReiserFS file system on the entire disk. Which of the following commands will do this? (Choose two.)

a.



mke2fs -j -L Disk_2 /dev/sdb



b. mkfs.reiserfs --label Disk_2 /dev/sdb

c.



mkreiserfs --label Disk_2 /dev/sdb



d. mke2fs -j -L Disk_2 /dev/sdb1

15. You wish to learn about the last time boot information was written to the/dev/hda2 partition on your Linux system. Which of

the following commands do this? (Choose two.)

a.



tune2fs -l /dev/hda2



b. fsck -l /dev/hda2

c.



fdisk -l /dev/hda2



d. dumpe2fs -h /dev/hda2

16. You have been asked to transfer the contents of a smaller hard disk (/dev/hdb) to a larger hard disk (/dev/hdc). Which of the

following commands allows you to do this most efficiently?

a.



cp -s /dev/hdb /dev/hdc



b. dd if=/dev/hdb of=/dev/hdc

c.



dd bs=8k if=/dev/hdb of=/dev/hdc



d. dd bs=1k if=/dev/hdb of=/dev/hdd ln -s /dev/hdb /dev/hdd

17. Consider the following /etc/raidtab file:

raiddev /dev/md0

raid-level 1

nr-raid-disks 2

chunk-size 64k

persistent-superblock 1

nr-spare-disks 0

device /dev/hda2

raid-disk 0

device /dev/hdc2

raid-disk 1



Which of the following commands is necessary to activate this configuration?



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

a.



mdadm /etc/md0



b. mkraid /etc/md0

c.



mdadm /dev/md0



d. mkraid /dev/md0

18. A developer has called you and asked you to troubleshoot a device driver for a PCI card your company has decided to

support. He needs to know the IRQ that the device uses, as well as the latency statistics. Which of the following commands

should you issue in order to give him the information he needs?

a.



lspci-p



b. setserial

c.



lspci -vv



d. lsdev -C /dev/

19. You are having problems attaching a USB hard drive to your system. You wish to determine the data transfer capabilities of

the device, as well as the potential connection speed of the USB controller. Write in the application that will help you

determine this information in the space.

20. You suspect that a hard drive's Direct Memory Access (DMA) ability is creating problems for you as you troubleshoot

problems on the system. Which of the following commands disables direct memory access on your system?

a.



hdparm -d1 /dev/hda



b. sysctl dma=disable /dev/hda

c.



hdparm -d0 /dev/hda



d. sysctl disable=dma /dev/hda

21. A PCMCIA device on a laptop sometimes renders the system unstable if it is ejected without warning. Which of the following

commands informs the system that the card is going to be shut down?

a.



sudo cardctl suspend



b. sudo cardctl eject

c.



sudo cardctl config



d. sudo cardctl reset

22. You wish to temporarily prohibit a user with the account name james from using a system's Samba account. However, you

still want to allow this user to log on to the system using the X Window System and SSH. Which of the following solutions will

accomplish this goal most efficiently?

a.



Edit the /etc/passwd file as root using a text editor and comment out thejames account's username.



b. Enter sudo smbpasswd -x james.

c.



Become root, edit the /etc/samba/smbusers file, and comment out thejames account's username.



d. Enter sudo smbpasswd -d james.

23. Which of the following is the suggested back-end database for a Samba server that does not require LDAP or built-in

database replication?

a.



mysqlsam



b. xmlsam

c.



shadow



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

d. tdbsam

24. Consider the following alternative entries in /etc/exports:

/home/james/

/home/james/



james.stangernet.com(rw)

james.stangernet.com (rw)



What is the result of these two entries?

a.



The top entry shares the /home/james directory with read and write permissions to any user from the

james.stangernet.com DNS domain. The bottom entry shares the/home/james directory with read-only

permissions to any user in the james.stangernet.com domain, but gives read and write permissions to all other

users anywhere.



b. The top entry will be ignored because it has improper syntax. The bottom entry shares the /home/james directory

with anyone in the james.stangernet.com DNS domain with read and write permissions. No one else will have

access.

c.



The top entry shares the /home/james directory with read-only permissions to all users, except for the

james.stangernet.com domain. The bottom entry shares the/home/james directory with read-only permissions to

the james.stangernet.com domain, but with read and write permissions to all other users.



d. The top entry shares the /home/james directory with anyone in the james.stangernet.com DNS domain with read

and write access. The bottom entry will be ignored, because it is not formatted properly.

25. What user account does NFS change root-owned files to, and why?

a.



To the nfs account, to avoid allowing users to overwrite files essential to the operation of the NFS daemon



b. To the sys account, to avoid allowing users to overwrite files created by theroot user

c.



To the first non-root account listed in the /etc/passwd file, to avoid overwriting essential system files



d. To nfsnobody, to avoid allowing users to upload programs that have the setuid bit set toroot

26. Which of the following files contain real-time information that will help you troubleshoot NFS? (Choose two.)

a.



/proc/fs/exports



b. /etc/fstab



c.



/etc/exports



d. /proc/fs/nfsd



27. Complete the following line to configure syslog so that it sends log messages to a remote host named

backup.stangernet.com:

*.info;mail.none;authpriv.none;cron.none ___________________ .



28. Which of the following lines sends all emergency messages to the file named /var/log/crit.log?

a.



/var/log/crit.log emerg.*



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks



b. *.emerg var/log/crit.log



c.



/var/log/crit.log /dev/console:0:/var/log/crit.log



d. emerg.* /var/log/crit.log



29. You have downloaded OpenOffice.org. You have just untarred the tarball and have discovered that it contains all RPM files.

You intend to use OpenOffice.org on a Debian-based system, however. You are currently in the directory that contains the

RPM files. Which of the following commands converts the RPM files to a package format that Debian can use?

a.



alien *



b. sudo alien *



c.



dpkg -c *.rpm



d. alias -c *



30. Consider the following code:

%files

%attr(0755, root, bin) /usr/bin/file

%attr(0644, root, bin) /usr/local/man/man2/manpage.1



What type of file is this code from?

a.



A Debian file



b. A typical Makefile

c.



The /etc/manpath.config file



d. An RPM spec file

31. You need to install an update to Perl but are not sure of the exact name of the Perl module, due to poor documentation. You

need to navigate the update options in an interactive shell. Which of the following is the correct command to begin interactive

mode?

a.



perl -e 'use interactive;'



b. perl -a -s=/bin/bash



c.



perl -MCPAN -e shell



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

d. perl --update



32. You need to execute a script named backup three hours from now, but do not plan on being in front of your system, or at a

terminal where you can access your system. Which of the following commands allows you to execute this script?

a.



at now + 3 hours


b. crontab -e < 0 3 * * * backup



c.



at now + 3 >backup



d. echo "0 3 * * * backup" >> /etc/crontab



33. You have downloaded an ISO image and have burned it to a CD several times. However, the CD never seems to work

properly. You suspect a problem with the ISO image you have downloaded. Which of the following commands can you issue

to verify that this ISO image is valid?

a.



sudo mount -o loop -t iso9660 /home/james/image.iso



b. sudo mount -t loop -o iso9660 /home/james/image.iso /mnt/iso



c.



sudo mount -o loop -t iso9660 /home/james/image.iso /mnt/iso



d. sudo mount -loop -t iso9660 /home/james/image.iso /mnt/iso



34. List the rdev option that allows you to specify /dev/hda5 as the swap device. (Note: There is more than one way to do this.)

35. Consider the following line in /etc/fstab:

/dev/hda5



/



ext3



defaults -ro 0



1



36. What option would you add to this partition so that no files could be executed on it?

a.



exec=0



b. noauto

c.



e0



d. noexec

Which of the following lists the four standard boot stages in the correct order?

a.



The boot loader starts, the kernel loads, hardware initialization, service/daemon startup



b. The boot loader starts, service/daemon startup, hardware initialization, the kernel loads



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

c.



Hardware initialization, the boot loader starts, the kernel loads, service/daemon startup



d. The boot loader starts, hardware initialization, the kernel loads, service/daemon startup

37. An older Linux system fails at boot time, displaying the following letters:

LIL



38. Which of the following is the most plausible explanation for the error?

a.



The second stage boot loader has loaded at an invalid address.



b. The second stage boot loader cannot start, but can find the descriptor table.

c.



The second stage boot loader was able to start, but the descriptor table has not been found.



d. The second stage has been able to start, but the LILO boot loader has detected a problem with the map installer.

39. You are trying to share a drive using NFS but are experiencing problems. You have tried restarting the portmapper. You have

verified network connectivity and that the /etc/exports file is formatted properly. You have properly usedroot privileges. Which

of the following steps can help you determine the exact point where nfsd and the portmapper encounter problems?

a.



Use the following command: tail -f /var/log/messages.



b. Precede your commands with the strace command.

c.



Restart the system to restart the networking scripts.



d. Verify that the nmbd daemon is running properly.

40. Which of the following is the most plausible reason for a "Too many levels of symbolic links" error message?

a.



The symbolic links to the /boot/vmlinuz-2.6.10-5-686 file have become corrupt.



b. A symbolic link still exists, but the file it refers to has been deleted.

c.



A series of symbolic links has led to a infinite loop.



d. A symbolic link has been made to a symbolic link.

41. A command keeps failing, no matter what changes you make to its configuration file. You suspect that the command makes a

call to a missing dynamic library. Which of the following can help you confirm your suspicions most effectively?

a.



ltrace



b. strace



c.



paratrace



d. mtrace



42. You have received a binary file from a coworker. You are not sure if the file is the correct one. You would like to quickly

inspect its plaintext contents. Which of the following commands will help you view the human-readable contents of the file?

a.



cat



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

b. strings



c.



less



d. mtrace



43. Which of the following files contains instructions concerning the mail directory for each user?

a.



/etc/sysctl.conf



b. /etc/bashrc



c.



/etc/login.defs



d. /etc/sysconf.conf



44. The size of the kernel ring buffer has been set to 17384, which is 1000 more than the default. You wish to use the dmesg

command to read the entire buffer. Write in the command that you would issue.

45. You wish to mail the results of a cron job to a remote account named james.stangernet.com. The message is supposed to be

sent every 20 minutes. You have created the following script:

*/20 * * * * /bin/security_program | mailx -s "Security report" user@gmail.com



However, the gmail.com account keeps bouncing the email. Which of the following can help you solve this problem?

a.



Use the mail program instead of mailx.



b. Change the subject line of the mailx command. No spaces can be included.

c.



Fix the crontab file to have messages sent every 20 minutes, rather than every 20 days.



d. Configure the system sending the message to rewrite the message headers so that they belong to a valid DNS

domain.

46. A user has just gotten married. She complains that her old name appears in the From field whenever she sends email using

the mail command. Which of the following will likely solve this problem?

a.



Create an alias in the /etc/aliases file to map the user's account name to her real name.



b. Edit the /etc/passwd file and change the fourth field of the user's new name.

c.



Edit the /etc/mail.conf file to reflect the user's new name.



d. Create an alias in the user's .bashrc file that maps the user's old name to the user's new name.

47. A user cannot currently log in. You check the /etc/shadow file and notice that an asterisk appears in the second field of that

user's entry. Which of the following should you do to solve this problem?

a.



Edit the /etc/shadow file using a text editor and enter a default password.



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register

.

it. Thanks

b. Use the passwd command to create a new password for the user.

c.



Use the shadowconfig command to create a new shadow file, because the existing file is corrupt.



d. Edit the /etc/shadow file to remove the asterisk.

48. You need to use the lsof command to determine which program has caused a system to hang for an unacceptably long time

when it boots. You wish to direct lsof to avoid making any calls to the kernel that would cause the kernel to block the function

of the lsof command. Write in the lsof command and option.

49. You wish to determine whether a problem exists with the boot process of a system's second IDE hard drive. Which of the

following commands helps you read kernel messages concerning the second drive?

a.



lsof | grep hdb



b. dmesg | grep hdb



c.



strings /dev/hdb



d. modprobe -l | grep hdb



50. You cannot get a Samba server to run. You view the /etc/samba.smb.conf file and notice that the following lines have been

uncommented:

wins support = yes

wins server = 192.168.2.33



From these lines, you can tell that the problem is:

a.



Your Samba server is trying to access a nonfunctioning WINS server.



b. The WINS server is using a private IP address.

c.



The wins support entry should read wins support = 1.



d. The Samba server is configured to be both a WINS client and a WINS server.

51. A new application has been installed on a Linux web server to ensure more correct tracking of user visits. This application

has required the installation of several new shared libraries. A system administrator has issued the following command:

ldconfig -NX



However, the new application still complains that the libraries are not to be found. Which of the following will solve the

problem?

a.



Reinstall the libraries after running ldconfig -NX.



b. Specify the correct location of the libraries as an argument to ldconfig -NX

c.



Run ldconfig without arguments.



d. Download the latest libraries from the developer.

52. Which of the following commands measures the transfer rate of the first SCSI drive on a system?



This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks.

a.



hdparm -Tt /dev/sda



b. lsof -t /dev/sda



c.



hdparm -X /dev/sda



d. lsof -X /dev/sd1



53. A coworker has installed a new IDE optical device on a Linux server. The drive has been recognized as device /dev/hdc. You

wish to verify its drive speed and whether DMA is enabled. Which of the following commands allows you to do this?

a.



cat /proc/ide/hdc/settings



b. lsof | grep hdc



c.



cat /etc/mtab



d. sysctl -a



54. You have just downloaded the latest Linux kernel. Which of the following is a step you should take before runningmake

xconfig?

a.



Type oldconfig -p



b. Type make restore

c.



Type make oldconfig



d. Type mrproper

55. You wish to run fsck even though the system thinks that the filesystem is clean. You also wantfsck to automatically repair any

problems, should they be encountered. What fsck options would you choose? (Choose two.)

a.



-y



b. -f



c.



-n



d. -r



Xem Thêm
Tải bản đầy đủ (.pdf) (1,207 trang)

×