LPIC-1 Exam 101 v4.0 Free Sample Questions

20 free sample questions169 in the full practice test Other version: 101-500(225)

Try simulator

101-400 Sample Questions

  1. Question 1

    Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user?

    Answer and explanation

    Correct answer: A

    The timeout directive in GRUB Legacy configuration (/boot/grub/menu.lst) specifies how many seconds the boot menu is displayed before automatically booting the default entry. This allows users time to select alternate kernels or boot options. Other options like splash control boot screen appearance, while showmenu and hidemenu control menu visibility but not timing.

  2. Question 2

    When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?

    Answer and explanation

    Correct answer: B

    When executing the nice command without parameters, it sets the nice level to 10, which lowers the process priority slightly. Nice values range from -20 (highest priority) to 19 (lowest priority), with 0 being the default. Only root can set negative nice values. The value 10 makes the process less competitive for CPU time.

  3. Question 3

    Multiple answers

    Which of the following commands print the current working directory when using a Bash shell? (Choose two.)

    Answer and explanation

    Correct answers: D, E

    Both pwd command and the PWD environment variable (accessed via echo "${PWD}") display the current working directory in Bash shell. The pwd command is a built-in that directly prints the current path, while PWD is automatically maintained by the shell to track directory changes. Other commands like printwd do not exist, and ${pwd} would be empty since it is not a predefined variable.

  4. Question 4

    Creating a hard link to an ordinary file returns an error. What could be the reason for this?

    Answer and explanation

    Correct answer: D

    Hard links cannot span different filesystems because they reference inodes, which are filesystem-specific. When source and target are on different filesystems, the ln command fails since the inode number would be meaningless across filesystem boundaries. Use symbolic links for cross-filesystem linking. File type, permissions, or existing links do not prevent hard link creation.

  5. Question 5

    Multiple answers

    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.)

    Answer and explanation

    Correct answers: B, E

    Instead of device names like /dev/sdb1, Linux /etc/fstab supports UUID (Universally Unique Identifier) and LABEL identifiers for partition mounting. UUID provides persistent identification regardless of device name changes, while LABEL uses human-readable filesystem labels. Both methods are more reliable than device names since disk detection order can change between boots, potentially altering device assignments.

  6. Question 6

    In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?

    Answer and explanation

    Correct answer: C

    In vi/vim, commands can be repeated by prefixing them with a number. For example, 4l moves cursor 4 positions right, 2yj copies 2 lines including current line, and 3dd deletes 3 lines. This numeric prefix applies to movement, editing, and copy commands. Vi does not have repetition settings or require line selection for command repetition.

  7. Question 7

    Multiple answers

    Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)

    Answer and explanation

    Correct answers: C, D

    Both mke2fs -j /dev/sdb1 and mkfs -t ext3 /dev/sdb1 create ext3 filesystems. The mke2fs command with -j flag creates an ext3 filesystem by adding journaling to the base ext2 format. The mkfs command with -t ext3 directly specifies the ext3 filesystem type. Other options like mke3fs or mkfs.ext3 commands exist but were not listed as choices in this question.

  8. Question 8

    After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem.

    Which of the following describes the resulting situation?

    Answer and explanation

    Correct answer: C

    When a hard link target is deleted, the file data remains accessible through other hard links because each link is an independent directory entry pointing to the same inode. The file is only truly deleted when the link count reaches zero. Therefore, deleting foo leaves bar fully functional with access to the original file data.

  9. Question 9

    Which of the following statements is correct for a command line ending with a & character?

    Answer and explanation

    Correct answer: D

    The ampersand (&) character at the end of a command line runs the process in the background, allowing the shell to remain interactive while the command executes. The process continues running independently, and the shell immediately returns a prompt. Use jobs command to monitor background processes and fg to bring them to foreground.

  10. Question 10

    Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?

    Answer and explanation

    Correct answer: D

    Creating a hard link increases the link count of the target file, which tracks how many directory entries point to the same inode. This count is stored in the inode metadata and displayed by ls -l. File size, permissions, and timestamps remain unchanged. When the link count reaches zero, the file is deleted from the filesystem.

Register free to unlock 10 more sample questions

Lifetime One

Own this practice test forever.

$79.99
$75.99
one-time
  • Full access to 394 questions
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • Brainy AI Assistant
  • Lifetime updates

Two

Any 2 exams per month.

$20.00/exam
$39.99
/month
  • 2 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 1,000 Brainy AI Credits
  • Cancel anytime

Premium Twelve

Any 12 exams over 3 months.

$15.00/exam
$179.99
/3 months
  • 4 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 15,000 Brainy AI Credits
  • Dedicated support
  • Friend seat included — full access

Trusted by professionals at

NvidiaSupabaseGitHubOpenAITursoClerkClaude AIAmazon