101-400 Sample Questions & Answers
Free LPIC-1 Exam 101 v4.0 practice questions with worked answers and explanations. See how the ExamJungle simulator prepares you — then jump into the full test.
Launch the full 101-400 simulator →Showing 10 of 20 free samples.
- Question 1
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?
Show answer & 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.
- Question 2Select 2
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)
Show answer & 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.
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.
- Question 3
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?
Show answer & 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.
- Question 4
Which of the following statements is correct for a command line ending with a & character?
Show answer & 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.
- Question 5
Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?
Show answer & 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.
- Question 6
In Bash, inserting 2>&1 after a command redirects:
Show answer & explanation
Correct answer: E
The redirection 2>&1 sends standard error (file descriptor 2) to the same destination as standard output (file descriptor 1). This merges error and output streams, commonly used for logging or piping both streams together. Standard output, input, and process streams are separate file descriptors that remain unchanged.
- Question 7
Which of the following apt-get commands will install the newest versions of all currently installed packages?
Show answer & explanation
Correct answer: E
The apt-get dist-upgrade command upgrades packages and intelligently handles changing dependencies by installing new packages or removing obsolete ones as needed. Unlike upgrade, dist-upgrade can add or remove packages to resolve dependency conflicts. The install, update, and autoremove commands serve different package management purposes.
- Question 8
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 answer & explanation
Correct answer: C
Regular users can only assign nice values from 0 to 19, with 19 being the maximum (lowest priority). Negative nice values (-20 to -1) require root privileges as they increase process priority above default. The nice command helps manage system resource allocation by adjusting process scheduling priority.
- Question 9
A user accidentally created the subdirectory \dir in his home directory.
Which of the following commands will remove that directory?
Show answer & explanation
Correct answer: A
The rmdir command removes the directory \dir by escaping the backslash with tilde notation. In Unix-like systems, backslashes must be escaped or quoted when used in filenames. The tilde (~) represents the home directory, making ~/\dir the full path. Other options use incorrect syntax or would not handle the backslash properly.
- Question 10
What is the default action of the split command on an input file?
Show answer & explanation
Correct answer: A
The split command defaults to breaking files into 1,000-line segments when no options are specified. Each output file is named with letters (xaa, xab, xac, etc.). Use -l to specify different line counts, -b for byte-based splitting, or -d for numeric suffixes. Character, word, and byte splitting require explicit options.
Ready for the real thing?
The full 101-400 simulator has every exam-style question, timed mode, and instant scoring.