Free 101-400 Sample Questions — LPI Level 1 Exam 101 Junior Level Linux Certification Part 1 of 2

Free 101-400 sample questions for the LPI Level 1 Exam 101 Junior Level Linux Certification Part 1 of 2 exam. No account required: study at your own pace.

Want an interactive quiz? Take the full 101-400 practice test

Looking for more? Click here to get the full PDF with 93+ practice questions for $10 for offline study and deeper preparation.

Question 1

Which of the following files, located in the user home directory, is used to store the Bash history?

  • A. bash_history
  • B. bash_histfile
  • C. history
  • D. bashrc_history
  • E. history_bash
Show Answer
Correct Answer:
A. bash_history
Question 2

Which of the following commands displays the contents of a gzip compressed tar archive?

  • A. gzip archive.tgz | tar xvf -
  • B. tar ztf archive.tgz
  • C. gzip -d archive.tgz | tar tvf -
  • D. tar cf archive.tgz
Show Answer
Correct Answer:
B. tar ztf archive.tgz
Question 3

Which of the following are filesystems which can be used on Linux root partitions? (Choose two.)

  • A. NTFS
  • B. ext3
  • C. XFS
  • D. VFAT
  • E. swap
Show Answer
Correct Answer:
  • B. ext3
  • C. XFS
Question 4

Which RPM command will output the name of the package which supplied the file /etc/exports?

  • A. rpm -F /etc/exports
  • B. rpm -qf /etc/exports
  • C. rpm -Kl /etc/exports
  • D. rpm -qp /etc/exports
  • E. rpm -qi /etc/exports
Show Answer
Correct Answer:
B. rpm -qf /etc/exports
Question 5

Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)

  • A. esc ZZ
  • B. ctrl :w!
  • C. esc zz
  • D. esc :wq!
  • E. ctrl XX
Show Answer
Correct Answer:
  • A. esc ZZ
  • D. esc :wq!
Question 6

Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)

  • A. startd
  • B. systemd
  • C. Upstart
  • D. SysInit
  • E. SysV init
Show Answer
Correct Answer:
  • B. systemd
  • C. Upstart
  • E. SysV init
Question 7

Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?

  • A. i (lowercase)
  • B. (uppercase)
  • C. p (lowercase)
  • D. (uppercase)
  • E. u (lowercase)
Show Answer
Correct Answer:
C. p (lowercase)
Question 8

In the vi editor, which of the following commands will copy the current line into the vi buffer?

  • A. c
  • B. cc
  • C. 1c
  • D. yy
  • E. 1y
Show Answer
Correct Answer:
D. yy
Question 9

Which of the following commands will reduce all consecutive spaces down to a single space?

  • A. tr '\s' ' ' < a.txt > b.txt
  • B. tr -c ' ' < a.txt > b.txt
  • C. tr -d ' ' < a.txt > b.txt
  • D. tr -r ' ' '\n' < a.txt > b.txt
  • E. tr -s ' ' < a.txt > b.txt
Show Answer
Correct Answer:
E. tr -s ' ' < a.txt > b.txt
Question 10

Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose TWO correct answers.)

  • A. find /tmp -uid root -print
  • B. find -path /tmp -uid root
  • C. find /tmp -user root -print
  • D. find /tmp -user root
  • E. find -path /tmp -user root print
Show Answer
Correct Answer:
  • A. find /tmp -uid root -print
  • C. find /tmp -user root -print
Question 11

What command will generate a list of user names from /etc/passwd along with their login shell?

  • A. column -s : 1,7 /etc/passwd
  • B. chop -c 1,7 /etc/passwd
  • C. colrm 1,7 /etc/passwd
  • D. cut -d: -f1,7 /etc/passwd
Show Answer
Correct Answer:
D. cut -d: -f1,7 /etc/passwd
Question 12

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

  • A. rmdir '~/\dir'
  • B. rmdir "~/\dir"
  • C. rmdir ~/'dir'
  • D. rmdir ~/\dir
  • E. rmdir ~/\\dir
Show Answer
Correct Answer:
E. rmdir ~/\\dir
Question 13

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

  • A. cat < myapp | cat > file1.log
  • B. myapp 0>&1 | cat > file1.log
  • C. myapp | cat > file1.log
  • D. myapp | tee file1.log
  • E. tee myapp file1.log
Show Answer
Correct Answer:
D. myapp | tee file1.log
Question 14

Which of the following information is stored within the BIOS? (Choose TWO correct answers.)

  • A. Boot device order
  • B. Linux kernel version
  • C. Timezone
  • D. Hardware configuration
  • E. The system's hostname
Show Answer
Correct Answer:
  • A. Boot device order
  • D. Hardware configuration
Question 15

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
Show Answer
Correct Answer:
D. wall
Question 16

Which of the following apt-get commands will install the newest versions of all currently installed packages?

  • A. auto-update
  • B. full-upgrade
  • C. dist-upgrade
  • D. install
  • E. update
Show Answer
Correct Answer:
C. dist-upgrade
Question 17

What is the effect of the egrep command when the -v option is used?

  • A. It enables color to highlight matching parts
  • B. It only outputs non-matching lines
  • C. It shows the command's version information
  • D. It changes the output order showing the last matching line first
Show Answer
Correct Answer:
B. It only outputs non-matching lines
Question 18

What is the default action of the split command on an input file?

  • A. It will break the file into new files of 1,024 byte pieces each
  • B. It will break the file into new files of 1,000 line pieces each
  • C. It will break the file into new files of 1,024 kilobyte pieces each
  • D. It will break the file into new files that are no more than 5% of the size of the original file
Show Answer
Correct Answer:
B. It will break the file into new files of 1,000 line pieces each
Question 19

What information can the lspci command display about the system hardware? (Choose THREE correct answers.)

  • A. Device IRQ settings
  • B. PCI bus speed
  • C. System battery type
  • D. Device vendor identification
  • E. Ethernet MAC address
Show Answer
Correct Answer:
  • A. Device IRQ settings
  • B. PCI bus speed
  • D. Device vendor identification
Question 20

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
Show Answer
Correct Answer:
C. When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading

Aced these? Get the Full Exam

Download the complete 101-400 study bundle with 93+ questions in a single printable PDF.