101-400 Premium Bundle

101-400 Premium Bundle

LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2 Certification Exam

4.5 
(7725 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
September 29, 2024Last update

LPI 101-400 Free Practice Questions

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

What does the command mount -a do? 

A. It mounts all available filesystems onto the current directory. 

B. It shows all mounted filesystems. 

C. It mounts all user mountable filesystems for the current user. 

D. It mounts all filesystems listed in /etc/fstab which have the option auto set. 

E. It mounts all filesystems listed in /etc/fstab which have the option noauto set. 

Answer:

Q3. - (Topic 3) 

Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard? 

A. SIGTERM 

B. SIGINT 

C. SIGSTOP 

D. SIGKILL 

Answer:

Q4. - (Topic 2) 

Which file should be edited to select the network locations from which Debian installation package files are loaded? 

A. /etc/dpkg/dpkg.cfg 

B. /etc/apt/apt.conf 

C. /etc/apt/apt.conf.d 

D. /etc/apt/sources.list 

E. /etc/dpkg/dselect.cfg 

Answer:

Q5. - (Topic 3) 

Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.) 

A. < 

B. <<< 

C. > 

D. >>> 

E. %> 

Answer: A,B,C 

Q6. - (Topic 4) 

What does the command mount -a do? 

A. It ensures that all file systems listed with the option noauto in /etc/fstab are mounted. 

B. It shows all mounted file systems that have been automatically mounted. 

C. It opens an editor with root privileges and loads /etc/fstab for editing. 

D. It ensures that all file systems listed with the option auto in /etc/fstab are mounted. 

E. It ensures that all file systems listed in /etc/fstab are mounted regardless of their options. 

Answer:

Q7. - (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 

Q8. - (Topic 3) 

From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.) 

A. source /usr/local/bin/runme.sh 

B. . /usr/local/bin/runme.sh 

C. /bin/bash /usr/local/bin/runme.sh 

D. /usr/local/bin/runme.sh 

E. run /usr/local/bin/runme.sh 

Answer: A,B 

Q9. - (Topic 3) 

What is the purpose of the Bash built-in export command? 

A. It allows disks to be mounted remotely. 

B. It runs a command as a process in a subshell. 

C. It makes the command history available to subshells. 

D. It sets up environment variables for applications. 

E. It shares NFS partitions for use by other systems on the network. 

Answer:

Q10. - (Topic 4) 

Which utility would be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem? 

A. mod2fs 

B. fsck 

C. tune2fs 

D. mke2fs 

E. fixe2fs 

Answer:

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

Q12. - (Topic 4) 

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? 

A. foo and bar would both be removed. 

B. foo would be removed while bar would remain accessible. 

C. foo would be removed. bar would still exist but would be unusable. 

D. Both foo and bar would remain accessible. 

E. The user is prompted whether bar should be removed, too. 

Answer:

Q13. CORRECT TEXT - (Topic 3) 

Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.) 

Answer: mkdir, /usr/bin/mkdir 

Q14. - (Topic 3) 

In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories? 

A. -dirmax 

B. -maxdepth 

C. -maxlevels 

D. -n 

E. -s 

Answer:

Q15. - (Topic 4) 

Which of the following commands makes /bin/foo executable by everyone but writable only by its owner? 

A. chmod u=rwx,go=rx /bin/foo 

B. chmod o+rwx,a+rx /bin/foo 

C. chmod 577 /bin/foo 

D. chmod 775 /bin/foo 

Answer:

Q16. - (Topic 3) 

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? 

A. By using the command :repeat followed by the number and the command. 

B. By specifying the number right in front of a command such as 4l or 2yj. 

C. By selecting all affected lines using the shift and cursor keys before applying the command. 

D. By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times. 

Answer:

Q17. CORRECT TEXT - (Topic 2) 

Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.) 

Answer: swapoff, /sbin/swapoff 

Q18. - (Topic 3) 

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types? 

A. magic 

B. type 

C. file 

D. pmagic 

E. hash 

Answer:

START 101-400 EXAM