Self Test

 < Day Day Up > 



The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully, as there may be more than one correct answer. Choose all correct answers for each question. This is just to test your understanding of the material; Red Hat no longer includes multiple choice questions on the RHCE or RHCT exams.

Shell Configuration Files

1. 

The system-wide file associated with the bash shell is:

  1. /etc/shells.conf

  2. /etc/startup.sh

  3. /etc/profile

  4. There is no system-wide shell startup file; all such files reside in individual user directories.

 c . this is the system-wide shell script executed for all users. a and b are incorrect because there are no such files. while each user does get their own hidden configuration files in their home directories, they apply only to that user. d is incorrect because answer c is correct.

Answers

1. 

þ C. This is the system-wide shell script executed for all users.
ý A and B are incorrect because there are no such files. While each user does get their own hidden configuration files in their home directories, they apply only to that user. D is incorrect because answer C is correct.

Setting Up and Managing Disk Quotas

2. 

You are running an ISP service and provide space for users' Web pages. You want them to use no more than 40MB of space, but you will allow up to 50MB until they can clean up their stuff. How could you use quotas to enforce this policy?

  1. Enable grace periods; set the hard limit to 40MB and the soft limit to 50MB.

  2. Enable grace periods; set the soft limit to 50MB and the hard limit to 40MB.

  3. Enable grace periods; set the soft limit to 40MB, and the hard limit to 50MB.

  4. None of the above.

 c . enable grace periods; set the soft limit to 40mb, and the hard limit to 50mb. this will warn users they are over their limit after the grace period, but will make sure they do not exceed the 50mb true maximum barrier. a is incorrect because the soft limit must be less than the hard limit. b is incorrect because it is actually the same as a . d is incorrect because c does the job.

3. 

If you wanted to configure quotas for everyone on the /home directory, what would you add to the options in /etc/fstab?

  1. quota

  2. usrquota

  3. grpquota

  4. userquota

 b and c . the usrquota and grpquota options allow the configuration of quotas on the given filesystem on user and group bases. a and d are not valid options for /etc/fstab.

Answers

2. 

þ C. Enable grace periods; set the soft limit to 40MB, and the hard limit to 50MB. This will warn users they are over their limit after the grace period, but will make sure they do not exceed the 50MB true maximum barrier.
ý A is incorrect because the soft limit must be less than the hard limit. B is incorrect because it is actually the same as A. D is incorrect because C does the job.

3. 

þ B and C. The usrquota and grpquota options allow the configuration of quotas on the given filesystem on user and group bases.
ý A and D are not valid options for /etc/fstab.

The Basics of the Kernel

4. 

You are troubleshooting someone else's computer and are not sure what network card is inside it. You have checked the output from the dmesg command, but no network cards are listed, and even though you have a bunch of compiled network modules, none are currently loaded. What could you do to load the unknown network device most quickly?

  1. Try loading each module manually.

  2. modprobe \*

  3. Nothing. The kernel will load the module when you try to connect to the network.

  4. modprobe -t net

 d . the modprobe -t net command tries each module from the /lib/modules/ kernel_version /kernel/drivers/net directory, until it reaches the end of the list or finds a module that works for a network interface. a , b , and c are incorrect. linux needs to load the card module before you can connect to the network, so c is incorrect. you might try loading all modules manually, but that is not efficient, so a is incorrect. while the modprobe \* would test all options, it is also not efficient, so b is also incorrect.

5. 

You can't find any modules in the /lib/modules/kernel_version/kernel/drivers (or similar) directories. Which of the following actions would set up these modules?

  1. Go into the /lib/modules/kernel_version directory and run the make modules command.

  2. Go into the /lib/modules/kernel_version directory and run the make modules and make modules_install commands.

  3. Go into the /usr/src/linux-2.4 directory and run the make modules command.

  4. Go into the /usr/src/linux-2.4 directory and run the make modules and make modules_install commands.

 d . these commands together compile your modules and then place them in the appropriate directory trees. because these are kernel-related commands, they have to be run from the /usr/src/linux-2.4 directory. a , b , and c are incorrect. the make modules command just compiles the modules, so a and c are not correct. the /lib/modules/ kernel_version directory is the wrong place to apply these commands, so b is incorrect.

Answers

4. 

þ D. The modprobe -t net command tries each module from the /lib/modules/kernel_version/kernel/drivers/net directory, until it reaches the end of the list or finds a module that works for a network interface.
ý A, B, and C are incorrect. Linux needs to load the card module before you can connect to the network, so C is incorrect. You might try loading all modules manually, but that is not efficient, so A is incorrect. While the modprobe \* would test all options, it is also not efficient, so B is also incorrect.

5. 

þ D. These commands together compile your modules and then place them in the appropriate directory trees. Because these are kernel-related commands, they have to be run from the /usr/src/linux-2.4 directory.
ý A, B, and C are incorrect. The make modules command just compiles the modules, so A and C are not correct. The /lib/modules/kernel_version directory is the wrong place to apply these commands, so B is incorrect.

New Kernels, the Easy Way

6. 

When you install an updated kernel from a Red Hat RPM, which of the following steps do you need to take?

  1. Add information on the new kernel in a GRUB stanza.

  2. Add a new Initial RAM disk to the /boot directory.

  3. Reconfigure the /usr/src/linux-2.4/.config file.

  4. None of the above.

 d , none of the above. grub is automatically updated when you install a new red hat kernel from a red hat rpm; however, you may want to change the value of default in /etc/grub.conf. a new initial ram disk file, initrd- versionnumber, is also added to the /boot directory. you don t need to change /usr/src/linux-2.4/.config file unless you want to recompile this new kernel. a , b , and c are all not required and are therefore incorrect.

Answers

6. 

þ D, None of the above. GRUB is automatically updated when you install a new Red Hat kernel from a Red Hat RPM; however, you may want to change the value of default in /etc/grub.conf. A new Initial RAM disk file, initrd-versionnumber, is also added to the /boot directory. You don't need to change /usr/src/linux-2.4/.config file unless you want to recompile this new kernel.
ý A, B, and C are all not required and are therefore incorrect.

Kernel Sources

7. 

You're not sure which kernel source tree is active for your Linux computer. Which of the following directories should be linked to that source tree?

  1. /usr/src/linux

  2. /usr/src/linux-2.4

  3. /usr/src/linux-2.4rh

  4. /usr/src

 b . the /usr/src/linux-2.4 directory is normally soft-linked to the actual directory with the active kernel source files. a , c , and d all specify directories that aren t linked to the linux kernel source tree. (however, the situation was different before linux kernel version 2.4; answer a was correct for older linux distributions, such as red hat linux 7.0.)

Answers

7. 

þ B. The /usr/src/linux-2.4 directory is normally soft-linked to the actual directory with the active kernel source files.
ý A, C, and D all specify directories that aren't linked to the Linux kernel source tree. (However, the situation was different before Linux kernel version 2.4; answer A was correct for older Linux distributions, such as Red Hat Linux 7.0.)

Recompiling a Kernel

8. 

When compiling a kernel, you've navigated to the /usr/src/linux-2.4 directory. Which of the following would not work with the make command to reconfigure your kernel?

  1. config

  2. menuconfig

  3. windowconfig

  4. xconfig

 c is correct because there is no kernel configuration utility based on the make windowconfi g command. a , b , and d are all incorrect. in the /usr/src/linux-2.4 directory, the make config , make menuconfig , and make xconfig commands all call kernel configuration utilities.

9. 

You have just compiled a new kernel with the make bzImage command. You need to copy the kernel and Initial RAM disk to the /boot directory. What is the most efficient way to make this happen?

  1. Copy the image from the /usr/src/linux/arch/i386/boot directory.

  2. Nothing. The make bzImage command automatically installs the kernel to the /boot directory.

  3. Install a revised Red Hat kernel RPM.

  4. After you've set up modules, run the make install command.

 d . the make install command in rhel 3 automatically loads the files and data related to your recompiled kernel in the /boot directory. it also installs a new initial ram disk and revises the grub boot loader. a , b , and c are all incorrect. while the recompiled kernel is stored in the directory noted in answer a , this action does not create an initial ram disk. b is incorrect as more action is required. c is incorrect as the revised red hat kernel rpm probably does not reflect your custom kernel configuration.

Answers

8. 

þ C is correct because there is no kernel configuration utility based on the make windowconfig command.
ý A, B, and D are all incorrect. In the /usr/src/linux-2.4 directory, the make config, make menuconfig, and make xconfig commands all call kernel configuration utilities.

9. 

þ D. The make install command in RHEL 3 automatically loads the files and data related to your recompiled kernel in the /boot directory. It also installs a new Initial RAM disk and revises the GRUB boot loader.
ý A, B, and C are all incorrect. While the recompiled kernel is stored in the directory noted in answer A, this action does not create an Initial RAM disk. B is incorrect as more action is required. C is incorrect as the revised Red Hat kernel RPM probably does not reflect your custom kernel configuration.

The cron and at Systems

10. 

You want to schedule a maintenance job to run from your home directory on the first of every month at 4:00 A.M. Which of the following cron entries runs the specified job at the specified time?

  1. 0          4          1          *          *          ~/maintenance.pl

  2. 4          1          *          *          ~/maintenance.pl

  3. 0          4          31        *          *          ~/maintenance.pl

  4. 1          4          0          0          ~/maintenance.pl

 a . the syntax for cron is minute, hour, day of month, month of year, weekday, and then the command. this answer corresponds to 4:00 a.m. on the first of every month. b executes at 4 minutes after 1 in the morning for every day. however, there are only four time fields, not five, so the entire line would be considered invalid. c is incorrect because it runs the job at 4:00 a.m. on the 31st of the month, and then only if the month has 31 days. d is incorrect because it executes the program at one minute after 4:00 a.m . and there are only four time values in this line, which makes it invalid.

Answers

10. 

þ A. The syntax for cron is minute, hour, day of month, month of year, weekday, and then the command. This answer corresponds to 4:00 A.M. on the first of every month.
ý B executes at 4 minutes after 1 in the morning for every day. However, there are only four time fields, not five, so the entire line would be considered invalid. C is incorrect because it runs the job at 4:00 A.M. on the 31st of the month, and then only if the month has 31 days. D is incorrect because it executes the program at one minute after 4:00 A.M. And there are only four time values in this line, which makes it invalid.



 < Day Day Up > 



RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
ISBN: 71765654
EAN: N/A
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net