LPI 101-500 practice test

LPIC-1 System Administrator Exam 101, Part 1 of 2,

Last exam update: Nov 17 ,2024
Page 1 out of 16. Viewing questions 1-15 out of 246

Question 1

Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux
standard LF line breaks and stores the result in newlist.txt?

  • A. tr –d ‘\r’ < userlist.txt > newlist.txt
  • B. tr –c ‘\n\r’ ‘’ <newlist.txt> userlist.txt
  • C. tr ‘\r\n’ ‘’ <userlist.txt> newlist.txt
  • D. tr ‘\r’ ‘\n’ userlist.txt newlist.txt
  • E. tr –s ‘/^M/^J/’ userlist.txt newlist.txt
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 2

CORRECT TEXT
Which program runs a command in specific intervals and refreshes the display of the programs
output? (Specify ONLY the command without any path or parameters.)

Answer:

watch

User Votes:
Discussions
vote your answer:
0 / 1000

Question 3

The command dbmaint & was used to run dbmaint in the background. However, dbmaint is
terminated after logging out of the system. Which alternative dbmaint invocation lets dbmaint
continue to run even when the user running the program logs out?

  • A. job –b dmaint
  • B. dbmaint &>/dev/pts/null
  • C. nohup dbmaint &
  • D. bg dbmaint
  • E. wait dbmaint
Answer:

D

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 4

Which of the following vi commands deletes two lines, the current and the following line?

  • A. d2
  • B. 2d
  • C. 2dd
  • D. dd2
  • E. de12
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 5

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

  • A. <
  • B. #>
  • C. %>
  • D. >>>
  • E. 2>&1
Answer:

A,E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 6

Which of the following commands list all files and directories within the /tmp/ directory and its
subdirectories which are owned by the user root? (Choose two.)

  • A. find /tmp –user root -print
  • B. find –path /tmp –uid root
  • C. find /tmp –uid root -print
  • D. find /tmp –user root
  • E. find –path /tmp –user root -print
Answer:

A,E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 7

Which of the following commands lists the dependencies of the RPM package file foo.rpm?

  • A. rpm –qpR foo.rpm
  • B. rpm –dep foo
  • C. rpm –ld foo.rpm
  • D. rpm –R foo.rpm
  • E. rpm –pD foo
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 8

Which command uninstalls a package but keeps its configuration files in case the package is re-
installed?

  • A. dpkg –s pkgname
  • B. dpkg –L pkgname
  • C. dpkg –P pkgname
  • D. dpkg –v pkgname
  • E. dpkg –r pkgname
Answer:

E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 9

Which of the following apt-get subcommands installs the newest versions of all currently installed
packages?

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

E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 10

What is true regarding the configuration of yum? (Choose two.)

  • A. Changes to the repository configuration become active after running yum confupdate
  • B. Changes to the yum configuration become active after restarting the yumd service
  • C. The configuration of package repositories can be divided into multiple files
  • D. Repository configurations can include variables such as $basearch or $releasever
  • E. In case /etc/yum.repos.d/ contains files, /etc/yum.conf is ignored
Answer:

D,E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 11

Given a log file loga.log with timestamps of the format DD/MM/YYYY:hh:mm:ss, which command
filters out all log entries in the time period between 8:00 am and 8:59 am?

  • A. grep –E ‘:08:[09]+:[09]+’ loga.log
  • B. grep –E ‘:08:[00]+’ loga.log
  • C. grep –E loga.log ‘:08:[0-9]+:[0-9]+’
  • D. grep loga.log ‘:08:[0-9]:[0-9]’
  • E. grep –E ‘:08:[0-9]+:[0-9]+’ loga.log
Answer:

E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 12

Which of the following regular expressions represents a single upper-case letter?

  • A. :UPPER:
  • B. [A-Z]
  • C. !a-z
  • D. %C
  • E. {AZ}
Answer:

B

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 13

Which of the following commands prints a list of usernames (first column) and their primary group
(fourth column) from the /etc/passwd file?

  • A. fmt –f 1,4 /etc/passwd
  • B. cut –d : -f 1,4 /etc/passwd
  • C. sort –t : -k 1,4 /etc/passwd
  • D. paste –f 1,4 /etc/passwd
  • E. split –c 1,4 /etc/passwd
Answer:

B

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 14

Which of the following commands installs GRUB 2 into the master boot record on the third hard disk?

  • A. grub2 install /dev/sdc
  • B. grub-mkrescue /dev/sdc
  • C. grub-mbrinstall /dev/sdc
  • D. grub-setup /dev/sdc
  • E. grub-install /dev/sdc
Answer:

E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 15

Which of the following properties of a Linux system should be changed when a virtual machine is
cloned? (Choose two.)

  • A. The partitioning scheme
  • B. The file system
  • C. The D-Bus Machine ID
  • D. The permissions of /root/
  • E. The SSH host keys
Answer:

D,E

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000
To page 2