LPI Linux Certification in a Nutshell Part 17
You’re reading novel LPI Linux Certification in a Nutshell Part 17 online at LightNovelFree.com. Please use the follow button to get notification about the latest chapter next time when you visit LightNovelFree.com. Use F11 button to read novel in full-screen(PC only). Drop by anytime you want to read free – fast – latest novel. It’s great if you could leave a comment, share your opinion about the new chapters, new novel with others on the internet. We’ll do our best to bring you the finest, latest novel everyday. Enjoy!
exportPRUNEPATHS #netpathswhichareadded: NETPATHS="/mnt/fs3"
exportNETPATHS In this example, the PRUNEFS PRUNEFS and and PRUNEPATHS PRUNEPATHS variables cause variables cause updatedb updatedb to ignore types of filesystems and particular paths, respectively. to ignore types of filesystems and particular paths, respectively. NETPATHS NETPATHS is used to add network paths from remote directory is used to add network paths from remote directory /mnt/fs3 /mnt/fs3.
updatedb.conf doesn't directly control doesn't directly control updatedb updatedb, but eliminates the need for lengthy options on the updatedb updatedb command line, which can make command line, which can make crontab crontab files a bit cleaner. files a bit cleaner.
On the ExamRemember that updatedb updatedb does not require configuration to execute. On systems that provide for configuration, does not require configuration to execute. On systems that provide for configuration, updatedb.conf updatedb.conf can specify a few extra options to can specify a few extra options to updatedb updatedb by way of environment variables. by way of environment variables.
Name whereis Syntax whereis[options]filename Description whereis locates source/binary and manuals sections for specified files. locates source/binary and manuals sections for specified files.
Example #whereisls ls:/bin/ls/usr/share/man/man1p/ls.1p.gz/usr/share/man/man1/ls.1.gz
Name type Syntax type[options]filename Description type is not actually a separate program, but a built-in part of the is not actually a separate program, but a built-in part of the bash bash sh.e.l.l. sh.e.l.l. type type will tell you how a will tell you how a filename filename would be interpreted if used as a command name. would be interpreted if used as a command name.
Example #typels lsisaliasedto'ls--color=auto'
#typegrep grepishashed(/bin/grep) #typefoo -bash:type:foo:notfoundOn the ExamYou must be familiar with the FHS concept and the contents of its major directories. Be careful about the differences between (and reasons for) /bin /bin and and /sbin /sbin, root filesystem and /usr /usr filesystem, and locally supplied commands. Also practice with various file location techniques and be able to differentiate among them. filesystem, and locally supplied commands. Also practice with various file location techniques and be able to differentiate among them.
Chapter8.Exam 101 Review Questions and Exercises
This section presents review questions to highlight important concepts and hands-on exercises that you can use to gain experience with the topics covered on the LPI 101 Exam. The exercises can be particularly useful if you're not accustomed to routine Linux administration and should help you better prepare for the exam. To complete the exercises, you'll need a working Linux system that is not in production use. You might also find it useful to have a pen and paper handy to write down your responses as you work your way through the review questions and exercises.
System Architecture (Topic 101) Review Questions 1. Describe the boot process on a PC, and identify the order in which control pa.s.ses as a system boots.
2. Name three files in the /proc /proc filesystem that contain information on system resource allocations. filesystem that contain information on system resource allocations.
3. Which of the following SCSI interfaces has the fastest data transfer rates: SCSI-1, SCSI-2, Ultra SCSI, or Fast-Wide SCSI?
4. What is the naming convention in /dev /dev for the different hard disk interfaces? for the different hard disk interfaces?
5. What command is used to obtain USB information on a Linux system?
6. What driver is used for USB hard drives?
7. What is your default runlevel? How can you tell?
Exercises 1. Boot your PC and enter the BIOS configuration utility. Determine how to change the boot order and how to enable and disable peripherals built into the motherboard.
2. Examine the enabled serial and parallel ports. Can you manually configure the interrupts and I/O ports a.s.signed to them?
3. Examine your modem and sound external interfaces on your PC. Are the devices built into your motherboard or independent expansion cards?
4. If you have a SCSI controller, reboot your PC and enter the SCSI BIOS. What device number is selected, if any, for boot? How are the controller's...o...b..ard terminators configured? What data rate is the controller configured for?
5. If you have a RAID controller, reboot your PC and enter the RAID BIOS. What options do you have to configure RAID on your system?
6. Examine the kernel's interrupt a.s.signments by executing cat /proc/interrupts cat /proc/interrupts. Are your devices reported correctly? Are any devices sharing interrupts?
7. Review output from cat /proc/dma cat /proc/dma and and cat /proc/ioports cat /proc/ioports.
8. Create a list of all installed PCI devices using lspci lspci. Note the devices built into your motherboard.
9. Run lsmod lsmod and match the loaded kernel modules with hardware in your system. and match the loaded kernel modules with hardware in your system.
10. Connect a USB device (mouse, printer, etc.) to your system. Run lsmod lsmod to verify that the appropriate driver loaded. to verify that the appropriate driver loaded.
11. Run the dmesg dmesg command and go through the hardware your kernel recognized at boot time. command and go through the hardware your kernel recognized at boot time.
12. Reboot the system and modify the grub boot line to boot into single-user mode.
13. At the root prompt, type kill 1 kill 1. What happens? Why?
Linux Installation and Package Management (Topic 102) Review Questions 1. Why is the /var /var directory usually located in a part.i.tion of its own? directory usually located in a part.i.tion of its own?
2. As a system administrator for a network with many workstations and a central NFS file server, how can you safely share /usr /usr with your users while still maintaining control of its contents? with your users while still maintaining control of its contents?
3. What is the recommended size for a swap part.i.tion, as a function of the memory in a system?
4. Describe how to create a tar tar archive and how its contents are extracted. archive and how its contents are extracted.
5. In general terms, describe the procedure used to compile and install free or open source software from source code.
6. What is a shared library? How can you determine what library dependencies exist in a compiled executable?
7. How does your system know where to look for shared libraries?
8. Briefly describe the major functional modes of rpm rpm.
9. How do you add additional repositories to yum yum?
10. What are the reasons to choose LILO over GRUB as a boot loader, or vice versa?
11. Why might a Debian Linux administrator use dpkg -iG dpkg -iG instead of simply instead of simply dpkg -i dpkg -i to install a package? to install a package?
Exercises 1. In a sh.e.l.l, examine your disk layout using fdisk fdisk. For example:#fdisk/dev/sda Command(mforhelp):p Disk/dev/sda:200.0GB,200049647616bytes 255heads,63sectors/track,24321cylinders Units=cylindersof16065*512=8225280bytes Diskidentifier:0x0003bf13
DeviceBootStartEndBlocksIdSystem /dev/sda1*12520078183Linux /dev/sda2268951408082Linuxswap/Solaris /dev/sda3902432119464354083Linux Is the entire disk consumed by the existing filesystems?
2. Examine how system directories are mapped to disk part.i.tions on your system. Are /var /var and and /tmp /tmp in their own part.i.tions? Is in their own part.i.tions? Is /boot /boot in its own part.i.tion within cylinder 1024? Is the root filesystem relatively small? in its own part.i.tion within cylinder 1024? Is the root filesystem relatively small?
3. Download a tarball (from http://sourceforge.net, for example), and install it on your system with the following steps: 1. Unpack it using tar -xzvf file tar -xzvf file (or (or tar xjvf file tar xjvf file if it is compressed with bzip2). if it is compressed with bzip2).
2. Configure it with ./configure ./configure.
3. Build the software using make make as directed in the doc.u.mentation. as directed in the doc.u.mentation.
4. Install the software using the instructions provided.
Were there any difficulties with this procedure?
4. Use ldd ldd to examine library dependencies of executable programs on your system. For example: to examine library dependencies of executable programs on your system. For example:#ldd'whichgcc'
linux-gate.so.1=>(0x00110000) libc.so.6=>/lib/libc.so.6(0x00682000) /lib/ld-linux.so.2(0x00663000) 5. Using a system that utilizes dpkg dpkg, obtain a list of all packages installed under dpkg dpkg management with management with dpkg -l | less dpkg -l | less. Find a package in the list that looks unfamiliar, and query information about the package using dpkg -s pkg_name dpkg -s pkg_name.
6. Using a system that utilizes RPM, obtain a list of all packages installed under RPM management with rpm -qa | less rpm -qa | less. Find a package in the list that looks unfamiliar, and query information about the package using rpm -qi pkg_name rpm -qi pkg_name.
7. Using a system that utilizes RPM, obtain a list of all available packages that you can install from the currently configured repositories with yum list available | less. yum list available | less.
GNU and Unix Commands (Topic 103) Review Questions 1. Describe the difference between sh.e.l.l variables and environment variables.
2. Compare and contrast built-in and explicitly defined commands and those found in $PATH $PATH.
3. After a lengthy session of file manipulation on the command line, what will !ls !ls produce? produce?
4. What files does bash bash read when you log in? read when you log in?
5. Explain the notion of pipes pipes as they refer to sh.e.l.l capabilities, and ill.u.s.trate using an example of two or more filter programs. as they refer to sh.e.l.l capabilities, and ill.u.s.trate using an example of two or more filter programs.
6. Explain the -p -p option to option to cp cp and give an example of why it is necessary. and give an example of why it is necessary.
7. Give two examples of files matched by the wildcard ??[!1-5] ??[!1-5].
8. Name the three standard I/O streams and their functions.
9. Give an example of the redirection operator, > >, and describe how the outcome would be different using the >> >> operator. operator.
10. What process is the parent of all system processes? Give both the PID and the program name.
11. Name three common utilities used for process monitoring.
12. What happens to a typical daemon when it receives SIGHUP SIGHUP? How would the behavior be different if it received SIGKILL SIGKILL?
13. Compare and contrast background and foreground jobs, and state the syntax to put a command in the background on the command line.
14. What two cla.s.sifications of characters make up regular expressions?
15. How are the regular expressions [A-Z]* [A-Z]* and and ^[A-Z]*$ ^[A-Z]*$ different? different?
16. What is the difference between executing :q :q versus versus :q! :q! in in vi vi?
17. What does it mean to put vi vi into into command mode command mode?
Exercises 1. Start a bash bash sh.e.l.l in a console or terminal window and enter the following commands: sh.e.l.l in a console or terminal window and enter the following commands:$MYVAR1="Happy"
$MYVAR2="Birthday"
$exportMYVAR1 $bash $echo$MYVAR1$MYVAR2 $exit $echo$MYVAR1$MYVAR2 1. Was the behavior of the two echo echo commands identical? commands identical?
2. If so, why? If not, why not?
3. What happened immediately after the bash bash command? command?
4. Which variable is an environment variable?
2. Continuing the previous exercise, press the up arrow until you see the last echo echo command. Press the up arrow again. command. Press the up arrow again.
1. What do you see?
2. Why wasn't it the exit exit command? command?
3. Press the up arrow again so that the export export command is displayed. Add a s.p.a.ce and command is displayed. Add a s.p.a.ce and MYVAR2 MYVAR2 so that the line now looks like this: so that the line now looks like this:$exportMYVAR1MYVAR2What happens when you enter this command?
3. Still continuing the previous exercise, enter the command !echo !echo. Does anything change as a result of the revised export export command? command?
4. The file file command is used to examine a file's contents and displays the file type. Explain the result of using command is used to examine a file's contents and displays the file type. Explain the result of using file file as follows: as follows:$cd/;file'ls|head-10'
5. Execute this command on your system:$cut-d:-f1/etc/pa.s.swd|fmt-w20|head-1 1. What was displayed?
2. How many lines of output did you see? Why?
3. What was the width of the output? Why?
6. Execute the following sed sed subst.i.tution command and explain why it might be used on subst.i.tution command and explain why it might be used on /etc/pa.s.swd /etc/pa.s.swd:$sed's/:[^:]*:/:---:/'/etc/pa.s.swd|less 7. Execute this command:$cd/sbin;ls-lie2fsckfsck.ext2 1. What is the significance of the first field of the output?
2. Why is it identical for both listings?
3. Why are the file sizes identical?
8. Execute the following command sequence and explain the result at each step (this example a.s.sumes that cp cp is not aliased to is not aliased to cp -i cp -i, which is a common default alias):$cd $cp/etc/skel.
$cp-r/etc/skel.
LPI Linux Certification in a Nutshell Part 17
You're reading novel LPI Linux Certification in a Nutshell Part 17 online at LightNovelFree.com. You can use the follow function to bookmark your favorite novel ( Only for registered users ). If you find any errors ( broken links, can't load photos, etc.. ), Please let us know so we can fix it as soon as possible. And when you start a conversation or debate about a certain topic with other people, please do not offend them just because you don't like their opinions.
LPI Linux Certification in a Nutshell Part 17 summary
You're reading LPI Linux Certification in a Nutshell Part 17. This novel has been translated by Updating. Author: Adam Haeder already has 920 views.
It's great if you read and follow any novel on our website. We promise you that we'll bring you the latest, hottest novel everyday and FREE.
LightNovelFree.com is a most smartest website for reading novel online, it can automatic resize images to fit your pc screen, even on your mobile. Experience now by using your smartphone and access to LightNovelFree.com
- Related chapter:
- LPI Linux Certification in a Nutshell Part 16
- LPI Linux Certification in a Nutshell Part 18