ExamGecko
Home Home / LPI / 101-500

LPI 101-500 Practice Test - Questions Answers, Page 23

Question list
Search
Search

Which of the following commands installs all packages with a name ending with the string foo?

A.
zypper get "*foo"
A.
zypper get "*foo"
Answers
B.
zypper update "foo?"
B.
zypper update "foo?"
Answers
C.
zypper force "foo*"
C.
zypper force "foo*"
Answers
D.
zypper install "*foo"
D.
zypper install "*foo"
Answers
E.
zypper add ".*foo"
E.
zypper add ".*foo"
Answers
Suggested answer: D

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

A.
The partitioning scheme
A.
The partitioning scheme
Answers
B.
The file system
B.
The file system
Answers
C.
The D-Bus Machine ID
C.
The D-Bus Machine ID
Answers
D.
The permissions of /root/
D.
The permissions of /root/
Answers
E.
The SSH host keys
E.
The SSH host keys
Answers
Suggested answer: D, E

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

A.
grub2 install /dev/sdc
A.
grub2 install /dev/sdc
Answers
B.
grub-mkrescue /dev/sdc
B.
grub-mkrescue /dev/sdc
Answers
C.
grub-mbrinstall /dev/sdc
C.
grub-mbrinstall /dev/sdc
Answers
D.
grub-setup /dev/sdc
D.
grub-setup /dev/sdc
Answers
E.
grub-install /dev/sdc
E.
grub-install /dev/sdc
Answers
Suggested answer: E

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
A.
fmt -f 1,4 /etc/passwd
Answers
B.
cut -d : -f 1,4 /etc/passwd
B.
cut -d : -f 1,4 /etc/passwd
Answers
C.
sort -t : -k 1,4 /etc/passwd
C.
sort -t : -k 1,4 /etc/passwd
Answers
D.
paste -f 1,4 /etc/passwd
D.
paste -f 1,4 /etc/passwd
Answers
E.
split -c 1,4 /etc/passwd
E.
split -c 1,4 /etc/passwd
Answers
Suggested answer: B

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

A.
:UPPER:
A.
:UPPER:
Answers
B.
[A-Z]
B.
[A-Z]
Answers
C.
!a-z
C.
!a-z
Answers
D.
%C
D.
%C
Answers
E.
{AZ}
E.
{AZ}
Answers
Suggested answer: B

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
A.
grep -E ':08:[09]+:[09]+' loga.log
Answers
B.
grep -E ':08:[00]+' loga.log
B.
grep -E ':08:[00]+' loga.log
Answers
C.
grep -E loga.log ':08:[0-9]+:[0-9]+'
C.
grep -E loga.log ':08:[0-9]+:[0-9]+'
Answers
D.
grep loga.log ':08:[0-9]:[0-9]'
D.
grep loga.log ':08:[0-9]:[0-9]'
Answers
E.
grep -E ':08:[0-9]+:[0-9]+' loga.log
E.
grep -E ':08:[0-9]+:[0-9]+' loga.log
Answers
Suggested answer: E

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

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

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

A.
auto-update
A.
auto-update
Answers
B.
dist-upgrade
B.
dist-upgrade
Answers
C.
full-upgrade
C.
full-upgrade
Answers
D.
install
D.
install
Answers
E.
update
E.
update
Answers
Suggested answer: E

Which command uninstalls a package but keeps its configuration files in case the package is reinstalled?

A.
dpkg -s pkgname
A.
dpkg -s pkgname
Answers
B.
dpkg -L pkgname
B.
dpkg -L pkgname
Answers
C.
dpkg -P pkgname
C.
dpkg -P pkgname
Answers
D.
dpkg -v pkgname
D.
dpkg -v pkgname
Answers
E.
dpkg -r pkgname
E.
dpkg -r pkgname
Answers
Suggested answer: E

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

A.
rpm -qpR foo.rpm
A.
rpm -qpR foo.rpm
Answers
B.
rpm -dep foo
B.
rpm -dep foo
Answers
C.
rpm -ld foo.rpm
C.
rpm -ld foo.rpm
Answers
D.
rpm -R foo.rpm
D.
rpm -R foo.rpm
Answers
E.
rpm -pD foo
E.
rpm -pD foo
Answers
Suggested answer: A
Total 246 questions
Go to page: of 25