LPI certification · Exam 101-500

101-500 Mock Exam

LPIC-1 Exam 101, Part 1 of 2, version 5.0

Free 101-500 questions on Topic 3, GNU and Unix Commands, each with the answer and an explanation.

20 questions · 33 minutes · free, no sign-up

Topic 3, GNU and Unix Commands questions

1–10 of 16 free
Question 1 Choose 1

Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached?

Show answerHide answer

Correct answer: A

<<

Explanation

Explanation:
QUESTIONNO: 16
Which of the following commands will NOT update the modify timestamp on the file
/tmp/myfile.txt?
A. file /tmp/myfile.txt
B. echo "Hello" >/tmp/myfile.txt
C. sed -ie "s/1/2/" /tmp/myfile.txt
D. echo -n "Hello" >>/tmp/myfile.txt
E. touch/tmp/myfile.txt
Answer: A

Question 2 Choose 1

Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?

Show answerHide answer

Correct answer: D

kill -TERM 123

Question 3 Choose 1

What is the default nice level when a process is started using the nice command?

Show answerHide answer

Correct answer: B

10

Question 4 Choose 1

What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?

Show answerHide answer

Correct answer: B

19

Question 5 Choose 1

You are trying to make a hard link to an ordinary file but ln returns an error. Which of the following could cause this?

Show answerHide answer

Correct answer: E

The source and the target are on different filesystems.

Question 6 Choose 1

Which of the following commands can be used to create a USB storage media from a disk image?

Show answerHide answer

Correct answer: B

dd

Question 7 Choose 1

In compliance with the FHS, in which of the directories are man pages found?

Show answerHide answer

Correct answer: A

/usr/share/man

Question 8 Choose 1

What is the difference between the i and a commands of the vi editor?

Show answerHide answer

Correct answer: B

i (insert) inserts text before the current cursor position whereas a (append) inserts text
after the cursor.

Question 9 Choose 1

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?

Show answerHide answer

Correct answer: E

rmdir ~/\\dir

Question 10 Choose 1

What does the + symbol mean in the following grep regular expression:
grep '^d[aei]\+d$' /usr/share/dict/words

Show answerHide answer

Correct answer: A

Match the preceding character set ([aei]) one or more times.

Full mock exam

Sit the 101-500 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real 101-500 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full 101-500 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 242questions in the bank
  • Newmock on every attempt