May 2017 updated: Actualtests LPI 101-400 practice exam 1-10


The article at Testaimer.com going over http://www.testaimer.com/101-400-test is very comprehensive.

Q1. - (Topic 3) 

When running the command 

sed -e "s/a/b/" /tmp/file >/tmp/file 

While /tmp/file contains data, why is /tmp/file empty afterwards? 

A. The file order is incorrect. The destination file must be mentioned before the command to ensure redirection. 

B. The command sed did not match anything in that file therefore the output is empty. 

C. When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading. 

D. Redirection for shell commands do not work using the > character. It only works using the | character instead. 

Answer:


Q2. - (Topic 1) 

Which of the following commands will write a message to the terminals of all logged in users? 

A. bcast 

B. mesg 

C. print 

D. wall 

E. yell 

Answer:


Q3. - (Topic 3) 

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

A. /usr/share/man 

B. /opt/man 

C. /usr/doc/ 

D. /var/pkg/man 

E. /var/man 

Answer:


Q4. - (Topic 1) 

Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.) 

A. shutdown -r now 

B. shutdown -r "rebooting" 

C. telinit 6 

D. telinit 0 

E. shutdown -k now "rebooting" 

Answer: A,C 


Q5. CORRECT TEXT - (Topic 2) 

What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.) 

Answer: menu.lst, grub.conf, grub.cfg 


Q6. CORRECT TEXT - (Topic 1) 

Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.) 

Answer: cmdline, /proc/cmdline 


Q7. - (Topic 4) 

Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose TWO correct answers.) 

A. FIND 

B. ID 

C. LABEL 

D. NAME 

E. UUID 

Answer: C,E 


Q8. - (Topic 3) 

When given the following command line. 

echo "foo bar" | tee bar | cat 

Which of the following output is created? 

A. cat 

B. foo bar 

C. tee bar 

D. bar 

E. foo 

Answer:


Q9. CORRECT TEXT - (Topic 3) 

Which signal is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files? 

killall -s _______ daemon 

Answer: HUP, SIGHUP, 1 


Q10. - (Topic 3) 

Which of the following commands will print the last 10 lines of a text file to the standard output? 

A. cat -n 10 filename 

B. dump -n 10 filename 

C. head -n 10 filename 

D. tail -n 10 filename 

Answer: