LPI 101-500 practice test

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

Last update: Aug 14 ,2025
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

vote your answer:
A
B
C
D
E
A 1 B 0 C 0 D 0 E 0
Comments
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

vote your answer:
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 1 D 0 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 1 D 0 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 1 B 0 C 0 D 0 E 1
Comments
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

vote your answer:
A
B
C
D
E
A 1 B 0 C 0 D 1 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 1 B 0 C 0 D 0 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 1
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 1 C 0 D 0 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 1 D 1 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 1 C 0 D 0 E 0
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 1
Comments
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

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Page 1 out of 16
Viewing questions 1-15 out of 246
Go To
page 2