LPIC-2 Exam 201

Here you have the best LPI 201-450 practice exam questions

  • You have 60 total questions to study from
  • Each page has 5 questions, making a total of 12 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on December 20, 2024
Question 1 of 60

Which of the following commands erases the contents of the /dev/sdb3 partition?

    Correct Answer: B

    The correct command to erase the contents of the /dev/sdb3 partition is 'dd if=/dev/zero of=/dev/sdb3'. This command uses 'dd' to copy data; 'if=/dev/zero' specifies the input file as /dev/zero, a special file in Unix-like systems that provides as many null bytes (zeroes) as are read from it. 'of=/dev/sdb3' specifies the output file as the /dev/sdb3 partition. Thus, this command effectively overwrites the partition with zeroes, erasing its contents.

Question 2 of 60

Which of the following files will be looked for and used by GNU make, if one of them exists, unless a different file is specified on the command line when trying to compile software from source code? (Choose two.)

    Correct Answer: C, D

    When using GNU make to compile software from source code, it will by default look for a file named 'makefile' or 'Makefile'. These are the two standard file names recognized by GNU make for the build instructions unless a different file is specified on the command line.

Question 3 of 60

FILL BLANK -

What command is used to send messages to all users currently logged in? (Specify ONLY the command without any path or parameters.)

    Correct Answer:

    The command used to send messages to all users currently logged in is 'wall'. The 'wall' command allows the system administrator to broadcast a message or the contents of a file to all logged-in users' terminals. The command sends the specified message to all users who are logged in to the system and have writable terminals.

Question 4 of 60

Which of the following commands restores only those files containing lpi in their name from the archive lpifiles.tar.gz?

    Correct Answer: A

    The correct command to extract only those files containing 'lpi' in their names from the archive lpifiles.tar.gz is 'tar xvzf lpifiles.tar.gz --wildcards "*lpi*"'. By using the '--wildcards' option, tar will interpret the pattern '*lpi*' and extract the matching files from the archive.

Question 5 of 60

A regular user has just run -

./configure && make && make install

to build and install a program. However, the installation fails. What could be done to install the program? (Choose two.)

    Correct Answer: B, D

    To install the program successfully, there are a few common methods when the installation process fails due to a regular user not having sufficient permissions. First, running 'make install' with root privileges (option B) ensures that the user has the necessary permissions to write to system directories. Second, rerunning './configure' with a '--prefix' option to a directory where the user has write permissions (option D) allows installation to proceed in a user-owned directory, avoiding permission issues.