Final Preparation - CompTIA Linux+ / LPIC-1 Cert Guide (Exams LX0-103 & LX0-104/101-400 & 102-400) (2016)

CompTIA Linux+ / LPIC-1 Cert Guide (Exams LX0-103 & LX0-104/101-400 & 102-400) (2016)

Chapter 21. Final Preparation

This chapter covers the following topics:

Image How to Prepare for LPI Exams

Image How NOT to Prepare for LPI Exams

Image LPI Exams and Distributions

Image Question Types and Strategies

Image How to Be Successful (aka PASS)

The LPI exams are computer based and are purposely not easy exams to take. A number of proven strategies will help any candidate be successful, given the person has actually learned the information laid out in the objectives and can perform those actions in the real world.

Foundation Topics

How to Prepare for the LPI Exams

In our many years as sysadmins, managers, and especially instructors on the topic of Linux and Open Source, we have identified a number of key methods and strategies that help any exam-taker be more successful, and in particular here we focus on the LPI exams.

Caveat and Warning

The LPI exams specifically, and exams about computer technology topics in general, are not an end but are a means to an end. In other words, passing the exam isn’t everything that you should have mastered to be an awesome sysadmin. You must have mastered or shown proficiency at the actual tasks being measured via an exam.

We can’t guarantee that you read every word in this book, or followed our advice and executed all the commands multiple times, or ruined multiple virtual machines getting good at being a sysadmin. That’s all up to you; it’s your career. Possessing the abilities an employer can depend on to accomplish its corporate goals of providing services via Linux and Open Source systems is the base of the pyramid, but the capstone is being able to prove that you are qualified, and that’s where exams come in.

With all that said, this chapter is the distillation of decades of helping exam-takers be prepared and pass their chosen exams, given all the knowledge is there.

Exam Objectives

It always amazes us when we see someone either not studying for an exam, or simply leaving it to chance, especially when the person’s career can be affected or she might not be promoted depending on the outcome.

The LPI exams all have a well-laid-out and comprehensive set of objectives, which are an effective listing of what appears on the exam you are studying so hard for! Spending all your time reading books and doing labs and never even looking at the guide from which the exams are developed is not a wise strategy in our opinion.

You can find the LPI exam objectives on the LPI.org website. They have moved around a bit over the years, but typically they are on the Certification tab. Regardless of where they appear, they’re easy to find, and no exam-taker should appear at a testing center without a solid understanding of what is on the exam objectives, or how many questions of a given variety they will likely see. Go and look at the exam objectives for the 101 and 102 exams. You see a lot of good information there, and an understanding of what you see will help you a great deal when you are preparing for the exams.

I highly recommend that you create a checklist from the objectives. Place a check mark next to each item in each objective once you feel you understand that item well. Don’t take the exam until every item of the exam objective list has a check mark next to it.

Important Exam Facts

The LPI exams on the Professional level—the LPIC-1, LPIC-2, and LPIC-3—are all 60 questions each, and you have 90 minutes to complete the exams. This may sound like a long time, but it’s not much for each question. You only have 1.5 minutes per question if you evenly distribute the time, and of course some questions take longer than others, so keep an eye on your watch or the clock.

Right Before Your Exam Starts

We have developed a couple of preparation steps that you can take immediately before you go into the torture, okay, well, the exam chamber.

For years we have recommended that you consume several things immediately before entering the exam room: a banana and a liter of water. Nope, it’s not a joke or something we recommend and then laugh about afterward; there are good reasons for this recommendation.

We say to eat the banana because the potassium and other minerals contained are helpful to your mental processes, as well as helping make sure you don’t go hypoglycemic sometime during the next 1.5 hours—something we have seen happen too many times to our poor exam-takers.

The liter of water is probably as important or more than the banana, as our brains and nervous systems are essentially big electronic circuits, and nothing conducts electrons better than water or liquid. Drinking a liter of H20 before you go use that big electronic circuit is just good sense. You’ll be well-hydrated and things should function at the top of their form.


Note

The author(s) initially made this recommendation in the previous edition of this book, and we continue to receive photos of students and exam-takers holding bananas and bottles of water! Send us your photos here: LPICBook@brunson.org


How to Look at the Objectives

The objectives are laid out in topics and subtopics. The 101 Exam Objectives are as such:

Image 101 – System Architecture

Image 102 – Linux Installation and Package Management

Image 103 – GNU and Unix Commands

Image 104 – Devices, Linux Filesystems, Filesystem Hierarchy Standard

Each of the major topics, such as 101 - System Architecture, is broken up into subtopics, such as the following:

Image 101.1 - Determine and configure hardware settings

Image 101.2 - Boot the system

Image 101.3 - Change runlevels/boot targets and shut down or reboot system

Each of these subtopics has several sections that bear mentioning. Figure 21-1 uses the 103.1 subtopic to show you the important features of a subtopic.

Image

Figure 21-1 LPI Exam Objective subtopic 103.1 Work on the command line

As you can see, the subtopic title, Work on the Command Line, lets you know the overall topic the objective focuses on. This is followed by the weight of the subtopic; in this case it’s a weight of 4.

The weight of a subtopic is important information. Not only does the weight indicate the number of actual exam questions that will be drawn from the subtopic, but also the sum of all the subtopic weights equals exactly 60, the number of questions on each exam.

Next in the subtopic is the Key Knowledge Areas section, which is normally a set of bullet points that describe the areas focused on. In this case the focus is clearly on being capable of running single commands and one-line command sequences to accomplish a given task, work with the shell environment and variables, manipulate command history, and run commands in or out of the path.

It’s critical that you read each one of these as a statement of intent to test a given set of knowledge. In years past (about a decade ago), these were written as if they were cryptic sentences dropping from the mouth of an oracle on a mountaintop, but they are pretty direct these days.

The next area, the Terms and Utilities section, is directly related to the Key Knowledge Areas, in that these are the commands, concepts, and files that appear as the supporting cast of actors to the stars in the Key Knowledge Areas.

It’s critically important that you use the Key Knowledge Areas as statements of what will be tested, and the Terms and Utilities as the commands and files that you typically use to accomplish the tested tasks.

You should try each of the commands, run the man pages for them, look at the Examples section of those man pages, and know by heart the most common options and usages of those commands. Keep going, investigate every file, read every man page, and blow up dozens of virtual machines learning all about everything in a given subtopic.

Preparing this way not only helps you on the exam, but the knowledge also makes you an even more awesome sysadmin.


Note

We often recommend that those studying for the exams print out the objectives and mark the appropriate items off when you are finished studying them.


Studying for the Exams—What to Do

It’s important that you not only study the objectives, but thoroughly investigate all the other options for getting more information about the topic you are studying.

We recommend that you use the following resources to study for every item on the exam objectives:

Image Live machine or virtual machines with snapshot and rollback

Image Books like this one

Image Study guides, documentation from tldp.org (The Linux Documentation Project)

Image Man pages, and especially the web-based easily searched versions

Image Websites such as Linuxquestions.org and YouTube videos

If you need to, take a class from someone. Plenty of vendors offer instructor-led, online live or on-demand classes, videos, and so on. You can start at the LPI Marketplace (www.lpimarketplace.com) and go from there.

Don’t just stop there; get some needed context for what you’re reading, studying, and trying out on your machine instances. Read all the Linux-related topics you can find online; good places to go are Linux.com, Opensource.com, and just in general search for “Linux System Administration” on Google.

We did most of our studying and got our certifications before we had our respective children. We know just how hard it is to focus when all the rest of the world seems to be dedicated to distracting you. We highly recommend studying either early in the morning before everyone else is up or late at night when all the rest of the family has gone to bed.

Installing a lock on your office or den door and putting up a “Do Not Disturb - Daddy/Mommy is studying” sign is a good way to get the family to help you out with your goals. We also encourage you to take a weekend day every month or so to just go off somewhere and read as much as you can.

Machines or Virtual Machines?

A quick word about our recommendation for study machines: Go virtual; it’s much easier to reload machines when they are completely based in software, and you can have many different distributions loaded up and ready on pause, so you can just use a single hardware machine.

We get a lot of questions about what virtual machine software to use, and while we are partial to VMWare and KVM, you can use just about anything that provides a virtual machine environment.

Possibilities for virtual machine software include the following:

Image VMWare—Workstation for Windows and Linux, Fusion for Mac. For the cost-conscious, VMWare Player can be used; it’s commercial but free (www.vmware.com).

Image Parallels—For the Mac platform, this software is a competitor to VMWare Fusion. There used to be a Parallels Workstation product that ran on Windows.

Image VirtualBox—Cross-platform and in use all over the place, this is a great choice and it’s Open Source. The parent company that came up with VirtualBox is now owned by Oracle.

Image KVM or XEN—Less popular among those studying Linux or just getting into Linux, these are options typically provided by large virtualization vendors, so you might not use these on your local workstation to study and learn Linux.

Studying for the Exams—What Not to Do

Almost as important are the things that you should avoid when studying for exams. Many use the Testking products, and it’s probably fair to say that the use of such sources is cheating. If you are caught, disciplinary procedures apply.

There are a number of question dump and brain dump sites out there, and we monitor many of them for what questions are being posted and how accurate the answers are. We can positively state that this also is cheating and dishonest. You should be studying and preparing to be a sysadmin, not someone who memorizes things and spits them back out on the exam. Besides, most of the time, the answers to these are horribly inaccurate. So if you must look at them, just look at the questions, and if you don’t know the answer, GO LOOK IT UP.


Note

Whatever you do, unless you are truly into getting abused and possibly reported as a cheat, don’t post actual exam questions on LinkedIn or Facebook and ask people who have worked hard to get their certifications by the proper means to help you cheat and pass those exams without knowing the actual information being tested. At the very least, you’ll be ignored, and I have seen some deeply unpleasant flame fests started over such postings.


Don’t Believe Everything

There are a lot of credible sources for classes, boot camps, and so on, and then there are some certification mills and places that will be happy to take your money and give you questionable return for it.

If a vendor states it will teach you for a week and you’ll be ready to pass seven Linux exams, we propose that they won’t be able to do that. The team writing this book has about a combined 40 years of teaching experience, a lot of it in accelerated formats. Avoid vendors that make unrealistic claims. You are better off taking one exam at a time and not trying to force feed yourself.

Don’t Worry, Be Happy

With apologies to Bobby McFerrin, this is great advice. We have seen way too many people get so stressed out about the exams that they don’t do well, or they give themselves an ulcer over it.

To put this in perspective, these are exams. They are a means to an end; they are not life itself nor something to make yourself miserable or sick over. Many times we take an exam and find we are not properly prepared. Most of the time we can use that as an experience that teaches us something; in this case, it’s to go back and study more and be more prepared next time!

LPI Certifications and Distributions

Many years ago, some distributions were noted on the LPI exams, as you had to use something to study the topic, and sometimes it appeared they were based mostly on Red Hat and Debian.

This has changed. You will likely see zero mention of any distributions on the exams. Instead you see mention of the packaging formats in the installing and managing packages section. You must know both DPKG and RPM styles of managing packages, and you might see mention of systems that use the sysvinit or systemd processes for runlevels. But we would be surprised if any remaining questions mention a particular system type.

To be crystal clear, the LPI exams are focused on Linux, not a particular distribution. It’s key to know Linux, and the commands and files around the Linux Kernel, not the weird and wonderful stuff that vendors want to encourage you to know about.

You Have to Install Something

With the preceding advice in mind, we are aware that you have to install something, some distribution or several, to study Linux; so here are some recommendations:

1. Install at least one each of an RPM and DPKG distribution.

2. openSUSE and Fedora are key RPM-based choices. Arch is great also.

3. Ubuntu and Linux Mint are excellent DPKG-based choices.

4. Know both the apt-get and zypper/yum systems very well; you’ll see them on the exam.

If it’s not obvious yet, we are huge fans of using virtual machines to study and prepare for your Linux exams. The benefits of using virtual instances include

Image You can mess them up and roll back to a functional version.

Image You can have many different instances on a single machine.

Image You can vary your distributions given the task, server, or workstation.

Image You become more balanced as a sysadmin. You’ll be working with virtual machines a lot in your future jobs in the open source world.

Remember, the goal is to know Linux. All the distributions are just an offshoot of the main branch. You can learn whatever you need about a given distribution with not much additional effort, but LEARN LINUX.

LPI Exam Question Types

The LPI exams feature a number of types of questions. Some of them occur often, some not so often, and some make up almost 25% of the exam. A good knowledge of the question types and awareness of key points about those types will help you prepare properly and may even cause you to pass your exam because you know how to deal with certain questions.


Note

Since the LPI exams are not practical exams or machine-based, they take especial care to introduce question types such as fill-in-the-blank, so as to make the exams as close to being a command terminal as possible.



Note

LPI questions are typically blunt and short, to the point, and don’t fool around. The exam writers are not there to fool you, trick you with silly distractors, or do anything other than test your knowledge. The best answer is always the one that most simply answers the question being asked. Don’t get tricky or fancy and try show off your mad terminal skills. Just answer the question and move on to the next; time is rapidly moving on.


The question types are

Image Single answer multiple choice

Image Choose two/choose three

Image Choose all that apply

Image Fill in the blank

Let’s take them one at a time. We explain the question type, show you an example, and give you some important tips for properly and accurately answering this type of question.

Single Answer Multiple Choice

A slight majority of the questions are of this type. There is a straightforward question, anywhere from four to six possible choices, and you have to choose one single answer.

Example Single Answer Multiple Choice Question

Which of the following commands shows a listing of the current directory that indicates the owner and permissions for the listed files?

A. ls -h

B. ls -1

C. ls -l

D. ls /

All you have to do is pick the one that most accurately and closely matches the question. In this case it’s C; the ls -l command shows you the ownership and permissions for the list files in the current directory. Note that some of the other answers do interesting things, but they don’t do exactly what is being asked about.

Choose Two/Choose Three

This question type(s) is slightly harder than the single answer questions. You have to look closely at the answers and pick either two or three answers, all of which must be correct, to get this entire question marked as right.

At times you may be asked to pick the two or three things that do a particular task, or even pick the two or three items that together produce a given result. The key here is getting all the proper answers and just the number asked for. If you think there are four items that answer a choose three question, you’re incorrect, and marking all four will cause the entire answer to be wrong. There are no partial credits; each question is either answered properly or it’s not. Period.

Example Choose Two/Three Question

Which of the following commands/functions must be performed before a new and uninitialized disk can be used for storing data on your system? (Choose three.)

A. fdisk

B. dd

C. mkfs

D. mount

E. fsck

The key to this question is that there are several commands or functions that must be performed on “a new and uninitialized disk” so you can write data to it. You must partition the disk (fdisk), make a file system on it (mkfs), and mount it to your system somewhere (mount); so A, C, and D are the correct three answers to this question. The other two are either not necessary for the answering of the question or something that might be done but is not critical.

Choose All That Apply

This question type is slightly more difficult than even the choose two/three type, in that you don’t even know at first glance how many of the answers are being asked for. You have to parse, study, and validate every one of the possible answers before you can choose them.

We highly recommend using your note paper for this type of question. Write down the answer choices and work through them on paper. Then mark what you think is right on the computer, but don’t take too much time doing it; time is moving on.


Note

The key to all these questions, particularly the ones that are actual commands, is “will this produce the result asked for if I executed this on the command line?” If you know it will execute, that’s good, but will it do exactly what’s being asked for and nothing extra?


Example Choose All That Apply Question

Which of the following commands will create a second file that is identical to the first file?

A. cp file1 file2

B. cat file1 | file2

C. cp < file1 > file2

D. dd if=file1 of=file2

E. cat file1 > file2

F. if file1 > file2

A lot of attendees and exam-takers hate this question type, as all the answers must be parsed and thought through before you can mark it as one of the “all that apply” answers.

The best way to answer this question is to actually have tried this sort of thing on the command line many times and to know about things like dd and if and what they actually do.

This question is a tough one, in that you must know how the <, >, and | work, and how the displayed commands work with them to produce the result. The given result is hopefully no errors and a file named file2 that is an exact copy of file1.

Answer A works; it’s a straightforward copy of file1 to file2. Answer B doesn’t work; it’s an inappropriate use of the | character, which is only used to connect two commands to each other or to “pipe” them. Answer C doesn’t work either, and this is the one that most everyone misses. It looks like it ought to work, but cp doesn’t accept the < character the way it looks like it ought to. Answer D works great; the dd command just read in the file1 file and produced the output of it as a file named file2. Answer E works perfectly; it’s just taking the contents of file1 and redirecting that output to a new file named file2, but if this had used a >> character set, it might not work. Answer F doesn’t work; it produces a prompt for more input.

Fill in the Blank

Easily the most dreaded question type, these are called command line questions, FIBs, and “those damned questions.” In reality, they are simple. You just have to type in what is being asked for, and if it both executes and does the function being asked for, you are going to get this question marked correct.

Example Fill-in-the-Blank Question

What command with the appropriate switches queries a .rpm file in the local directory named somefile.rpm and shows you information about the package author, build host, and so on, as well as a listing of the files that would be copied to the system if the package were installed? (Type the answer in the space below.)

_______________________________________________________

The tricky part of this question, and the answer, is not really that you don’t know the switches, but that there are several methods of arranging the switches, using long options and short options, and so on, that would actually work, and you can only type in one answer.

Let’s answer the question first, and then we give you a tip that will really help you out on the exam.

You of course start with the RPM command itself. Then because we’re querying you use a -q and then the -i switch for information about the package and the -l switch for listing the files that will be copied to your system.

The final key to answering this question properly is to note that you are being asked about a file, a package file, located on disk. Because we’re using the RPM command and the package file is on the disk, there must be a -p or --package switch used in the answer. The RPM command normally queries the package database or the database that indicates the set of packages installed on the system. If you’re querying a package on disk, you must indicate so with the appropriate switches or it will default to querying the packages in the package database.

The most common way to answer this question might look like this:

rpm -qilp somefile.rpm

However, it could also look like this:

rpm --query --info --list --package somefile.rpm

Those of you who have been around systems for a while know that there are many different possible combinations of long and short options as well as the order of those options that could constitute a correct answer to this question. The conundrum is that you’re only allowed to type one valid command into the dialog box in the hopes of answering this question.

The answer to the million dollar question here is that there is an actual database behind this question containing a comprehensive list of correct possible answers. The software that makes up the testing engine will use this database to check whether your answer is correct.

All you, the exam-taker, need to do is to type in one of the possible correct answers (typically one that you know will execute because you’ve typed it a number of times) and then move on to the next question.


Note

This fact alone is enough to cause you to be able to answer properly with a great reduction in stress; approximately 20% to 25% of the questions on the exam are this question type.


Final Recommendations

Now that we have hopefully demystified the question types as well as giving you some idea of what to do and not to do, let’s finish up with a set of recommendations that we think are useful in adequately preparing for, taking, and hopefully passing the LPI exams.

Things to remember:

Image Try everything, every command.

Image Look at every file’s contents.

Image Read the man pages for everything you encounter.

Image Google and search for additional information on everything.

Image Use the Examples section of the man page for starters.

Image Get a copy of Unix Power Tools from O’Reilly and Associates; it’s awesome.

Image Install virtualization software and get used to virtual machines; they’re the future.

Image Don’t whine about the command line; systems don’t need X in particular servers.

Image Try to know all the commonly used switches to commands; it’s just good info.

Summary

We have poured everything we know and can tell you into this book. It’s the culmination of decades of being technologists and in particular Linux sysadmins. We want to hear about your successes and any comments you might have, so please look us up online by our names or email us atlpicbook@brunson.org and we authors will get all your emails.

Thanks for giving us the chance to make a difference in your life and career and for taking the time to learn how to become an awesome sysadmin. We need you in the workforce. There is always a place for someone who knows Linux and can support and maintain it and its application services in an enterprise environment.

Good luck on those exams—all of us authors and technical editors are rooting for you!