0% found this document useful (0 votes)
57 views128 pages

101-500 Exam - Free Actual Q&As, Page 1 - ExamTopics

The document provides a series of questions and answers related to the 101-500 exam, focusing on Linux file systems and commands. It includes community-voted correct answers and explanations for each question, covering topics such as file system creation, umask values, filesystem checks, and systemd behavior with manual mounts. Additional study materials like a study guide and video course are also offered for exam preparation.

Uploaded by

Felipe Ocampo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views128 pages

101-500 Exam - Free Actual Q&As, Page 1 - ExamTopics

The document provides a series of questions and answers related to the 101-500 exam, focusing on Linux file systems and commands. It includes community-voted correct answers and explanations for each question, covering topics such as file system creation, umask values, filesystem checks, and systemd behavior with manual mounts. Additional study materials like a study guide and video course are also offered for exam preparation.

Uploaded by

Felipe Ocampo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 128

11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

- Expert Verified, Online, Free.

Prepare for your 101-500 exam with additional products

Study Guide

442 PDF Pages

$19.99

Buy Now

Video Course

125 Lectures

$19.99

Buy Now

 Custom View Settings

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 1/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Topic 1 - Single Topic

Question #1 Topic 1

Which type of file system is created by mkfs when it is executed with the block device name only and without any additional parameters?

A. XFS

B. VFAT

C. ext2

D. ext3

E. ext4

Correct Answer: C

Community vote distribution


C (100%)

  demarko Highly Voted  3 years ago


From man pages on centos 7
-t, --type type
Specify the type of filesystem to be built. If not specified, the default filesystem type (currently ext2) is used.
upvoted 12 times

  Malicaide Highly Voted  3 years, 6 months ago


Answer is C. ext2
upvoted 8 times

  Blindspot205 Most Recent  5 days, 7 hours ago


Answer is C. ext2
upvoted 1 times

  Tewodros89 3 months, 3 weeks ago


Answer is C. ext2
upvoted 1 times

  caprcisco 4 months, 4 weeks ago


Selected Answer: C

C, ext2
upvoted 1 times

  Dlm17 8 months, 4 weeks ago

Selected Answer: C

only mkfs with no parameters create filesystem ext2


upvoted 2 times

  erikseals 1 year, 7 months ago


C. ext2
upvoted 1 times

  FantaCola 1 year, 11 months ago

Selected Answer: C

Answer is C
upvoted 1 times

  MartiFC 1 year, 11 months ago

Selected Answer: C

Is correct
upvoted 1 times

  CuriousLinuxCat 2 years, 9 months ago


mkfs without any option creates ext2 filesystem

If you don't specify the filesystem type for the target device, it will use the default ext2 filesystem.

sudo mkfs /dev/sdb1

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 2/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Source: https://linuxhandbook.com/mkfs-command/
upvoted 4 times

  techalik 3 years, 1 month ago


mkfs /dev/sdb
/dev/sdb: UUID="22d5e5e8-c25e-47f4-a9bf-0d04bf2c90ab" TYPE="ext2"
upvoted 1 times

  gerben 3 years, 8 months ago


shouldn't this be E? ext4
upvoted 1 times

  cast7omadrid1 3 years, 8 months ago


I have tried on my ubuntu and what it creates by default is an ext2 partition
upvoted 7 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 3/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #2 Topic 1

Which umask value ensures that new directories can be read, written and listed by their owning user, read and listed by their owning group

and are not accessible at all for everyone else?

A. 0750

B. 0027

C. 0036

D. 7640

E. 0029

Correct Answer: B

Community vote distribution


B (100%)

  anhcq Highly Voted  2 years, 1 month ago


written and listed by their owning user => 7 => umask 0
read and listed by their owning group => 5 => umask 2
not accessible at all for everyone else => 0 => umask 7
=> umask 0027, answer is B
upvoted 13 times

  Malicaide Highly Voted  3 years, 6 months ago


Answer is B. 0027
upvoted 7 times

  Tewodros89 Most Recent  3 months, 3 weeks ago


Answer is B. 0027
The leading '0' means we're specifying the umask in octal (base 8).
The '2' in the first position subtracts write permissions for "others" (everyone else).
The '7' in the second position subtracts read, write, and execute permissions for the group.
The '2' in the third position subtracts write permission for the user.
upvoted 2 times

  hello2022 2 months, 2 weeks ago


excellent explanation
upvoted 1 times

  Dlm17 8 months, 4 weeks ago


Selected Answer: B

B is the answer
upvoted 1 times

  Jubal75 10 months, 2 weeks ago

Selected Answer: B

I say B
upvoted 1 times

  armandolubaba 1 year ago


B is correct
upvoted 1 times

  HelgaLee 1 year, 4 months ago


I think this schema would be more easy to get about umask
https://en.wikipedia.org/wiki/Umask
upvoted 1 times

  erikseals 1 year, 7 months ago


B. 0027
upvoted 1 times

  FantaCola 1 year, 11 months ago

Selected Answer: B

B. 0027
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 4/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

  Lazylinux 1 year, 11 months ago

Selected Answer: B

IS correct
upvoted 1 times

  iwkno6 2 years, 5 months ago


Agreed 0027
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Agreed, answer is B.
0027.
upvoted 1 times

  McLaba 2 years, 9 months ago


Mask (Numeric Notation) 137
Allowed Permissions rw-r-----
https://wintelguy.com/umask-calc.pl
upvoted 2 times

  minajahan 3 years, 7 months ago


https://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 5/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #3 Topic 1

Which of the following commands changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem

check while booting?

A. tune2fs -d 200 /dev/sda1

B. tune2fs -i 200 /dev/sda1

C. tune2fs -c 200 /dev/sda1

D. tune2fs -n 200 /dev/sda1

E. tune2fs --days 200 /dev/sda1

Correct Answer: B

  Gotcha Highly Voted  3 years, 7 months ago

it is repeated
upvoted 8 times

  Soltronics Highly Voted  1 year, 1 month ago

The "i" switch stands for interval-between-checks


upvoted 5 times

  Blindspot205 Most Recent  5 days, 7 hours ago


E. tune2fs --days 200 /dev/sda1
upvoted 1 times

  Tewodros89 3 months, 3 weeks ago


The command that changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting
is tune2fs. Specifically, the tune2fs command with the -i option is used to set the maximum mount count (in days) between two filesystem
checks.
upvoted 1 times

  james2033 5 months, 2 weeks ago


What is character ‫ג‬€"c ?
upvoted 2 times

  MartiFC 1 year, 11 months ago


REPEAD ASK!
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Repeated question, but welcome the revision.
upvoted 1 times

  MIU 3 years, 1 month ago


the same question as question 3
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 6/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #4 Topic 1

Which is the default percentage of reserved space for the root user on new ext4 filesystems?

A. 10%

B. 3%

C. 15%

D. 0%

E. 5%

Correct Answer: E

Community vote distribution


E (100%)

  techalik Highly Voted  3 years, 1 month ago


By default, the ext3 and ext4 filesystems reserve 5% space for use by the root user. This reserved space counts as Non DFS Used . The Reserved
block count is the number of ext3 / ext4 filesystem blocks that are reserved.
upvoted 10 times

  Tewodros89 Most Recent  3 months, 3 weeks ago


The default percentage of reserved space for the root user on new ext4 filesystems is typically 5%. This reserved space is used to ensure that the
root user (superuser) can still write to the filesystem even if it becomes full to prevent system instability.
upvoted 1 times

  erikseals 1 year, 7 months ago


E. 5% is correct
upvoted 1 times

  Lazylinux 1 year, 11 months ago

Selected Answer: E

is correct
upvoted 1 times

  Malicaide 3 years, 6 months ago


Answer is E. 5%
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 7/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #5 Topic 1

Which of the following is true when a file system, which is neither listed in /etc/fstab nor known to system, is mounted manually?

A. systemd ignores any manual mounts which are not done using the systemctl mount command

B. The command systemctl mountsync can be used to create a mount unit based on the existing mount

C. systemd automatically generates a mount unit and monitors the mount point without changing it

D. Unless a systemd mount unit is created, systemd unmounts the file system after a short period of time

E. systemctl unmount must be used to remove the mount because system opens a file descriptor on the mount point

Correct Answer: C

Community vote distribution


C (71%) D (29%)

  benjmcy Highly Voted  3 years, 7 months ago


I think the answer is C.
systemd mount unit is created and located at /proc/self/mountinfo once you mount a hotplug device manually.
upvoted 23 times

  ilputto Highly Voted  3 years, 2 months ago


It's A!
upvoted 6 times

  Blindspot205 Most Recent  5 days, 7 hours ago

Selected Answer: C

D. Unless a systemd mount unit is created, systemd unmounts the file system after a short period of time.

This statement is not accurate. systemd doesn't automatically unmount a file system just because a systemd mount unit is not created. When a
file system is mounted manually, systemd does not have a specific timeout for unmounting it. The file system will remain mounted until explicitly
unmounted using the umount command or a similar method.

Therefore, option D is not a behavior associated with systemd when a file system is mounted manually. The more accurate representation is
option C, where systemd automatically generates a mount unit and monitors the mount point without actively unmounting it.
upvoted 1 times

  slacked4222 1 month, 2 weeks ago


Selected Answer: D

Gpt and bard say D


upvoted 1 times

  adriencr 5 months, 1 week ago

Selected Answer: C

C. systemd automatically generates a mount unit and monitors the mount point without changing it

Lorsqu'un système de fichiers est monté manuellement (sans être défini dans /etc/fstab et sans utiliser une unité de montage systemd
spécifique), systemd génère automatiquement une unité de montage temporaire pour suivre ce point de montage. Il ne modifie pas le point de
montage, mais il le surveille, ce qui permet au reste du système de réagir en conséquence si nécessaire. Les autres options énumérées ne
décrivent pas correctement le comportement standard de systemd avec les montages manuels.
upvoted 1 times

  AdamCzepiel 1 year, 2 months ago


I tested it with manual mounting a ext4 Partition in /mnt/sdbext3.
After systemctl list-units -type mount the mnt-sdbext3.mount apeared.
So Unit was automatically created.
Answer C is correct
upvoted 4 times

  podm 1 year, 3 months ago


Correct answer A. I consulted with my Linux trainer. Systemd can mount disks. But the systemd will not mount disks unless it is directly ordered to
do so. In the fstab file or by creating a unit.
upvoted 1 times

  podm 1 year, 3 months ago


Sorry, Correct answer C.
upvoted 1 times

  erikseals 1 year, 7 months ago

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 8/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

B. The command systemctl mountsync can be used to create a mount unit based on the existing mount
upvoted 1 times

  Lazylinux 1 year, 8 months ago


Selected Answer: D

This had done my head and can see from others comments too...i was gunned for C but after reading the LPIC guide page 486-502 there was
nothing to support answer C and it was clear that systemd doe NOT automatically create mount points system unit i.e. mount unit needs be
created frst and auto-mount unit only then systemd manages the mount point automatically and hence C is NOT the answer..from the discussion
in the link iam providing it seems to be D which i though from the first place i.e. i was 50-50 between C and D but now im sure it is D and if
comes in exam i will gun for D, read all discussion in the link and you will see this comment quite often from varies users in different situations
upvoted 3 times

  Lazylinux 1 year, 8 months ago


***adding further comments because limit on text***

I'm experiencing more diffulties with 'mount' failing silently. Below is a transcript of two examples of this. In the first case, it seems from
'journalctl' that the kernel is mounting the device, but Systemd is (silently, to the user) unmounting it. Unlike with my original example,
systemctl daemon-reload does not fix the problem.

https://github.com/systemd/systemd/issues/1741
Feel free to comments further but please back it up with facts!!
upvoted 1 times

  k3n_ 1 year, 6 months ago


After some tests i realized that systemd don't unmount the unit after short period of time, unless the system is reboot. However, D. seems
more ok than C.
upvoted 1 times

  gonzaloco 1 year, 8 months ago


Selected Answer: C

For me is C
upvoted 3 times

  MaikyCR28 1 year, 9 months ago


This took me several days. The correct answer is D. Why?
A. It's not mandatory to use the "systemctl mount" to mount manual mount points.
B. The command "systemctl mountsync" doesn't exist. (https://man7.org/linux/man-pages/man1/systemctl.1.html)

C. "systemd automatically generates a mount unit and monitors the mount" yes, but it also says "without changing it", and when a mount point is
mounted manually without list it on /etc/fstab the mount unit will be unmounted every boot time, or even, on each period of time

D. If you don't announce the mount pint in /etc/fstab, the only way to have a correct mount point is by creating it with the systems mount
(https://oguya.ch/posts/2015-09-01-systemd-mount-partition/). Finally we can set a cron that start the mount unit every boot time, which, it can
not be possible whit the option C without creating an entry on the /etc/fstab file.

E. And finally the "E" answer all we know doesn't make sense.
upvoted 3 times

  [Removed] 2 years ago


Answer C is true.
upvoted 1 times

  anhcq 2 years, 1 month ago

Selected Answer: C

According to systemd.mount man page: "Mount points created at runtime (independently of unit files or /etc/fstab) will be monitored by
systemd and appear like any other mount unit in systemd."
upvoted 5 times

  anhcq 2 years, 1 month ago


I think the answer should be C.
According to systemd.mount man page: "Mount points created at runtime (independently of unit files or /etc/fstab) will be monitored by
systemd and appear like any other mount unit in systemd."
upvoted 1 times

  EMordenti 2 years, 2 months ago


The answer is B but it what happens is that it must be badly transcribed, something must be missing.
First execute systemctl mount
After execute sync to sincronize.
upvoted 1 times

  EMordenti 2 years, 1 month ago


Sorry. Definitely, the answer is C.
Command systemctl mountsync not exist. As formulated, the answer is not correct.
If the command is executed separately (systemctl mount and after sync, in other line) will be valid.
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 9/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

  spicemines 2 years, 3 months ago


This is a tricky question. I believe the answer is C by process of elimination. I can't find any documentation to support that answer. I believe A is
wrong because I can't find any "systemctl mount" command, though I can find a "systemd-mount" command. I believe B is wrong because the
command "systemctl mountsync" does not exist. I believe D is wrong because I can find no documentation to support it, and I've mounted disks
in a systemd system and they were never unmounted by systemd, even after weeks of being continually mounted. I believe E is wrong for the
same reason that A is wrong, namely, I can't find any "systemctl unmount" command, though I can find a "systemd-umount" command.
upvoted 2 times

  iwkno6 2 years, 5 months ago


I'm not sure but C makes the most sense to me...
upvoted 1 times

Question #6 Topic 1

FILL BLANK -

Which program updates the database that is used by the locate command? (Specify ONLY the command without any path or parameters).

Correct Answer: updatedb

  Dude0909 9 months, 2 weeks ago


udatedb
upvoted 1 times

  iwkno6 2 years, 5 months ago


agreed
upvoted 1 times

  Goozian 2 years, 5 months ago


updatedb
upvoted 3 times

  in_the_wof 3 years ago


updated
upvoted 2 times

  in_the_wof 3 years ago


updatedb
upvoted 12 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 10/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #7 Topic 1

What does the command mount --bind do?

A. It makes the contents of one directory available in another directory

B. It mounts all available filesystems to the current directory

C. It mounts all user mountable filesystems to the user's home directory

D. It mounts all file systems listed in /etc/fstab which have the option userbind set

E. It permanently mounts a regular file to a directory

Correct Answer: A

Community vote distribution


A (100%)

  Easyman Highly Voted  3 years, 1 month ago


A is correct.
df -hT | grep sdb1
/dev/sdb1 ext4 991M 2.6M 922M 1% /mnt

root@ubuntu1804:~# mount --bind /mnt /run/media/system/Virtual_disk/


root@ubuntu1804:~# ls /mnt/
lost+found
root@ubuntu1804:~# touch /mnt/file1
root@ubuntu1804:~# ls /mnt/
file1 lost+found
root@ubuntu1804:~# ls /run/media/system/Virtual_disk/
file1 lost+found
upvoted 13 times

  Blindspot205 Most Recent  5 days, 6 hours ago

Selected Answer: A

The answer is A
upvoted 1 times

  NeoSam999 1 year ago


Correct Answer: A
https://www.baeldung.com/linux/bind-mounts
upvoted 2 times

  techalik 3 years, 1 month ago


Is it B?
upvoted 1 times

  iwkno6 2 years, 5 months ago


A is the right choice according the man page on mount
upvoted 6 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 11/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #8 Topic 1

Consider the following output from the command ls `"i:

How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?

A. ln -h a.txt c.txt

B. ln c.txt a.txt

C. ln a.txt c.txt

D. ln -f c.txt a.txt

E. ln -i 525385 c.txt

Correct Answer: C

Community vote distribution


A (100%)

  slacked4222 1 month, 2 weeks ago

Selected Answer: A

Gpt and bard says A


upvoted 1 times

  prometeu 6 months, 2 weeks ago


No one. For create b.txt with same inode must the command : "ln a.txt b.txt"
upvoted 1 times

  klever 1 year, 3 months ago


C is correct because only ln is used without any options creating a hardlink which has the same inode number as the original file
upvoted 4 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 12/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #9 Topic 1

Consider the following directory:

drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales

Which command ensures new files created within the directory sales are owned by the group sales? (Choose two.)

A. chmod g+s sales

B. setpol -R newgroup=sales sales

C. chgrp -p sales sales

D. chown --persistent *.sales sales

E. chmod 2775 sales

Correct Answer: AE

Community vote distribution


AC (100%)

  Goena Highly Voted  1 year, 3 months ago

A and E is correct.
upvoted 6 times

  slacked4222 Most Recent  1 month, 2 weeks ago

Selected Answer: AC

The correct answers are A. chmod g+s sales and C. chgrp -p sales sales.

Option A: chmod g+s sales

The chmod g+s command sets the group-set-ID bit for the directory sales. This means that new files created within the directory sales will inherit
the group ownership of the directory, which is sales.

Option C: chgrp -p sales sales

The chgrp -p command changes the group ownership of the directory sales and all of its files and subdirectories recursively. This means that all
files currently in the directory sales and all new files created within the directory will be owned by the group sales.

Option E: chmod 2775 sales


The chmod command changes the permissions of the directory sales. However, it does not affect the group ownership of the directory.
upvoted 1 times

  slacked4222 1 month, 2 weeks ago


Says bard and gpt
upvoted 1 times

  edmiranda 3 months, 4 weeks ago


http://www.dba-oracle.com/t_linux_setuid_setgid_skicky_bit.htm
upvoted 2 times

  Mlolos 4 months ago


A and C according to chatGpt
upvoted 1 times

  Parazitenew 2 months, 2 weeks ago


ChatGPT is wrong.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 13/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #10 Topic 1

In order to display all currently mounted filesystems, which of the following commands could be used? (Choose two.)

A. cat /proc/self/mounts

B. free

C. lsmounts

D. mount

E. cat /proc/filesystems

Correct Answer: AD

  McLaba Highly Voted  2 years, 9 months ago


A & D are OK
df - mount - /proc/mounts - /proc/self/mounts
upvoted 6 times

  slacked4222 Most Recent  1 month, 2 weeks ago


The correct answers are A. cat /proc/self/mounts and D. mount.

Option A: cat /proc/self/mounts

The /proc/self/mounts file contains information about all of the filesystems that are currently mounted on the system. This file is a text file that
can be read using the cat command.

Option D: mount

The mount command can be used to list all of the filesystems that are currently mounted on the system. The mount command without any
arguments will display a list of all currently mounted filesystems.

The other options are incorrect:


upvoted 1 times

  slacked4222 1 month, 2 weeks ago


Says bard and gpt
upvoted 1 times

  jorgearmijo 11 months ago


its correct the options A and D, show the same information about partitions mounted
upvoted 1 times

  richta 2 years, 11 months ago


A and D are correct https://www.cyberciti.biz/faq/linux-command-list-mounted-devices-in-terminal/
upvoted 4 times

  techalik 3 years, 1 month ago


D is ok
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 14/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #11 Topic 1

FILL BLANK -

Which command displays the current disk space usage for all mounted file systems? (Specify ONLY the command without any path or

parameters.)

Correct Answer: df

  gonzaloco Highly Voted  3 years, 11 months ago


Hello, the command is df instead du. not right?
upvoted 34 times

  lanc Highly Voted  3 years, 7 months ago


du - Summarize disk usage of each FILE, recursively for directories
df - displays the amount of disk space available on the file system containing each file
upvoted 20 times

  slacked4222 Most Recent  1 month, 2 weeks ago


The correct answer is df.

The df command displays information about the disk space usage for all currently mounted file systems. It does not require any path or
parameters.

Says bard and gpt


upvoted 1 times

  waynewastaken 3 months ago


du not df
upvoted 1 times

  ChrisHO 6 months, 2 weeks ago


The command that displays the current disk space usage for all mounted file systems is `df`.
upvoted 1 times

  ChrisHO 6 months, 3 weeks ago


The command that displays the current disk space usage for all mounted file systems is `df`.
upvoted 1 times

  braiansieber 1 year, 2 months ago


df for sure
upvoted 1 times

  RoyRoyRoyRoy 1 year, 6 months ago


Should be df, du list the file size of each file in current directory, df list the disk space usage of the file system
upvoted 1 times

  n42hira 1 year, 6 months ago


its df not du
upvoted 1 times

  Lazylinux 1 year, 8 months ago


old fashioned DF
upvoted 2 times

  aries_jamie 1 year, 9 months ago


the answer should be df.
Per man page, df is to report file system disk space usage while du is to estimate file space usage.
upvoted 1 times

  matheuskshn 1 year, 10 months ago


df com certeza!
upvoted 1 times

  Temas84 1 year, 10 months ago


df for sure
upvoted 1 times

  toni23 1 year, 11 months ago


for me, answer is df
df command – Shows the amount of disk space used and available on Linux file systems.

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 15/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

du command – Display the amount of disk space used by the specified files and for each subdirectory.
btrfs fi df /device/ – Show disk space usage information for a btrfs based mount point/file system.
upvoted 2 times

  MartiFC 1 year, 11 months ago


I think that is DF
upvoted 1 times

  k3n_ 1 year, 12 months ago


(...)usage for all mounted file systems(...)
Answer is: df
upvoted 2 times

  serlan 2 years ago


df - is the answer
upvoted 2 times

Question #12 Topic 1

Which chown command changes the ownership to dave and the group to staff on a file named data.txt?

A. chown dave/staff data.txt

B. chown -u dave -g staff data.txt

C. chown --user dave --group staff data.txt

D. chown dave+staff data.txt

E. chown dave:staff data.txt

Correct Answer: E

Community vote distribution


E (100%)

  longmax90 Highly Voted  3 years, 4 months ago

chown USERNAME:GROUPNAME FILENAME


upvoted 16 times

  Lazylinux Most Recent  1 year, 8 months ago

Selected Answer: E

As per MAX90 comments


upvoted 1 times

  FantaCola 1 year, 11 months ago


Selected Answer: E

E is correct
upvoted 3 times

  MartiFC 1 year, 11 months ago

Selected Answer: E

correct!
upvoted 1 times

  MartiFC 2 years, 1 month ago


correct!
upvoted 1 times

  jegga 2 years, 7 months ago


E is correct
upvoted 2 times

  techalik 3 years, 1 month ago


E is ok
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 16/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #13 Topic 1

When considering the use of hard links, what are valid reasons not to use hard links?

A. Hard links are not available on all Linux systems because traditional filesystems, such as ext4, do not support them

B. Each hard link has individual ownership, permissions and ACLs which can lead to unintended disclosure of file content

C. Hard links are specific to one filesystem and cannot point to files on another filesystem

D. If users other than root should be able to create hard links, suln has to be installed and configured

E. When a hard linked file is changed, a copy of the file is created and consumes additional space

Correct Answer: C

Community vote distribution


C (100%)

  slobber20 Highly Voted  3 years, 5 months ago

No C is correct
upvoted 14 times

  slacked4222 Most Recent  1 month, 2 weeks ago

Selected Answer: C

The valid reasons not to use hard links are B. Each hard link has individual ownership, permissions, and ACLs, which can lead to unintended
disclosure of file content, and C. Hard links are specific to one filesystem and cannot point to files on another filesystem.
upvoted 1 times

  ACM13 5 months, 3 weeks ago


C is correct a hard link can only be used within the same file system, for system wide we have to use soft links
upvoted 1 times

  smyclops 1 year, 1 month ago


C is correct
upvoted 1 times

  Lazylinux 1 year, 8 months ago

Selected Answer: C

I C is correct
upvoted 1 times

  aries_jamie 1 year, 9 months ago


C is correct answer
upvoted 1 times

  Janec20 1 year, 11 months ago

Selected Answer: C

While useful, there are some limitations to what hard links can do. For starters, they can only be created for regular files (not directories or
special files). Also, a hard link cannot span multiple filesystems. They only work when the new hard link exists on the same filesystem as the
original
upvoted 2 times

  DenisZ 2 years, 6 months ago


С is correct
upvoted 2 times

  hossem1998 3 years, 6 months ago


isn't a
the correct answer
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 17/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #14 Topic 1

In compliance with the FHS, in which of the directories are man pages found?

A. /opt/man/

B. /usr/doc/

C. /usr/share/man/

D. /var/pkg/man

E. /var/man/

Correct Answer: C

Community vote distribution


C (100%)

  techalik Highly Voted  3 years, 1 month ago

C is ok
/usr/share/man/
upvoted 12 times

  slacked4222 Most Recent  1 month, 2 weeks ago

Selected Answer: C

The correct answer is C. /usr/share/man/.

According to the Filesystem Hierarchy Standard (FHS), man pages (manual pages) should be installed under the /usr/share/man directory. This
directory is specifically designated for storing shared resources, such as man pages, documentation, fonts, and other files that are not specific to
any particular application.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 18/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #15 Topic 1

FILL BLANK -

Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)

Correct Answer: cmdline

  slacked4222 1 month, 2 weeks ago


The correct answer is cmdline.

The /proc/cmdline file contains the command-line parameters that were passed to the kernel when the system was booted. These parameters
can include information about the boot device, kernel options, and other system-specific settings.
upvoted 1 times

  NeoSam999 1 year ago


Correct Answer: cmdline
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s2-proc-cmdline
upvoted 3 times

  MartiFC 1 year, 11 months ago


REPEAT TOO
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Repeated, but appreciate the revision!
upvoted 1 times

  phucpeta 2 years, 11 months ago


it is repeat
upvoted 3 times

  MIU 3 years, 1 month ago


the same question as question 4
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 19/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #16 Topic 1

What is the process ID number of the init process on a System V init based system?

A. -1

B. 0

C. 1

D. It is different with each reboot

E. It is set to the current run level

Correct Answer: C

  slacked4222 1 month, 2 weeks ago


The correct answer is C. 1.

In System V init-based systems, the init process is the first process to be started when the system boots. It is responsible for initializing the system
and starting other system services. The init process is assigned the process ID number 1. This means that the init process is the parent of all other
processes on the system.
upvoted 1 times

  Soltronics 1 year, 1 month ago


Process ID 1 is usually the init process primarily responsible for starting and shutting down the system
upvoted 2 times

  iwkno6 2 years, 5 months ago


correct PID 1
upvoted 1 times

  techalik 3 years, 1 month ago


C is ok
root 1 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
upvoted 3 times

  longmax90 3 years, 4 months ago


By executing "ps aux", the process with PID is /sbin/init, that is the System V init based system.
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 20/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #17 Topic 1

Which daemon handles power management events on a Linux system?

A. acpid

B. batteryd

C. pwrmgntd

D. psd

E. inetd

Correct Answer: A

Community vote distribution


A (100%)

  mvpVN Highly Voted  2 years, 10 months ago

Answer A.
acpid: Advanced Configuration and Power Interface
Refer: https://www.thegeekdiary.com/linux-os-service-
acpid/#:~:text=The%20acpid%20daemon%20supports%20the,programs%20to%20handle%20the%20event.
upvoted 5 times

  Bradneymk Most Recent  1 year, 7 months ago

Selected Answer: A

A is correct
upvoted 1 times

  erzelman 1 year, 9 months ago

Selected Answer: A

A is correct
upvoted 1 times

  MartiFC 1 year, 11 months ago


Selected Answer: A

CORRECT!
upvoted 1 times

  MartiFC 2 years, 1 month ago


acpi talk about power. So the correct answer is A
upvoted 2 times

  McReseau 2 years, 7 months ago


Great answer
upvoted 1 times

  techalik 3 years, 1 month ago


A is ok
(ACPI) to allow intelligent power management on your system
upvoted 4 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 21/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #18 Topic 1

Which of the following statements are true about the boot sequence of a PC using a BIOS? (Choose two.)

A. Some parts of the boot process can be configured from the BIOS

B. Linux does not require the assistance of the BIOS to boot a computer

C. The BIOS boot process starts only if secondary storage, such as the hard disk, is functional

D. The BIOS initiates the boot process after turning the computer on

E. The BIOS is started by loading hardware drivers from secondary storage, such as the hard disk

Correct Answer: AD

Community vote distribution


AD (100%)

  fproof Highly Voted  2 years, 9 months ago

A and D are correct!!!


upvoted 8 times

  pmcchesn Most Recent  1 year ago

Why would B be incorrect? A UEFI can be used instead, so BIOS is not required.
upvoted 1 times

  bricklannister 1 year ago


You're right that UEFI can be used instead, but the question specifically said the PC is using BIOS.
upvoted 4 times

  M_ukesh8 5 months ago


Agree 100%. But here it has not mentioned for using UEFI.
upvoted 1 times

  Lazylinux 1 year, 8 months ago

Selected Answer: AD

Sounds gr8t
upvoted 1 times

  trofimdv 1 year, 11 months ago


A and D
upvoted 1 times

  MartiFC 1 year, 11 months ago


A and D are correct!
upvoted 1 times

  danomix95 2 years, 7 months ago


A and D. easy question.
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 22/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #19 Topic 1

What is true regarding UEFI firmware? (Choose two.)

A. It can read and interpret partition tables

B. It can use and read certain file systems

C. It stores its entire configuration on the /boot/ partition

D. It is stored in a special area within the GPT metadata

E. It is loaded from a fixed boot disk position

Correct Answer: BD

Community vote distribution


AB (83%) BD (17%)

  serlan Highly Voted  3 years ago

I think A and B. UEFI its Firmware on the motherboard.


upvoted 17 times

  rjlg2centos8 Highly Voted  3 years, 2 months ago

I think the correct answer is a and b, because the firmware is storage in the motherboard, not in a disk, like says "gpt metadata".
upvoted 9 times

  MIU 3 years, 1 month ago


NO. GPT = UEFI. Very simple. So the answers are correct,
upvoted 1 times

  sli720 3 years, 1 month ago


GPT is a partition table format for hard disks and UEFI is a pc firmware on a chip on the motherboard. How can be this the same? I also
think A and B is correct.
upvoted 13 times

  slacked4222 Most Recent  1 month, 2 weeks ago

Selected Answer: AB

Option A: It can read and interpret partition tables

UEFI firmware is responsible for initializing the hardware and loading the operating system. This includes reading and interpreting the partition
table on the boot drive. The partition table tells the firmware where the operating system is located and how it is partitioned.

Option B: It can use and read certain file systems


UEFI firmware can only read certain file systems, such as FAT and NTFS. It cannot read or write to Linux file systems, such as ext4 and XFS.
upvoted 1 times

  rmmichael95 5 months, 4 weeks ago


EFI is stored on it's own chip and in the esp, not anywhere on GPT
upvoted 1 times

  pinguinomaster 8 months, 3 weeks ago

Selected Answer: AB

A y b son las correctas


upvoted 1 times

  thefred 1 year ago


Selected Answer: AB

Had my test today and passed with 100%, it's A and B.


upvoted 6 times

  TT924 1 year, 1 month ago

Selected Answer: BD

B and D are correct.

https://learning.lpi.org/en/learning-materials/101-500/102/102.2/102.2_01/

GPT-partitioned disks can be used either with computers with the traditional PC BIOS or ones with UEFI firmware. On machines with a BIOS, the
second part of GRUB is stored in a special BIOS boot partition.

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 23/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

On systems with UEFI firmware, GRUB is loaded by the firmware from the files grubia32.efi (for 32-Bit systems) or grubx64.efi (for 64-Bit systems)
from a partition called the ESP (EFI System Partition).
upvoted 2 times

  Adam_H 1 year ago


"GRUB is loaded by the firmware [...] from a partition called the ESP (EFI System Partition)."
GRUB is loaded by the (UEFI) firmware in order to boot the OS.
The UEFI firmware itself is located in a chip on the motherboard, and is not loaded from the GPT metadata (which is located on the hard
drive).

Therefore, A & B are the correct answers, and not B & D.


upvoted 2 times

  Freelancer 1 year, 3 months ago


seems A and B but anyone knows if in the exam the score is for B and D?
upvoted 2 times

  OgeeN 1 year, 3 months ago

Selected Answer: AB

A and B is right.
upvoted 2 times

  pstree 1 year, 5 months ago

Selected Answer: BD

Actually D seem to be correct: (Quoting https://wiki.restarters.net/UEFI_and_GPT )


"In order to work with UEFI, one of the partitions on a GPT disk must be a special system partition known as the ESP (EFI System Partition). UEFI
can recognise this, understand a FAT file system on it, and find the files on it required for booting the computer."
upvoted 2 times

  Mike_SFG 1 year, 8 months ago


It should be A and B. UEFI is stored on flash memory on the motherboard.
upvoted 2 times

  Lazylinux 1 year, 8 months ago


Selected Answer: AB

Correct stores info in EFI partition nothing to do with GPT or other devices
upvoted 3 times

  Kradma 1 year, 11 months ago

Selected Answer: AB

The other ones are a nonsense


upvoted 2 times

  minhng99 2 years ago


Selected Answer: AB

UEFI doesn't touch the disk to write its config


upvoted 2 times

  ebo07 2 years ago


I Think the correct answer is A and B. Bellow the reference from LPIC site documentation:

As the BIOS, the UEFI is also a firmware, but it can identify partitions and read many filesystems found in them.
upvoted 4 times

  anhcq 2 years, 1 month ago

Selected Answer: AB

The UEFI is a firmware, but it can identify partitions and read many filesystems found in them. The UEFI does not rely on the MBR, taking into
account only the settings stored in its non-volatile memory (NVRAM) attached to the motherboard.
Ref: https://learning.lpi.org/en/learning-materials/101-500/101/101.2/101.2_01/
upvoted 2 times

  SScott 2 years, 2 months ago


The best answers would be A & D.

UEFI and the ESP is a set/special partition on the hard disk. GPT does use UEFI firmware. The efi file is stored but technically UEFI in general can
be loaded however GPT is a definite related component. A fixed boot disk partition pertains to MBR so E is out. Reading & interpreting partition
tables seems more accurate than reading the file system itself.

https://www.alphr.com/mbr-vs-gpt/#:~:text=GPT%20stands%20for,1%20(LBA%201).

https://www.freecodecamp.org/news/uefi-vs-bios/#:~:text=UEFI%20stands%20for,contains%20the%20bootloader.

https://www.happyassassin.net/posts/2014/01/25/uefi-boot-how-does-that-actually-work-
then/#:~:text=The%20GUID%20Partition,firmware%20to%20have.
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 24/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #20 Topic 1

A faulty kernel module is causing issues with a network interface card. Which of the following actions ensures that this module is not loaded

automatically when the system boots?

A. Using lsmod --remove --autoclean without specifying the name of a specific module

B. Using modinfo -k followed by the name of the offending module

C. Using modprobe -r followed by the name of the offending module

D. Adding a blacklist line including the name of the offending module to the file /etc/modprobe.d/blacklist.conf

E. Deleting the kernel module's directory from the file system and recompiling the kernel, including its modules

Correct Answer: D

  cast7omadrid1 Highly Voted  3 years, 10 months ago


it is repeated
upvoted 9 times

  NeoSam999 Most Recent  1 year ago

Correct Answer: D
https://wiki.archlinux.org/title/Kernel_module Blacklisting section.
upvoted 1 times

  MartiFC 1 year, 11 months ago


REPEAT TOO
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Repeated, but appreciate the revision!
upvoted 1 times

  MIU 3 years, 1 month ago


the same question as question 5
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 25/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #21 Topic 1

When is the content of the kernel ring buffer reset? (Choose two.)

A. When the ring buffer is explicitly reset using the command dmesg --clear

B. When the ring buffer is read using dmesg without any additional parameters

C. When a configurable amount of time, 15 minutes by default, has passed

D. When the kernel loads a previously unloaded kernel module

E. When the system is shut down or rebooted

Correct Answer: AE

Community vote distribution


AE (100%)

  CuriousLinuxCat Highly Voted  2 years, 5 months ago

Answers are correct!


Kernel ring buffer is reset either via command or power off because it is a volatile memory!
upvoted 11 times

  FerryS123 Most Recent  3 months, 3 weeks ago

Hello @M_ukesh8 Have you given the test recently?


upvoted 1 times

  M_ukesh8 5 months ago


I believe too Aand E
upvoted 1 times

  damirx 8 months, 3 weeks ago


It is actually dmesg --clear
upvoted 1 times

  Bradneymk 1 year, 7 months ago

Selected Answer: AE

A & E are on point


upvoted 2 times

  Lazylinux 1 year, 8 months ago


Selected Answer: AE

as per linuxcat comments


upvoted 2 times

  njb2sheikh1 1 year, 9 months ago


A and E
upvoted 1 times

  fproof 2 years, 9 months ago


A and E are correct!!!
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 26/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #22 Topic 1

What is the first program the Linux kernel starts at boot time when using System V init?

A. /lib/init.so

B. /proc/sys/kernel/init

C. /etc/rc.d/rcinit

D. /sbin/init

E. /boot/init

Correct Answer: D

  aMiPL Highly Voted  2 years, 9 months ago

D is correct: /sbin/init comes first

https://tldp.org/LDP/sag/html/init-process.html
upvoted 12 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 27/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #23 Topic 1

A Debian package creates several files during its installation. Which of the following commands searches for packages owning the file

/etc/debian_version?

A. apt-get search /etc/debian_version

B. apt -r /etc/debian_version

C. find /etc/debian_version -dpkg

D. dpkg -S /etc/debian_version

E. apt-file /etc/debian_version

Correct Answer: D

Community vote distribution


D (100%)

  linuz Highly Voted  3 years, 7 months ago


The switch is incorrect.

The correct command should be


dpkg -S /etc/debian_version

Giving the output:


base-files: /etc/debian_version
upvoted 21 times

  cast7omadrid1 3 years, 7 months ago


The problem is that instead of putting the -S or similar, it says "" . It's a mistake all over the page.
upvoted 8 times

  CuriousLinuxCat 2 years, 5 months ago


Whoever comes across this message, know that this website uses:

("") for a hyphen (-)

and some other characters that probably has been encoded wrong that makes ("), (`) and (-) look wrong.
upvoted 10 times

  Lazylinux Most Recent  1 year, 8 months ago

Selected Answer: D

dpkg -S followed by whatever you want to search for


upvoted 3 times

  jegga 2 years, 7 months ago


option D is close to the answer.

This should be the correct answer: dpkg-query -S /etc/debian_version


upvoted 2 times

  McLaba 2 years, 9 months ago


no one is correct
upvoted 1 times

  penguinx64 2 years, 10 months ago


-S, --search filename-search-pattern...
Search for a filename from installed packages.
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 28/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #24 Topic 1

What is contained on the EFI System Partition?

A. The Linux root file system

B. The first stage boot loader

C. The default swap space file

D. The Linux default shell binaries

E. The user home directories

Correct Answer: B

Community vote distribution


B (100%)

  cast7omadrid1 Highly Voted  3 years, 7 months ago


it is repeated
upvoted 8 times

  Adam_H Most Recent  1 year ago

Selected Answer: B

The EFI System Partition contains the first stage boot loader
upvoted 2 times

  MartiFC 1 year, 11 months ago


REPEAT TOO
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Repeated, but appreciate the revision!
upvoted 1 times

  MIU 3 years, 1 month ago


the same question as question 6
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 29/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #25 Topic 1

Which of the following directories on a 64 bit Linux system typically contain shared libraries? (Choose two.)

A. ~/.lib64/

B. /usr/lib64/

C. /var/lib64/

D. /lib64/

E. /opt/lib64/

Correct Answer: BD

  aMiPL Highly Voted  2 years, 9 months ago


Answer is correct:
/usr/lib64/
/lib64
upvoted 8 times

  ebo07 Highly Voted  2 years ago

B and D, bellow the LPI WebSite Reference:


Common locations for shared libraries in a Linux system are:
• /lib
• /lib32
• /lib64
• /usr/lib
• /usr/local/lib
upvoted 7 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 30/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #26 Topic 1

Which of the following files exist in a standard GRUB 2 installation? (Choose two.)

A. /boot/grub/stages/stage0

B. /boot/grub/i386-pc/lvm.mod

C. /boot/grub/fstab

D. /boot/grub/grub.cfg

E. /boot/grub/linux/vmlinuz

Correct Answer: BD

Community vote distribution


BD (100%)

  thienn458 1 year, 5 months ago


BD
On systems with GRUB installed, these are usually located on /boot/grub and include the GRUB
configuration file (/boot/grub/grub.cfg for GRUB 2 or /boot/grub/menu.lst in case of GRUB
Legacy), modules (in /boot/grub/i386-pc), translation files (in /boot/grub/locale) and fonts (in
/boot/grub/fonts).
upvoted 4 times

  Lazylinux 1 year, 8 months ago

Selected Answer: BD

is good
upvoted 1 times

  serlan 2 years ago


On Debian 11 x64 i have /boot/grub/x86_64-efi/lvm.mod
upvoted 3 times

  Guillem 2 years, 8 months ago


B, D Ok. reviewed on Centos8
upvoted 3 times

  McLaba 2 years, 9 months ago


B-D are OK
it's ok also on Ubuntu 20
upvoted 2 times

  aMiPL 2 years, 9 months ago


Answer is correct based on Debian install
upvoted 2 times

  McLaba 2 years, 9 months ago


on ubuntu I don't have /boot/grub/i386-pc/lvm.mod (B)
upvoted 3 times

  DenisZ 2 years, 6 months ago


On Ubuntu 20 have such a file
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 31/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #27 Topic 1

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

A. zypper get '*foo'

B. zypper update 'foo?'

C. zypper force 'foo*'

D. zypper install '*foo'

E. zypper add '.*foo'

Correct Answer: D

  k3n_ Highly Voted  1 year, 3 months ago


For some reason the charset is broken. Here is the options:
Zypper is a packet manager from openSuse.
A. zypper get *foo
B. zypper update foo?
C. zypper force foo*
D. zypper install *foo
E. zypper add .*foo
upvoted 6 times

  k3n_ 1 year, 3 months ago


Package manager*
upvoted 1 times

  klever Most Recent  1 year, 3 months ago

only correct answer is D as neither get, update, force nor add install anything
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 32/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #28 Topic 1

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

Correct Answer: CE

Community vote distribution


CE (100%)

  JilN Highly Voted  2 years, 7 months ago

Additional information. We must change the following as well.


1. The hostname
2. NIC MAC address
3. NIC IP address
4. Any item employing a UUID.
5. Machine ID
6. Configuration settings on the clone that employ any item in the list above
upvoted 14 times

  SScott 2 years, 2 months ago


Yes, C and E are right

The recommendation is to ensure the D-Bus Machine ID is unique.

https://wiki.debian.org/MachineId#:~:text=The%20machine%20id%20is%20something%20that%20is%20frequently%20missed%20to%20chan
ge%20when%20cloning%20a%20machine

https://unix.stackexchange.com/questions/402999/is-it-ok-to-change-etc-machine-id

https://askubuntu.com/questions/1179897/ubuntu-18-04-guests-which-cloned-by-virtualbox-have-the-same-ip-but-different-ma

For security reasons, E SSH host keys must not be duplicated

https://blog.technodrone.cloud/2013/01/the-ssh-key-problem-with-cloned-linux.html
upvoted 3 times

  Lazylinux Most Recent  1 year, 9 months ago

Selected Answer: CE

Below link states all

https://access.redhat.com/documentation/en-
us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/cloning_virtual_machines
upvoted 1 times

  tzahi 1 year, 9 months ago

Selected Answer: CE

Machine ID is a unique hexadecimal 32 character string given to your machine during installation. So it should be changed if the machine is
cloned to prevent duplicate ID on a network.
SSH keys are unique to each server/client and also should be changed to securely SSH
upvoted 2 times

  MashkoorQadir 3 years ago


host SSH keys needs to replace because the host name IP of the cloned machine will be changed.
upvoted 3 times

  MashkoorQadir 3 years ago


/root/ permission remains same in any case.
upvoted 2 times

  slobber20 3 years, 5 months ago


Disagree see:

https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/
https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 33/128
11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

upvoted 3 times

  ellen_AA 2 years, 10 months ago


I agree, but the question mentions the "D-bus machine-id"
upvoted 2 times

  oladessy 3 years, 5 months ago


D and E is the correct answer, can anyone explain why C is correct
upvoted 1 times

  SScott 2 years, 2 months ago


As for D, don't see this being something that necessarily needs to be changed.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/cloning-virtual-
machines_configuring-and-managing-
virtualization#:~:text=Note%20that%20disk%20images%20for%20VMs%20created%20in%20the%20system%20connection%20of%20libvirt%
20are%20by%20default%20located%20in%20the%20/var/lib/libvirt/images%20directory%20and%20owned%20by%20the%20root%20user
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 34/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #29 Topic 1

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

Correct Answer: E

  McLaba Highly Voted  2 years, 9 months ago

A. NO the right command is:# grub2-install /dev/sda


B. NO it's for create bootable device
C. NO does not exist
D. NO does not exist
E. YES it's the right command also on Grub2 system
upvoted 16 times

  JilN Highly Voted  2 years, 7 months ago

It's good to remember that unlike GRUB Legacy, you don't need to install GRUB2. all you do is rebuild the main installation file. This is done by
running either grub-mkconfig or grub2-mkconfig.
upvoted 8 times

  XVO668 Most Recent  8 months ago

To install GRUB2, the correct command is grub-install /dev/sdc. The command grub2 install /dev/sdc is not the correct syntax. The grub-install
command is used to install the GRUB bootloader to the Master Boot Record (MBR) of the specified device, in this case, /dev/sdc. (says GPT)
upvoted 1 times

  fproof 2 years, 9 months ago


it seems to be a typo error in answer A is "grub2-install" and not "grub2 install"
right answer A!!!
upvoted 2 times

  aMiPL 2 years, 9 months ago


grub-install is correct on debian (man grub-install)
grub-install (GRUB) 2.02+dfsg1-20+deb10u4
upvoted 4 times

  mriron 3 years ago


#grup2-install is a right answer, but "grup2 install" is not correct, there is no "-" sign between
upvoted 2 times

  demarko 3 years ago


It should be option A, but they missed the dash (-) in between grub2-install
grub-install will work only for grub, not for grub2

https://unix.stackexchange.com/questions/183053/grub-install-command-not-found
upvoted 4 times

  HieuNguyen887 2 years, 9 months ago


So, maybe the Answer something wrong
upvoted 1 times

  Doudou92i 3 years ago


why not rep A ??
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 35/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #30 Topic 1

Which of the following partition types is used for Linux swap spaces when partitioning hard disk drives?

A. 7

B. 82

C. 83

D. 8e

E. fd

Correct Answer: B

  minajahan Highly Voted  3 years, 7 months ago

https://www.tldp.org/HOWTO/Partition-Mass-Storage-Definitions-Naming-HOWTO/x190.html
upvoted 10 times

  iwkno6 Highly Voted  2 years, 5 months ago

82 Linux Swap
83 Linux
upvoted 7 times

  waynewastaken Most Recent  3 months ago

This is one of those trivia questions that you don't really need to know. fdisk, e.g. lists swap along with the type #
upvoted 1 times

  TheoDios 6 months, 3 weeks ago


Actually also the word swap should be supported while doing the exam.
The given example by ledlong leads to an output showing in the bottom part:
[...]
Aliases:
linux - 83
swap - 82
[...]
upvoted 1 times

  ledlong 2 years, 4 months ago


To see the list of known partition types, you can use fdisk utility. For example:
#fdisk /dev/sda
Choose m to show the menu if you dont know any option
Then choose l to list all known partition types.
upvoted 2 times

  aMiPL 2 years, 9 months ago


82 is Linux Swap
upvoted 4 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 36/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #31 Topic 1

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

Correct Answer: CD

Community vote distribution


CD (50%) DE (50%)

  aMiPL Highly Voted  2 years, 9 months ago

Correct:
https://docs.fedoraproject.org/en-US/Fedora/17/html/System_Administrators_Guide/sec-Configuring_Yum_and_Yum_Repositories.html
upvoted 5 times

  blk_542 1 year, 1 month ago


As per that same link, E might be also correct (as usual, the explanation is ambiguous):
"The values you define in the [main] section of the /etc/yum.conf file may override values set in individual [repository] sections."
upvoted 1 times

  Adam_H 1 year ago


That sounds to me like it's saying the opposite of E.

E is saying that /etc/yum.conf is ignored if the directory /etc/yum.repos.d/ contains files, while your quote is saying that any settings that
you define/change in the configuration file can override values in the individual repos.
upvoted 1 times

  Tewodros89 Most Recent  3 weeks ago

The correct statements regarding the configuration of yum are:

C. The configuration of package repositories can be divided into multiple files.

This is true. In the typical configuration, repository information is stored in separate files under the /etc/yum.repos.d/ directory.

D. Repository configurations can include variables such as $basearch or $releasever.

This is true. Yum configuration files support variables like $basearch (architecture of the system, e.g., x86_64) or $releasever (version of the
operating system).
upvoted 1 times

  Armiche 4 months ago

Selected Answer: CD

It's correct
upvoted 1 times

  Jos015 6 months ago


https://learning.lpi.org/en/learning-materials/101-500/102/102.5/102.5_01/
I think it could be C and D. E contradicts this:

For yum the “repos” are listed in the directory /etc/yum.repos.d/. Each repository is represented by a .repo file, like CentOS-Base.repo.

Additional, extra repositories can be added by the user by adding a .repo file in the directory mentioned above, or at the end of /etc/yum.conf.
However, the recommended way to add or manage repositories is with the yum-config-manager tool.
upvoted 2 times

  sheilawu 7 months, 2 weeks ago


Selected Answer: DE

CORRECT ANSWER IS DE
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 37/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #32 Topic 1

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

Correct Answer: B

Community vote distribution


B (100%)

  cast7omadrid1 Highly Voted  3 years, 10 months ago

The correct answer is dist-upgrade


upvoted 20 times

  serbal Highly Voted  3 years, 10 months ago

dist-upgrade - Upgrades all packages, but monitors for package dependencies


upvoted 14 times

  cloudbased Most Recent  1 year, 7 months ago

Selected Answer: B

the right answer is B. The update command updates only the repositories
upvoted 2 times

  gonzaloco 1 year, 8 months ago


Selected Answer: B

i think is upgrade but same wait the most right could be B


upvoted 1 times

  Lazylinux 1 year, 8 months ago

Selected Answer: B

is correct
upvoted 1 times

  marenco 1 year, 10 months ago


apt-get update updates the list of available packages and their versions, but it does not install or upgrade any packages.
apt-get upgrade actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available
updates for the software you have installed. This is why you first want to update.
upvoted 2 times

  minhng99 2 years ago


apt-get update is only for updating the local database contains the info about what the latest packages is, it does NOT attempt to upgrade any
package
upvoted 2 times

  CuriousLinuxCat 2 years, 5 months ago


The update does not, under any circumstances delete currently installed packages.
Also, it won't install new versions of the package if it has to change another status package.

Efficiency-wise, you want to use dist-upgrade because it has an in-built conflict resolution feature! (Also, does what update does too)
upvoted 3 times

  CEF 2 years, 8 months ago


From de MAN Page

update (apt-get(8)): update is used to download package information from all configured sources. Other commands operate on this data to e.g.
perform package upgrades or search in and display details about all packages available for installation.

upgrade (apt-get(8)): upgrade is used to install available upgrades of all packages currently installed on the system from the sources configured
via sources.list(5). New packages will be installed if required to satisfy dependencies, but existing packages will never be removed. If an upgrade
for a package requires the removal of an installed package the upgrade for this package isn't performed.

full-upgrade (apt-get(8)): full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to
upgrade the system as a whole.
https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 38/128
11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

upvoted 3 times

  childofevil 1 year, 7 months ago


you look into the wrong man-page (man apt).
in the man-page from 'apt-get' there isn't a 'full-upgrade' only a 'dist-uprade' option.
upvoted 2 times

  McLaba 2 years, 9 months ago


A. auto-update -> does not exist
B. dist-upgrade -> upgrade linux distibution
C. full-upgrade -> does not exist
D. install -> install new packge
E. update -> last but not least ...the right answer!!!
upvoted 5 times

  McLaba 2 years, 8 months ago


B is right
dist-upgrade

I'm sorry
upvoted 7 times

  tommyWannaLearn 3 years ago


B must be a correct answer. Something wrong comes from this site
upvoted 2 times

  sandey 3 years, 5 months ago


update command on .deb distributions, update the repository list "/etc/apt/source.list". So the answer to the question would be "upgrade || dist-
upgrade".
Being an "upgrade", update and maintain previous packages.
"dist-upgrade", update and delete previous versions of the package
upvoted 3 times

  [Removed] 3 years, 5 months ago


By definition apt-get upgrade would be the answer, but dist-upgrade include upgrade plus dependency conflicts resolution, in this case B is
correct
upvoted 3 times

  shyamite 3 years, 10 months ago


It should be upgrade ( dependecny resolution but no deletion of conflicts) or dist-upgrdae( autoconfig dependency conflicts)
upvoted 5 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 39/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #33 Topic 1

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

Correct Answer: E

Community vote distribution


E (100%)

  Adam_H Highly Voted  1 year ago

Selected Answer: E

If it helps, you can think of using -r as telling the system to retain the configuration files for that package
upvoted 5 times

  blk_542 Most Recent  1 year, 1 month ago

true, -r:
https://phoenixnap.com/kb/dpkg-command
upvoted 1 times

  klever 1 year, 3 months ago


It is the correct answer, according to man page the -r, --remove
Remove an installed package. This removes everything except conffiles, which may avoid having to reconfigure the package if it is reinstalled
later
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 40/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #34 Topic 1

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

Correct Answer: A

Community vote distribution


A (100%)

  Iamrandom Highly Voted  1 year, 2 months ago

Selected Answer: A

answer is correct:

-q = query
-R = List capabilities on which this package depends (option of query parameter)
-p = package file
upvoted 7 times

  slacked4222 Most Recent  1 month, 2 weeks ago


The correct answer is A. rpm -qpR foo.rpm.

The rpm -qpR foo.rpm command displays the requires information for the RPM package file foo.rpm. This includes the list of dependencies that
the package requires in order to be installed and run properly.

The other options are incorrect:

B. rpm -dep foo: This command displays the provides information for the RPM package file foo.rpm. Provides information indicates what
capabilities or services the package provides, not its dependencies.

C. rpm -ld foo.rpm: This command displays the list of files that are installed by the RPM package file foo.rpm. It does not provide information
about dependencies.

D. rpm -R foo.rpm: This command lists the files that are contained within the RPM package file foo.rpm. It does not provide information about
dependencies.

E. rpm -pD foo: This command displays the pre-install script for the RPM package file foo.rpm. The pre-install script is executed before the
package is installed, and it is not related to dependencies.
upvoted 1 times

  Sarah4 2 months, 2 weeks ago


https://rpm-software-management.github.io/rpm/man/rpm.8.html
upvoted 1 times

  NeoSam999 1 year ago


Correct Answer: A
rpm -qRp [package.rpm] - show the requirements/dependencies of the indicated rpm file
upvoted 1 times

  blk_542 1 year, 1 month ago


A is correct:
https://phoenixnap.com/kb/rpm-command-in-linux
upvoted 1 times

  klever 1 year, 3 months ago


Seems like -R on it's own does the job according to man, q does not exist.
Man page on -R
List capabilities on which this package depends
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 41/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #35 Topic 1

What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?

A. 9

B. 15

C. 19

D. 49

E. 99

Correct Answer: C

Community vote distribution


C (100%)

  Igus Highly Voted  3 years, 3 months ago

1. Nice value goes as regular integer, where 19 is bigger than -20. If question would ask for highest priority - than it's -20.
2. Question asks about regular user. Regular user can not assign nice below 0.
upvoted 15 times

  aMiPL Highly Voted  2 years, 9 months ago


Run COMMAND with an adjusted niceness, which affects process scheduling. With no COMMAND, print the current niceness. Niceness values
range from -20 (most favorable to the process) to 19
(least favorable to the process).

So it must be 19. The question ask about the maximum possible number not a maximum priotity user can assign where lower = higher pririoty
upvoted 7 times

  Jack67 Most Recent  8 months ago

Selected Answer: C

the range of niceness is from -20 to 19


upvoted 2 times

  damirx 8 months, 3 weeks ago


It is 9. The lower the number the highest the nice priority. A regular user cannot set niceness below 0.
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Maximum range of niceness is from -20 to 19.
Just choose the max number from the selection, to which in this case, is 19.
upvoted 4 times

  klom 3 years, 4 months ago


Should be -20
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 42/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #36 Topic 1

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

Correct Answer: AD

  klever Highly Voted  1 year, 3 months ago

Just tried the two highlighted options on RedHat Linux 9 and they work!
upvoted 5 times

Question #37 Topic 1

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

A. <

B. #>

C. %>

D. >>>

E. 2>&1

Correct Answer: AE

  aMiPL Highly Voted  2 years, 9 months ago


The answer is correct:
https://tldp.org/LDP/abs/html/io-redirection.html
upvoted 8 times

  stefano1856 Highly Voted  2 years, 2 months ago

2>&1 is used to redirect standard error output (2) to standard output (1), for example:
find / -name *.log > result.txt 2>&1: register errors in results.txt and don't display nothing
find / -name *.log > result.txt: display errors
upvoted 6 times

  JilN Most Recent  2 years, 7 months ago


Is it supposed to be < or >
Am used to redirecting my output via >. I have not encountered < before. Someone please educate me.
upvoted 3 times

  CuriousLinuxCat 2 years, 5 months ago


You use < when you want to input some information to a command.

Basically, it's the other way around of >.


upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 43/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #38 Topic 1

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

Correct Answer: C

  mriron Highly Voted  3 years ago

2dd is correct answer


upvoted 12 times

  mvpVN 2 years, 10 months ago


Correct. 2dd deletes two lines the cursor is on
upvoted 5 times

  kipngge Most Recent  1 year, 5 months ago


Answer is 2dd
https://linuxize.com/post/vim-delete-line/
upvoted 1 times

  aMiPL 2 years, 9 months ago


2dd easy to test in vi.
Correct!
If you press one 'd' it won't do anything.
upvoted 3 times

  demarko 3 years ago


Answer is B = 2d
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 44/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #39 Topic 1

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

Correct Answer: C

Community vote distribution


C (100%)

  Adam_H Highly Voted  1 year ago

Selected Answer: C

The correct answer is nohup dbmaint &

The reason for this is nohup (“no hangup”) detaches dbmaint from the user who started it, and the & at the end tells the console to run dbmaint
in the background.
upvoted 6 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 45/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #40 Topic 1

From a Bash shell, which of the following commands directly execute the instructions from the file /usr/local/bin/runme.sh without starting a

subshell?

(Choose two.)

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

Correct Answer: AD

  Negator Highly Voted  2 years, 9 months ago

Create a script that outputs the shell level environmental variable using "echo $SHLVL". When you execute this script using source or dot (.) it will
display 1 showing that the script was executed in the current shell. When you execute the script using full path it will show 2, showing that the
script was executed in a subshell.
upvoted 9 times

  CuriousLinuxCat Highly Voted  2 years, 5 months ago

A and D is correct.
source and . tested on Ubuntu.
upvoted 5 times

  Mchoeti Most Recent  9 months, 3 weeks ago

right A and D
upvoted 1 times

  jsteven845 2 years, 10 months ago


A and D
upvoted 3 times

  mriron 3 years ago


A and D are correct, assuming there is a space after (.) point for D . B is wrong , because it execute in the kind shell not in current shell
upvoted 2 times

  MIU 3 years, 1 month ago


A and D are correct. When you try, just copy and paste from the question. You guys sometimes typo when you try then on your environment....
upvoted 1 times

  ilputto 3 years, 2 months ago


the correct one is A and D. source <script> and . ./<script> are equivalent
upvoted 4 times

  Vendo 3 years, 4 months ago


When a script is run using source it runs within the existing shell, any variables created or modified by the script will remain available after the
script completes.

source is a synonym for dot/period '.' in bash.

Be careful!
./ and source are not quite the same.

./script runs the script as an executable file, launching a new shell to run it

https://ss64.com/bash/source.html
upvoted 4 times

  snota45 3 years, 5 months ago


it is A & C
upvoted 1 times

  Vano1 3 years, 5 months ago


The correct answer is A, B.
Verified on CentOS7.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 46/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

  Vano1 3 years, 5 months ago


D is correct if between . (dot) and /usr/loca/bin/runme.sh is a space.
This question have 3 correct answer or I don't understand something.
upvoted 2 times

  Vano1 3 years, 5 months ago


After some researchers, I choose A and D.
upvoted 3 times

  deewetdvjbmnjkjytfdszxc 3 years, 5 months ago


Isn't A+B?
upvoted 2 times

Question #41 Topic 1

FILL BLANK -

Which program runs a command in specific intervals and refreshes the display of the program's output? (Specify ONLY the command without

any path or parameters.)

Correct Answer: watch

  QuangNH Highly Voted  2 years, 10 months ago

i think answer is: watch


upvoted 7 times

  iwkno6 2 years, 5 months ago


yes it's watch
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 47/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #42 Topic 1

Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the

deleted content below the current line?

A. i (lowercase)

B. p (lowercase)

C. P (uppercase)

D. U (uppercase)

E. u (lowercase)

Correct Answer: B

Community vote distribution


B (100%)

  shyamite Highly Voted  3 years, 10 months ago

p is below cursor , P is above cursor.


upvoted 24 times

  minajahan 3 years, 7 months ago


https://books.google.se/books?
id=_ZF2CJ0XfGoC&lpg=PA112&ots=IDIviGWO0l&dq=P%20is%20above%20cursor&pg=PA112#v=onepage&q=P%20is%20above%20cursor
&f=false
upvoted 3 times

  iwkno6 2 years, 5 months ago


agreed!
upvoted 2 times

  valhallaone Most Recent  11 months, 3 weeks ago

the shorter one (p) goes below cursor, the taller one (P) above.
upvoted 1 times

  Lazylinux 1 year, 8 months ago


Selected Answer: B

p is below cursor and capital P is above cursor


upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 48/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #43 Topic 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

Correct Answer: A

  JopieJo 11 months, 3 weeks ago


Agree with opt A:
Only delete (tr -d) the Carriage Return (CR) character (0x0D, \r)
and leave the Line Feed (LF) character (0x0A, \n) in tact.
tr -d '\r' <input file> <output file>
upvoted 2 times

  AdamCzepiel 1 year, 2 months ago


checked, correct -> https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 49/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #44 Topic 1

Given the following input stream:

txt1.txt

atxt.txt

txtB.txt

Which of the following regular expressions turns this input stream into the following output stream? txt1.bak.txt atxt.bak.txt txtB.bak.txt

A. s/^.txt/.bak/

B. s/txt/bak.txt/

C. s/txt$/bak.txt/

D. s/^txt$/.bak^/

E. s/[.txt]/.bak$1/

Correct Answer: C

Community vote distribution


C (100%)

  shyamite Highly Voted  3 years, 10 months ago


correct \/
In my opinion the correct option is s / txt $ / bak.txt /
upvoted 20 times

  cast7omadrid1 Highly Voted  3 years, 11 months ago

In my opinion the correct option is s / txt $ / bak.txt /


upvoted 13 times

  blk_542 Most Recent  1 year, 1 month ago

Correct is C
upvoted 1 times

  cloudbased 1 year, 7 months ago

Selected Answer: C

C because $ will change the only "txt" at the end of the line. If there is no $ symbol the command will change the first part of the name of the
first file too.
upvoted 3 times

  gonzaloco 1 year, 8 months ago


C 100%
upvoted 1 times

  w3rr 1 year, 10 months ago

Selected Answer: C

answer is C
upvoted 2 times

  saliente 1 year, 11 months ago


/var/root # cat teste | sed s/txt$/bak.txt/
txt1.bak.txt
atxt.bak.txt
txtb.bak.txt

/var/root # cat teste | sed s/txt/bak.txt/


bak.txt1.txt
abak.txt.txt
bak.txtb.txt

C is the right
upvoted 4 times

  nedoex 1 year, 11 months ago


Selected Answer: C

aswer must be C
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 50/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

  serlan 2 years ago

Selected Answer: C

answer is C
upvoted 2 times

  anhcq 2 years, 1 month ago


sed s/txt$/bak.txt/ <<TXT
> txt1.txt
> atxt.txt
> txtB.txt
> TXT
answer is C
upvoted 2 times

  Nedyar 2 years, 2 months ago


text inside file:
txt1.txt
atxt.txt
txtB.txt

cat file | sed 's/txt/bak.txt/'


bak.txt1.txt
abak.txt.txt
bak.txtB.txt

I am doing something wrong?


upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


B makes the most sense to me.
Adding the $ just unnecessarily complicates things.
upvoted 1 times

  Thuhaib 2 years, 9 months ago


C is the Correct Answer
upvoted 4 times

  RalfScholze 2 years, 10 months ago


s/txt$/bak.txt/ replaces the string txt with bak.txt at the end of the line. Globally is nonsense, since there is only one “txt at the end of the line” in
any line.
Memorize B for your test. After passing the test, forget B and realize that the answer C is the correct one. Life is tough.
upvoted 4 times

  Rini_Giannenzo 3 years, 1 month ago


C check todoist
upvoted 3 times

  basic88 3 years, 3 months ago


I think b is the correct answer. The only option that is missing is the g at the end.
/txt/ wil search for exactly that word, and will change it to /bak.txt/,
upvoted 1 times

  [Removed] 3 years, 5 months ago


Actually, the correct answer is C
[root@localhost ~]# echo txt1.txt > stream; echo atxt.txt >> stream ; echo txtB.txt >> stream
[root@localhost ~]# cat stream | sed 's/txt$/bak.txt/'
upvoted 8 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 51/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #45 Topic 1

Which command must be entered before exiting vi to save the current file as filea.txt?

A. %s filea.txt

B. %w filea.txt

C. :save filea.txt

D. :w filea.txt

E. :s filea.txt

Correct Answer: D

  XVO668 8 months, 2 weeks ago


:w stands for write
upvoted 1 times

  MartiFC 2 years, 1 month ago


the answer is correct!
upvoted 1 times

  CuriousLinuxCat 2 years, 9 months ago


Correct.
https://www.cyberciti.biz/faq/how-to-save-existing-file-to-a-new-file-save-as-in-vi-vim/
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 52/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #46 Topic 1

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

A. SIGTERM

B. SIGCONT

C. SIGSTOP

D. SIGKILL

E. SIGINT

Correct Answer: E

  naTpuoT 3 months, 1 week ago


Correct E - SIGINT is the signal sent when we press Ctrl+C

Ctrl + C vs Ctrl + Z | Are they the Same?


No, they are not. People ordinarily tend to confuse Ctrl + C and Ctrl + Z, as both of them seem to carry out a similar functionality, if not entirely
the same. Indeed, both Ctrl + C and Ctrl + Z can interrupt a running process, but the task that follows differs.

Ctrl + C will terminate the process after it has interrupted and stopped the running process. On the other hand, Ctrl + Z will only pause the
process temporarily, and send the running process to the background. The user is then able to run any other terminals processes in the
meantime, and once done, the user can again bring the paused process back to the foreground, by means of using the fg command inside the
terminal.
https://www.programmerhat.com/linux-ctrl-c/
upvoted 1 times

  NeoSam999 1 year ago


Correct Answer: E
Ctrl+C - SIGINT
Ctrl+\ - SIGQUIT
Ctrl+Z - SIGTSTP
upvoted 2 times

  Grandsumi 1 year ago


E is correct. Ctrl + C actually passes SIGINT(2).
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 53/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #47 Topic 1

Which of the following commands displays the output of the foo command on the screen and also writes it to a file called /tmp/foodata?

A. foo | less /tmp/foodata

B. foo | cp /tmp/foodata

C. foo > /tmp/foodata

D. foo | tee /tmp/foodata

E. foo > stdout >> /tmp/foodata

Correct Answer: D

  CuriousLinuxCat Highly Voted  2 years, 5 months ago

D is correct.
Keyword is 'tee'. Think of the letter 'T' where it sends information two-ways!
upvoted 11 times

  rockk18 1 year, 6 months ago


you saved me by your explanation in letter T, thank you.
upvoted 1 times

  mentor84 Highly Voted  3 years, 8 months ago

cat foo | tee /tmp/foodata


upvoted 8 times

  lanc 3 years, 7 months ago


foo is considered as a command. (as the question says the output of the command)
upvoted 13 times

  M_ukesh8 Most Recent  5 months ago

tee command generally gives std. output to screen and at the same time output can be append to file with -a flag.
Condition: It needs a standard input via (|)
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 54/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #48 Topic 1

What output will be displayed when the user fred executes the following command? echo 'fred $USER'

A. fred fred

B. fred /home/fred/

C. 'fred $USER'

D. fred $USER

E. 'fred fred'

Correct Answer: D

Community vote distribution


D (100%)

  klever Highly Voted  1 year, 3 months ago


single quotes will suppress the special meaning of $ sign and treat it literally outputting what literally is inside of the single quotes
upvoted 5 times

  blk_542 Most Recent  1 year, 1 month ago

D supposed to be correct, but actually the question is wrongly written:


`fred $USER' command would output a > prompt since it is mixing 2 quotation types.
It supposed to be 'fred $USER' (single quotation type), this is easy to test and result are the same with a regular user and root.
upvoted 2 times

  Cybersec1989 1 year, 3 months ago

Selected Answer: D

Correct Tested
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 55/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #49 Topic 1

Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?

A. lsattr foo

B. apropos foo

C. locate foo

D. whatis foo

E. which foo

Correct Answer: E

  shyamite Highly Voted  3 years, 10 months ago

A. lsattr foo -- lsattr: No such file or directory while trying to stat ls


B. apropos foo - all man pages - apropos - search the manual page names and descriptions
C. locate foo - locate file via updatedb refernce
D. whatis foo - whatis - display one-line manual page descriptions

E. which foo - show location lib -which - locate a command


upvoted 17 times

  Tewodros89 Most Recent  3 months, 4 weeks ago

E
which: A command that searches for the executable file associated with the given command in the directories listed in the PATH environment
variable.
foo: The command for which you want to determine the executable file's path.
upvoted 1 times

Question #50 Topic 1

When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces?

A. -rep-space

B. -printnul

C. -nospace

D. -ignore-space

E. -print0

Correct Answer: E

  aMiPL Highly Voted  2 years, 9 months ago


find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f

Find files named core in or below the directory /tmp and delete them, processing filenames in such a way that file or directory names containing
spaces or newlines are correctly handled.
upvoted 10 times

  lordg21 Most Recent  1 year, 2 months ago

UYFYUFUY
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 56/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #51 Topic 1

Which of the following commands can be used to determine how long the system has been running? (Choose two.)

A. uptime

B. up

C. time --up

D. uname ‫ג‬€"u

E. top

Correct Answer: AE

Community vote distribution


AE (100%)

  MartiFC 1 year, 11 months ago

Selected Answer: AE

Yes, is correct
upvoted 2 times

  jegga 2 years, 7 months ago


A and E is correct
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 57/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #52 Topic 1

What is true regarding the command

ls > files

if files does not exist?

A. The output of ls is printed to the terminal

B. files is created and contains the output of ls

C. An error message is shown and ls is not executed

D. The command files is executed and receives the output of ls

E. Any output of ls is discarded

Correct Answer: B

Community vote distribution


B (100%)

  Lazylinux 1 year, 8 months ago

Selected Answer: B

yep it is Bee
upvoted 2 times

  Untaked 1 year, 9 months ago


B
root@LAPTOP-57VPBVH8:~# ls > files
root@LAPTOP-57VPBVH8:~# ls
README.md files
root@LAPTOP-57VPBVH8:~# cat files
README.md
files
upvoted 3 times

  tzahi 1 year, 9 months ago


Selected Answer: B

Simple redirection:
> Will write stdout to a file ( if the file exists it will overwrite it)
>> Will append stdout to a file ( write to next line after the original data ends )
Both will create the file is it doesn't exist
upvoted 3 times

  ebo07 2 years ago


B is correct. Tested on Xubuntu
upvoted 1 times

  CuriousLinuxCat 2 years, 6 months ago


B is the correct answer.
Confirmed with CoCalc website running Ubuntu.
upvoted 2 times

  jegga 2 years, 7 months ago


B is the correct answer confirmed on RedHat
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 58/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #53 Topic 1

Which of the following files, located in a user's home directory, contains the Bash history?

A. .bashrc_history

B. .bash_histfile

C. .history

D. .bash_history

E. .history_bash

Correct Answer: D

  Gotcha Highly Voted  3 years, 7 months ago

it is repeated
upvoted 9 times

  dawith Most Recent  4 months ago


repeated but correct.
upvoted 1 times

  MartiFC 1 year, 11 months ago


REPEAT TOO
upvoted 1 times

  Abdiaziz 2 years, 4 months ago


Repeated
upvoted 1 times

  iwkno6 2 years, 5 months ago


as CuriousLinucCat said :D
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Repeated, but appreciate the revision!
upvoted 1 times

  claudiodz 2 years, 9 months ago


moderator, this it is repeated
upvoted 1 times

  MIU 3 years, 1 month ago


the same question as question 8
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 59/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #54 Topic 1

Which wildcards will match the following filenames? (Choose two.) ttyS0 ttyS1 ttyS2

A. ttyS[1-5]

B. tty?[0-5]

C. tty*2

D. tty[A-Z][012]

E. tty[Ss][02]

Correct Answer: BD

  iwkno6 Highly Voted  2 years, 5 months ago


B and D are correct.
A doesn't include 0, C is definitely wrong and E doesn't include 1.
upvoted 11 times

  M_ukesh8 Most Recent  5 months ago

A can not be considered because the endings are : 012


So the correct ans are B, D
upvoted 1 times

  jegga 2 years, 7 months ago


A, B, and D is the answer.

They all can match the files


upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


A. ttyS[1-5]

A will not work because it is missing a 0 in the [1-5].


If it was ttyS[0-5], then the answer would be valid.
upvoted 8 times

  sugisho 3 years, 2 months ago


[root@centos7 ~]# touch ttyS0 ttyS1 ttyS2
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# ls tty?[0-5]
ttyS0 ttyS1 ttyS2
[root@centos7 ~]# ls tty[AZ][012]
ls: cannot access tty[AZ][012]: No such file or directory
upvoted 3 times

  hawkmoon 3 years, 2 months ago


you forgot the - in the [A-Z]
upvoted 14 times

  glorofarz 3 years, 6 months ago


well, if i do ls /dev/tty?[0-5] on debian/centos i get 28 results including e.g. /dev/ttyS63
so suffice it to say i am a bit confuseled.... (yet i found the same answer in another language test with the same answers)
upvoted 2 times

  lanc 3 years, 7 months ago


For this one, tty?[0-5], question mark represents if the proceeding character is present or not.
So I think the answer is correct if ttyS?[0-5] was an option
upvoted 1 times

  cast7omadrid1 3 years, 7 months ago


We're talking about wildcars (globbing) not regular expressions.
upvoted 6 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 60/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #55 Topic 1

Which of the following commands redirects the output of ls to standard error?

A. ls >-1

B. ls <<ERR

C. ls >&2

D. ls >>2

E. ls |error

Correct Answer: C

  CuriousLinuxCat Highly Voted  2 years, 6 months ago


@okamigo, E is absolutely false because it isn't even using the re-directional symbol (>).

The correct answer is C.


D is wrong because the append symbol (>>) cannot append to STDERR(2). It needs a file to append the out of 'ls' to.
upvoted 8 times

  okamigo Most Recent  2 years, 9 months ago


C it's not correct answer
I think E it wright answer
upvoted 1 times

  anhcq 2 years, 1 month ago


nope, E ls |error, this command redirect output of ls command to error command which is not found. answer C is correct
upvoted 2 times

  SScott 2 years, 1 month ago


C is correct: ls>&2 sends the ls output to the 2 (stderr) location

A, B, D, and E are wrong:


ls>-1 creates a file -1 that is the output of ls
<<ERR sets the ERR string as the end of input
ls>>2 would append to a file '2'
ls |error is an invalid command
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 61/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #56 Topic 1

Which of the following commands displays the contents of a gzip compressed tar archive?

A. gzip archive.tgz | tar xvf -

B. tar ‫ג‬€"fzt archive.tgz

C. gzip ‫ג‬€"d archive.tgz | tar tvf -

D. tar cf archive.tgz

E. tar ztf archive.tgz

Correct Answer: E

  klom Highly Voted  3 years, 4 months ago


the correct one is:
tar -ztf archive.tar.gz
upvoted 14 times

  germanb 3 years, 4 months ago


this is correct
upvoted 3 times

  CuriousLinuxCat 2 years, 5 months ago


Agreed, this is the correct format.
-z Use Gzip
-t List contents
-f Specify file or else will use $TAPE.
upvoted 7 times

  PERjham Highly Voted  3 years ago

"tar zvf" is the correct, command tar work without the "-" character too (testing in rhel and same, and debian).
upvoted 8 times

  SScott 2 years, 1 month ago


That is correct, this option will work without switches and can be .tar.gz or tgz (Tested using CentOS7):

tar cvfz backup-1.tgz (to create)


tar ztf backup-1.tgz (to list the contents without extracting/unpacking)

the tar.gz can be substituted just fine with .tgz

z switch is for handling .tar.gz g zip files, the t switch list the contents without extracting the file, and f specifies the command is to use the
archive file name, the -v switch would help to show permissions, size, and timestamp but the answer E could exclude this as the question asks
about displaying the contents of the tar file.

https://www.hostdime.com/kb/hd/command-line/how-to-tar-untar-and-zip-files
upvoted 2 times

  Tewodros89 Most Recent  3 months, 4 weeks ago


the correct one is:
tar -ztf archive.tar.gz
upvoted 1 times

  dawith 4 months ago


correct
upvoted 1 times

  blk_542 1 year, 1 month ago


Tested them all, none worked in CentOS 7
upvoted 1 times

  MartiFC 2 years, 1 month ago


correct
upvoted 2 times

  demarko 3 years ago


non of these option worked on centos7
tar -tvf is the answer
https://www.tecmint.com/18-tar-command-examples-in-linux/

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 62/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

upvoted 1 times

Question #57 Topic 1

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

Correct Answer: B

  woonsi 11 months ago


B is the correct answer. i have test in Ubuntu. cut -d : -f 1,4 /etc/passwd
upvoted 1 times

Question #58 Topic 1

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

A. :UPPER:

B. [A-Z]

C. !a-z

D. %C

E. {AZ}

Correct Answer: B

Community vote distribution


B (100%)

  YaFoo Highly Voted  2 years, 5 months ago


A is incorrect because the syntax should be like this [:upper:]
This is equal to [A-Z]
upvoted 5 times

  Amycert Most Recent  11 months, 1 week ago

Selected Answer: B

B, very easy
A is incorrect
upvoted 1 times

  Madridi 1 year ago


CORRECT
upvoted 2 times

  MartiFC 1 year, 11 months ago


Selected Answer: B

B is the answer correct.


upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 63/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #59 Topic 1

FILL BLANK -

Which command is used to start another command with a given nice level? (Specify ONLY the command without any path or parameters.)

Correct Answer: nice

  iwkno6 Highly Voted  2 years, 5 months ago

nice: to start process wit ha given nice level


renice: to give a nice level to an already running process.
upvoted 12 times

Question #60 Topic 1

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

Correct Answer: E

Community vote distribution


E (100%)

  Amycert 11 months, 1 week ago

Selected Answer: E

E is correct, tested
upvoted 3 times

  Reseko 4 months, 1 week ago


Exactly, tested by me, and the only one that returns correct values is option E
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 64/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #61 Topic 1

Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose

two.)

A. LABEL

B. ID

C. FIND

D. NAME

E. UUID

Correct Answer: AE

  Deef14 2 years, 3 months ago


A and E is correct
upvoted 4 times

  SScott 2 years, 1 month ago


That is right, https://linuxhint.com/mount_partition_uuid_label_linux/
upvoted 1 times

Question #62 Topic 1

A yum repository can declare sets of related packages. Which yum command installs all packages belonging to the group admintools?

A. yum pkgsel --install admintools

B. yum install admintools/*

C. yum groupinstall admintools

D. yum taskinstall admintools

E. yum collection install admintools

Correct Answer: C

  CuriousLinuxCat 2 years, 5 months ago


C. yum groupinstall admintools

is correct.
upvoted 4 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 65/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #63 Topic 1

FILL BLANK -

What directory contains configuration files for additional yum repositories? (Specify the full path to the directory.)

Correct Answer: /etc/yum.conf

  mentor84 Highly Voted  3 years, 8 months ago


It's asking about directory, not a file, so I believe the correct answer is: /etc/yum.repos.d/
upvoted 38 times

  cast7omadrid1 Highly Voted  3 years, 10 months ago

it is recommended to define individual repositories in new or existing .repo files in the /etc/yum.repos.d/ directory. The values you define in
individual [repository] sections of the /etc/yum.conf file override values set in the [main] section.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-configuring_yum_and_yum_repositories
upvoted 10 times

  3glag 3 years, 9 months ago


yes its right
upvoted 3 times

  CuriousLinuxCat 2 years, 9 months ago


Although what mentor84 said is correct, what ultimately determines the path to the /etc/yum.repos.d/ is the values that you set in the
/etc/yum.conf.

A tricky question. Just think of it as, "who is in charge of the yum.repos.d file? Oh yeah, the /etc/yum.comf..."
upvoted 4 times

  Jack67 Most Recent  7 months ago


yum.conf is the file, the correct answer is: /etc/yum.repos.d/
upvoted 1 times

  Jos015 6 months ago


I agree: https://learning.lpi.org/en/learning-materials/101-500/102/102.5/102.5_01/

Managing Software Repositories


For yum the “repos” are listed in the directory /etc/yum.repos.d/. Each repository is represented by a .repo file, like CentOS-Base.repo.

Additional, extra repositories can be added by the user by adding a .repo file in the directory mentioned above, or at the end of
/etc/yum.conf. However, the recommended way to add or manage repositories is with the yum-config-manager tool.
upvoted 1 times

  Amycert 11 months, 1 week ago


etc/yum.repos.d/ is the correct
by chatgpt
upvoted 1 times

  k3n_ 1 year ago


etc/yum.repos.d/
ChatGPT gives this answer
upvoted 1 times

  Untaked 1 year, 9 months ago


/etc/yum.repos.d/ (Correct)
set options for individual repositories by editing the [repository] sections in /etc/yum.conf and .repo files in the /etc/yum.repos.d/ directory;

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-configuring_yum_and_yum_repositories
upvoted 1 times

  wvdw1962 1 year, 12 months ago


In my opinion it has to be: /etc/yum.repos.d
- they are asking for a directory
- /etc/yum.conf not available in all distros, not in Ubuntu, not in Fedora, it exists in Centos and RedHat, but in both no path to a directory like
/etc/yum.repos.d
upvoted 1 times

  serlan 2 years ago


/etc/yum.repos.d/
upvoted 1 times

  starout 2 years, 1 month ago

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 66/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Unequivocal /etc/yum.conf
upvoted 1 times

  McReseau 2 years, 7 months ago


/etc/yum.repos.d/
upvoted 4 times

  dilopezat 2 years, 4 months ago


I think this is the right answer.
/etc/yum.repos.d/
upvoted 3 times

  penguinx64 2 years, 10 months ago


Fedora doesn't have yum.conf but Red Hat does
upvoted 1 times

  Robert12 3 years ago


It is extremely difficult to answer this question correctly, your always going to answer /etc/yum.repos.d because the question specifically asks
which directory. Your never going to think of answering /etc/yum.conf because its a configuration file .
upvoted 3 times

  mriron 3 years ago


it is written as: The configuration file for yum and related utilities is located at /etc/yum.conf. This file contains one mandatory [main] section,
which allows you to set Yum options that have global effect, and can also contain one or more [repository] sections, which allow you to set
repository-specific options.
upvoted 1 times

  MashkoorQadir 3 years ago


/etc/yum.conf is not a directory wrong answer
upvoted 3 times

  dalziad 3 years, 4 months ago


je pense la vrai reponse est
/etc/yum.repos.d
par ce que il nous demande le repertoire et non le fichier !
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 67/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #64 Topic 1

Which of the following commands installs the GRUB boot files into the currently active file systems and the boot loader into the first partition

of the first disk?

A. grub-install /dev/sda

B. grub-install /dev/sda1

C. grub-install current /dev/sda0

D. grub-install /dev/sda0

E. grub-install current /dev/sda1

Correct Answer: A

Community vote distribution


A (50%) B (50%)

  Zeist Highly Voted  3 years, 5 months ago

I believe that the correct answer is B


upvoted 14 times

  Jonatas 3 years, 4 months ago


The question says "currently active file systems", if installed on / dev / sda1 it will need to be added manually to the drive's boot loader after
installation. Correct answer is A
upvoted 13 times

  kamilovic 3 years, 2 months ago


full agree - its A
upvoted 3 times

  CuriousLinuxCat 2 years, 5 months ago


Agreed.
upvoted 1 times

  ant_man 2 years, 3 months ago


B.
grub-install /dev/sda1
Install Grub files in directory /boot/grub of current partition. Install boot loader in first partition of first hard disk.
upvoted 2 times

  Xameneoh Highly Voted  2 years, 6 months ago

@rjlg2centos8 Check this explanation: https://wiki.centos.org/HowTos/GrubInstallation#Installing_Grub_using_grub-install . The correct answer is


B.
upvoted 10 times

  SScott 2 years, 1 month ago


That is correct B is the answer.
https://debian-handbook.info/browse/sv-SE/stable/sect.config-
bootloader.html#:~:text=Each%20partition%20is%20represented%20by%20its%20number%20on%20the%20disk%20on%20which%20it%20re
sides%3A%20for%20instance%2C%20/dev/sda1%20is%20the%20first%20partition%20on%20the%20first%20disk

https://wiki.archlinux.org/title/GRUB#:~:text=Make%20sure%20to,the%20boot%20loader

grub-install current is invalid, A is wrong since the partition is not specified


upvoted 1 times

  sheilawu Most Recent  8 months ago

A is right
for SCSI is going
/dev/sda(dev/hda1)
/dev/sdb(dev/hda2)
/dev/sdc(/dev/sdb1)
/dev/sdd(/dev/dfb2)
...
upvoted 1 times

  sheilawu 8 months ago


sorry for teh typo
/dev/sdc(/dev/hdb1)

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 68/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

/dev/sdd(/dev/hdb2)
upvoted 1 times

  Mchoeti 9 months, 3 weeks ago


It is A. Why?
Option B (grub-install /dev/sda1) is incorrect because it installs the boot loader to the first partition of the first disk, which is not where the boot
loader should be installed.
upvoted 2 times

  rmmichael95 6 months ago


The question literally asks it to be installed to the first partition on the first disk...
upvoted 1 times

  Adam_H 12 months ago

Selected Answer: A

I believe the correct answer is A: grub-install /dev/sda

"run grub-install, pointing it to the boot DEVICE (NOT the partition) and the directory where the boot partition is mounted."
source: LPIC -1 (101) Version 5.0 Learning Materials, Page 71
upvoted 2 times

  JGB869 1 year ago


This is what GPT-3 tells me. For example, to install the GRUB boot files and boot loader into the first partition of the first disk, you might use a
command like this:

sudo grub-install /dev/sda1


upvoted 1 times

  Freelancer 1 year, 3 months ago

Selected Answer: B

its explained here: https://wiki.centos.org/HowTos/GrubInstallation#Installing_Grub_using_grub-install


upvoted 2 times

  oladin 1 year, 4 months ago


i think the answer is correct. Check LPIC 101-500 material page 71
upvoted 2 times

  Wellison 1 year, 5 months ago


A resposta correta é B grub-install /dev/sda1 Instale os arquivos Grub no diretório /boot/grub da partição atual. Instale o carregador de
inicialização na primeira partição do primeiro disco rígido.
https://wiki.centos.org/HowTos/GrubInstallation#Installing_Grub_using_grub-install
upvoted 1 times

  KiddyLitty 1 year, 9 months ago


Grub can be installed to the "Device" only (not partition)
upvoted 2 times

  MaikyCR28 1 year, 10 months ago


This is a "tricky" question because it's asking about the grub installation and also It refers to the first partition, which all we know it's /dev/sda1,
but the main idea of the question is about where the grub will be installed and it's focused on this last. So, starting from this point, grub only can
be installed by referring to a device and not to a partition. In fact, on page 78 of the LPIC-1 book, it says: "To install GRUB Legacy on a disk from
a running system we will use the grub-install utility. The
basic command is grub-install DEVICE where DEVICE is the disk where you wish to install GRUB Legacy. An example would be /dev/sda." In
conclusion, the right answer is A.
upvoted 7 times

  wvdw1962 1 year, 12 months ago


I think the corrext answer is A:
The usage is basically very simple. You only need to specify one argument to the program, namely, where to install the boot loader. The
argument has to be either a device file (like ‘/dev/hda’). For example, under Linux the following will install GRUB into the MBR of the first IDE
disk:
# grub-install /dev/sda
https://www.gnu.org/software/grub/manual/grub/html_node/Installing-GRUB-using-grub_002dinstall.html
upvoted 2 times

  Wucrib 2 years, 11 months ago


GRUB is installed to a device not a location so answer is A
upvoted 8 times

  MashkoorQadir 3 years ago


the answer is B it's asking about the first partition of first disk.
upvoted 6 times

  rjlg2centos8 3 years, 2 months ago


Could you explain better the answer please, thank you.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 69/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 70/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #65 Topic 1

Which of the following files are found in the /boot/ file system? (Choose two.)

A. Linux kernel images

B. Bash shell binaries

C. systemd target and service units

D. Initial ramdisk images

E. fsck binaries

Correct Answer: AC

Community vote distribution


AD (100%)

  3glag Highly Voted  3 years, 9 months ago

A and D is correct
upvoted 31 times

  [Removed] Highly Voted  3 years, 5 months ago


A and D are correct
upvoted 9 times

  peppiniello Most Recent  2 months, 1 week ago

Selected Answer: AD

A & D are correct


upvoted 1 times

  Gigias 5 months, 1 week ago


Selected Answer: AD

A and D is correct
upvoted 1 times

  Oyins2024 6 months ago


Answer on page 72-LPI -Learning Material
upvoted 1 times

  b3579f6 6 months, 1 week ago

Selected Answer: AD

A and D
upvoted 1 times

  Adam_H 12 months ago


Selected Answer: AD

The correct answer should be A & D.

"Since the boot partition only stores the files needed by the bootloader, the initial RAM disk and kernel images, it can be quite small by today’s
standards."
source - "LPI Learning Materials: LPIC-1 (101)" Version 5.0, page 57
upvoted 1 times

  blk_542 1 year, 1 month ago


AD, not just because saw it correct in another guide, but because just by ls -la /boot you can see it and play around with those contents, I do it
almost everyday in my job.
upvoted 1 times

  Lazylinux 1 year, 8 months ago

Selected Answer: AD

AD for sure just execute the following command on centos - ls -al /boot
upvoted 3 times

  ExapIakoam 1 year, 10 months ago


A and D are correct
upvoted 2 times

  GHOST3 1 year, 11 months ago

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 71/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Selected Answer: AD

A and D are correct


upvoted 2 times

  k3n_ 1 year, 11 months ago


Selected Answer: AD

You can find ramdisk and linux kernel files at boot partition.
upvoted 1 times

  serlan 2 years ago


A and D is correct
upvoted 1 times

  anhcq 2 years, 1 month ago


Selected Answer: AD

/boot contains files used to boot the OS right after the boot loader call them
upvoted 1 times

  dragonsoull 2 years, 5 months ago


I also think A and D are correct.
upvoted 2 times

  iwkno6 2 years, 5 months ago


I believe A & D are correct (not C)
upvoted 3 times

  CuriousLinuxCat 2 years, 7 months ago


Can't see how E, C and B would be inside the /boot directory.
I think A and D is correct since they relate to the booting itself.

B: Why would Bash be in here if it's not related to booting? It should be of a later concern after booting.

C: systemd should come after booting, not before.

E: fsck binaries should come after booting, doesn't belong in /boot.


upvoted 2 times

  SScott 2 years, 1 month ago


That's right, A & D
In CentOS 7, /boot/ contains initial ramdisk images, vmlinux kernel image files, rescue kernel, efi, grub, and grub2 directories

The kernel starts systemd


systemd reads the system target from /etc/systemd
https://www.thegeekdiary.com/centos-rhel-7-booting-
process/#:~:text=Reads%20file%20linked%20by%20/etc/systemd/system/default.target

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-
verifying_the_initial_ram_disk_image#:~:text=Procedure%C2%A030.1.%C2%A0-,Verifying%20the%20Initial%20RAM%20Disk%20Image,-
As%20root%2C%20list

fsck comes after systemd in the boot process before this program is called /usr/lib/systemd
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 72/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #66 Topic 1

Which file defines the network locations from where the Debian package manager downloads software packages?

A. /etc/dpkg/dpkg.cfg

B. /etc/apt/apt.conf.d

C. /etc/apt/apt.conf

D. /etc/dpkg/dselect.cfg

E. /etc/apt/sources.list

Correct Answer: E

Community vote distribution


E (100%)

  Amycert 11 months, 1 week ago

Selected Answer: E

/etc/apt/sources.list
upvoted 2 times

  SScott 2 years, 1 month ago


Yeah E
https://dev.to/bijaykumarpun/what-s-inside-etc-apt-sources-list-2h1k
upvoted 2 times

Question #67 Topic 1

When removing a package on a system using dpkg package management, which dpkg option ensures configuration files are removed as well?

A. --clean

B. --purge

C. --vacuum

D. --remove

E. --declare

Correct Answer: B

Community vote distribution


B (100%)

  CuriousLinuxCat Highly Voted  2 years, 5 months ago

Correct.
-r will remove package but keep config files.
-p --purge will remove all including config files.
upvoted 5 times

  Amycert Most Recent  11 months, 1 week ago

Selected Answer: B

purge.
very easy
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 73/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #68 Topic 1

Which of the following statements are correct when comparing Linux containers with traditional virtual machines (e.g. LXC vs. KVM)? (Choose

three.)

A. Containers are a lightweight virtualization method where the kernel controls process isolation and resource management.

B. Fully virtualized machines can run any operating system for a specific hardware architecture within the virtual machine.

C. Containers are completely decoupled from the host system's physical hardware and can only use emulated virtual hardware devices.

D. The guest environment for fully virtualized machines is created by a hypervisor which provides virtual and emulated hardware devices.

E. Containers on the same host can use different operating systems, as the container hypervisor creates separate kernel execution.

Correct Answer: ABD

Community vote distribution


ABD (100%)

  NeoSam999 11 months, 4 weeks ago

Selected Answer: ABD

Correct Answer: ABD


upvoted 1 times

  Lazylinux 1 year, 8 months ago


Selected Answer: ABD

ABD is correct
upvoted 2 times

  CuriousLinuxCat 2 years, 7 months ago


I remember that if you are running an Window OS in your host, you are only able to run "flavors" of Windows OS (things that are based on
Windows OS).

Another example is if you run your host OS on Ubuntu, then you will be able to run RHEL and CentOS in your containers but not Window OS.

Apologies if I am incorrect but that is what my hypothesis is.


upvoted 2 times

  macchi 2 years, 10 months ago


E is not correct ?
upvoted 2 times

  KicoRox 2 years, 2 months ago


E is not correct because containers do not use hypervisors.
upvoted 3 times

  SScott 2 years, 1 month ago


A, B, and D are right.

C is traditional KVM
With E, yes if hypervisor was replaced with container namespace and the same kernel execution were referenced, then this would be
accurate. So choice E is wrong. However, LXC does focus on OS containerization and the goal is to not need a separate kernel.
https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html
upvoted 1 times

  SScott 2 years, 1 month ago


https://www.redhat.com/sysadmin/exploring-containers-lxc
https://www.section.io/engineering-education/lxc-vs-docker-what-is-the-difference-and-why-docker-is-better/
upvoted 1 times

  McLaba 2 years, 8 months ago


we can't speak about O.S. in a container enviroment
upvoted 3 times

  iwkno6 2 years, 5 months ago


As McLaba said!
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 74/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #69 Topic 1

The installation of a local Debian package failed due to unsatisfied dependencies. Which of the following commands installs missing

dependencies and completes the interrupted package installation?

A. dpkg --fix --all

B. apt-get autoinstall

C. dpkg-reconfigure --all

D. apt-get all

E. apt-get install -f

Correct Answer: E

Community vote distribution


E (100%)

  spicemines Highly Voted  2 years, 3 months ago


man apt-get: -f, --fix-broken - Fix; attempt to correct a system with broken dependencies in place.
upvoted 7 times

  Amycert Most Recent  11 months, 1 week ago

Selected Answer: E

E. apt-get install -f
upvoted 1 times

  blk_542 1 year, 1 month ago


E is correct:
"Fix it with apt-get install -f which will attempt to install the missing dependencies."
upvoted 2 times

  ebo07 2 years ago


Right. E is correct
upvoted 1 times

Question #70 Topic 1

Which of the following commands lists all currently installed packages when using RPM package management?

A. yum --query --all

B. yum --list --installed

C. rpm --query --list

D. rpm --list --installed

E. rpm --query --all

Correct Answer: E

  blk_542 1 year, 1 month ago


yes, long verion of rpm -qa
upvoted 1 times

  Jeyaraj 1 year, 2 months ago


ans: E
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 75/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #71 Topic 1

Which of the following commands are valid in the GRUB 2 configuration file? (Choose two.)

A. menuentry

B. uefi

C. pxe-ifconfig

D. insmod

E. kpartx

Correct Answer: AD

Community vote distribution


AD (100%)

  fabinnerself Highly Voted  2 years, 2 months ago


I find this
menuentry:
dir: https://help.ubuntu.com/community/Grub2/Setup
"From the GRUB 2 menu at boot, the user can also determine which Ubuntu is controlling the boot on a multi-OS system. By default, the first
menuentry always lists an option from the installation which is in charge of GRUB 2. For example, if the first menuentry contains "on sda5, then
the GRUB installed on sda5 OS is controlling the menu/boot."

insmod:
dir: https://www.gnu.org/software/grub/manual/grub/grub.html#insmod

<<Then write a grub.cfg (/mnt/boot/grub/grub.cfg):

menuentry "OS using grub2" {


insmod xfs
search --set=root --label OS1 --hint hd0,msdos8
configfile /boot/grub/grub.cfg
}">>
So A and D are OK
upvoted 6 times

  SScott 2 years, 1 month ago


Yes good links and comments.
grep -E 'insmod|menuentry' /boot/grub/grub.cfg and also /boot/grub2/grub.cfg confirms A & D.
uefi is referenced but is a rem statement not a command

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-
working_with_the_grub_2_boot_loader

https://help.ubuntu.com/community/Grub2/Installing#:~:text=The%20GRUB%202%20menu%20is%20built%20by%20information%20containe
d%20in%20/boot/grub/grub.cfg

pxe-ifconfig is invalid

kpartx is related but not specifically in the grub2 config file


https://linux.die.net/man/8/kpartx
https://peter-low-level-programming.blogspot.com/2012/10/install-grub2-in-disk-image.html
upvoted 1 times

  Amycert Most Recent  11 months, 1 week ago

Selected Answer: AD

A. menuentry
D. insmod
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 76/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #72 Topic 1

What is the purpose of the ldd command?

A. It lists which shared libraries a binary needs to run.

B. It installs and updates installed shared libraries.

C. It turns a dynamically linked binary into a static binary.

D. It defines which version of a library should be used by default.

E. It runs a binary with an alternate library search path.

Correct Answer: A

Community vote distribution


A (100%)

  spicemines Highly Voted  2 years, 3 months ago


man ldd: ldd prints the shared libraries required by each program or shared library specified on the command line.
upvoted 8 times

  Amycert Most Recent  11 months, 1 week ago

Selected Answer: A

A. It lists which shared libraries a binary needs to run.


upvoted 1 times

  ebo07 2 years ago


Right. A
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 77/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #73 Topic 1

What can the Logical Volume Manager (LVM) be used for? (Choose three.)

A. To create snapshots.

B. To dynamically change the size of logical volumes.

C. To dynamically create or delete logical volumes.

D. To create RAID 9 arrays.

E. To encrypt logical volumes.

Correct Answer: ABC

Community vote distribution


ABC (100%)

  syrius82 4 months ago


According to chatgpt:

Snapshot Creation: LVM supports the creation of read-only or read-write snapshots of logical volumes. Snapshots are useful for data backup,
testing, and other purposes (A)

Dynamic Volume Management: LVM allows you to create, resize, and manage logical volumes without the need to repartition your hard drives.
This makes it easier to adapt your storage configuration as your needs change (B)

Encryption: LVM can be used in conjunction with encryption technologies to create encrypted logical volumes for enhanced data security (E)

Looks like A,B,E right choices for this question. C should be false since you can only create, resize and manage logical volumes. D is false since
data striping or mirroring does not concern with raid 9 type.
upvoted 1 times

  Amycert 11 months, 1 week ago

Selected Answer: ABC

A, B and C are correct


upvoted 1 times

  Deef14 2 years, 3 months ago


It's correct
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 78/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #74 Topic 1

What are the main differences between GPT and MBR partition tables regarding maximum number and size of partitions? (Choose two.)

A. MBR can handle partition sizes up to 4 TB, whereas GPT supports partition sizes up to 128 ZB.

B. By default, GPT can manage up to 128 partitions while MBR only supports four primary partitions.

C. By default, GPT can manage up to 64 partitions while MBR only supports 16 primary partitions.

D. MBR can handle partition sizes up to 2.2 TB, whereas GPT supports sizes up to 9.4 ZB.

E. Both GPT and MBR support up to four primary partitions, each with up to 4096 TB.

Correct Answer: BD

Community vote distribution


BD (100%)

  Amycert 11 months, 1 week ago

Selected Answer: BD

B and D are correct


upvoted 1 times

  dspaula 2 years, 2 months ago


Correct
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 79/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #75 Topic 1

A backup software heavily uses hard links between files which have not been changed in between two backup runs. Which benefits are

realized due to these hard links? (Choose two.)

A. The old backups can be moved to slow backup media, such as tapes, while still serving as hard link target in new backups.

B. The backup runs faster because hard links are asynchronous operations, postponing the copy operation to a later point in time.

C. The backup is guaranteed to be uncharged because a hard linked file cannot be modified after its creation.

D. The backup consumes less space because the hard links point to the same data on disk instead of storing redundant copies.

E. The backup runs faster because, instead of copying the data of each file, hard links only change file system meta data.

Correct Answer: AD

Community vote distribution


DE (100%)

  Zeist Highly Voted  3 years, 5 months ago

I think the right answer here is D and E


upvoted 23 times

  daca11 Highly Voted  3 years, 1 month ago


A is wrong. A hard link can't reference a file in a different file system.
upvoted 20 times

  peppiniello Most Recent  2 months, 1 week ago

Selected Answer: DE

not A , cause hardlink cannot reside in different filesystems


upvoted 1 times

  Jack67 7 months ago


Selected Answer: DE

A is wrong, the correct answers are D & E


upvoted 1 times

  Amycert 11 months, 1 week ago

Selected Answer: DE

D and E definitely.
upvoted 1 times

  NeoSam999 11 months, 4 weeks ago

Selected Answer: DE

Other options are not correct.


upvoted 1 times

  JGB869 1 year ago


I typet the question in GPT-3 and the answer is D and E
upvoted 1 times

  blk_542 1 year, 1 month ago

Selected Answer: DE

A is a lie: hardlinks cannot reside in different filesystems


B: I don't know
C: lie: a hardlink can be modified as long as the inode number is same as the "original file", (which is really the original index entry to the data)
upvoted 1 times

  Lazylinux 1 year, 9 months ago

Selected Answer: DE

is Correct
upvoted 1 times

  anhcq 2 years, 1 month ago


Selected Answer: DE

A, B and C are wrong about hard link


upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 80/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

  CuriousLinuxCat 2 years, 5 months ago


I believe D and E is correct.
A tape has a completely different filesystem to Linux so it would be wrong.
upvoted 7 times

  Bodescu 2 years, 7 months ago


As said, D&E get the point :)
upvoted 2 times

  Wucrib 2 years, 11 months ago


Answer A and D is correct
upvoted 3 times

  Lazylinux 1 year, 9 months ago


U obviously have no understanding of hard links, A would be correct if was soft-symbolic links..Hardlinks cannot cross different FS
upvoted 1 times

  ilputto 3 years, 2 months ago


I think so , D and E are the correct answers.
upvoted 6 times

  Erwinator 3 years, 4 months ago


D an E, agreed
upvoted 5 times

  Vano1 3 years, 5 months ago


D and E are correct
upvoted 5 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 81/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #76 Topic 1

FILL BLANK -

Which file from the /proc/ file system contains a list of all currently mounted devices? (Specify the full name of the file, including path.)

Correct Answer: /proc/mounts

  ismael_1_ Highly Voted  3 years, 3 months ago


correct its proc/self/mounts
upvoted 11 times

  CuriousLinuxCat Highly Voted  2 years, 5 months ago


proc/self/mounts
/proc/mounts

are both correct!


upvoted 8 times

  AdamCzepiel Most Recent  1 year, 2 months ago

both are correct, at least at ubuntu os


/proc/mounts
/proc/self/mounts
(tested)
upvoted 1 times

  Lazylinux 1 year, 8 months ago


agree with /proc/self/mounts
upvoted 1 times

  jomalpic 2 years, 11 months ago


perhaps both answers /proc/mounts ans /proc/self/mounts are correct
upvoted 4 times

  t33h9ck 2 years, 11 months ago


True the correct answer is /proc/self/mounts since /proc/mounts is a symbolic link
upvoted 3 times

  rjlg2centos8 3 years, 2 months ago


/proc/mounts is a symbolic link to /proc/self/mounts
upvoted 5 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 82/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #77 Topic 1

How many fields are in a syntactically correct line of /etc/fstab?

A. 3

B. 4

C. 5

D. 6

E. 7

Correct Answer: D

  McLaba Highly Voted  2 years, 9 months ago

<FILE SYSTEM> <MOUNT POINT> <TYPE> <OPTION> <DUMP> <PASS>


upvoted 15 times

  CuriousLinuxCat Highly Voted  2 years, 5 months ago


https://help.ubuntu.com/community/Fstab

According to the ubuntu help...


<device> / <mount point> / <file system type> / <options> / <dump> / <pass num>

Device - Device / partition that contains a file system.

Mount point - The point where it can access the device / partition (the /)

File system type - eg. ntfs, ext4,3,2, vfat

Options - rg. dmask=027, fmask=137 (Cause umask=000 would make everything executable)

Dump - Enable / disable backup of the device (Default is 0)

Pass num - Order of whick fsck will check the device/partition (Root should be 1, other partitions should be 2.)
upvoted 5 times

  CEF Most Recent  2 years, 8 months ago


Is correct
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 83/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #78 Topic 1

Running chmod 640 filea.txt as a regular user doesn't update filea.txt's permission. What might be a reason why chmod cannot modify the

permissions? (Choose two.)

A. filea.txt is owned by another user and a regular user cannot change the permissions of another user's file.

B. filea.txt is a symbolic link whose permissions are a fixed value which cannot be charged.

C. filea.txt has the sticky bit set and a regular user cannot remove this permission.

D. filea.txt is a hard link whose permissions are inherited from the target and cannot be set directly.

E. filea.txt has the SetUID bit set which imposes the restriction that only the root user can make changes to the file.

Correct Answer: AB

Community vote distribution


AB (88%) 13%

  MIU Highly Voted  3 years, 1 month ago

filea.txt is a symbolic link whose permissions are a fixed value which cannot be cha"N"ged.
upvoted 7 times

  KiddyLitty Most Recent  1 year, 9 months ago

Selected Answer: AB

A, B is correct bcos you cannot change permission of softlink/symbolic link.


upvoted 1 times

  Lazylinux 1 year, 9 months ago

Selected Answer: AB

Is correct answer
upvoted 1 times

  Sloop93 1 year, 9 months ago


Selected Answer: AB

are correct
upvoted 1 times

  toni23 1 year, 11 months ago

Selected Answer: AB

you can change the permissions on a hard link file without issues due it will be change the permissions in the original source too. You cannot
change the permissions on symbolic inks due all is under 777
upvoted 4 times

  minhng99 2 years ago


Selected Answer: AD

Wait, isn't D is more correct? A hardlink permission is inherited and cannot be changed by anyone else but root/owner
upvoted 1 times

  Robert12 2 years, 9 months ago


A Sticky bit is a permission bit that is set on a file or a directory that lets only the owner of
the file/directory or the root user to delete or rename the file. No other user is given
privileges to delete the file created by some other user.
upvoted 3 times

  McLaba 2 years, 9 months ago


Sticky bit is just for directories
upvoted 6 times

  Robert12 2 years, 9 months ago


Permissions on all hard links to the same data on disk are always identical. The same applies to attributes.
That means if you change the permissions/owner/attributes on one hard link, you will immediately see the changes
on all other hard links.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 84/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #79 Topic 1

Which of the following Linux filesystems preallocate a fixed number of inodes when creating a new filesystem instead of generating them as

needed? (Choose two.)

A. JFS

B. ext3

C. XFS

D. ext2

E. procfs

Correct Answer: BD

Community vote distribution


BD (100%)

  Reseko 4 months, 1 week ago

Selected Answer: BD

JFS Inode Dynamic


ext3 Inode Static
XFS Inode Dynamic
ext2 Inode Static
procfs N/A (Virtual System)
upvoted 1 times

  blk_542 1 year, 1 month ago


Look like B and D, since it is true for ext2, and ext3 is just an ext2 with a journal. Regarding ext2:
http://www.science.unitn.it/~fiorella/guidelinux/tlk/node101.html
upvoted 3 times

  wais 2 years ago


I think B and C are correct!!
upvoted 1 times

  clavex 1 year, 12 months ago


XFS dynamically allocates inodes.
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 85/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #80 Topic 1

Which of the following commands sets the SetUID permission on the executable /bin/foo?

A. chmod 4755 /bin/foo

B. chmod 1755 /bin/foo

C. chmod u-s /bin/foo

D. chmod 755+s /bin/foo

E. chmod 2755 /bin/foo

Correct Answer: A

Community vote distribution


A (100%)

  Lazylinux Highly Voted  1 year, 8 months ago

Selected Answer: A

For the special permissions, you prepend these numbers with another number
where 4 is setuid, 2 is setgid, and 1 is the sticky bit
upvoted 8 times

  NeoSam999 Most Recent  11 months, 4 weeks ago

Selected Answer: A

Correct Answer: A
upvoted 1 times

  NeoSam999 11 months, 4 weeks ago


To set SUID:
~$ chmod 4755 test-SetUID
~$ ls -l test-SetUID
-rwsr-xr-x 1 neo neo 0 jul 1 19:37 test-SetUID

To remove it:
~$ chmod 0755 test-SetUID
~$ ls -l test-SetUID
-rwxr-xr-x 1 neo neo 0 jul 1 19:20 test-SetUID
upvoted 2 times

  georgerobel 3 years ago


Correct answer is A.
upvoted 4 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 86/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #81 Topic 1

Which of the following commands can be used to display the inode number of a given file? (Choose two.)

A. inode

B. ln

C. ls

D. cp

E. stat

Correct Answer: CE

Community vote distribution


CE (100%)

  Guillem Highly Voted  2 years, 8 months ago

correct. ls -i & stat


upvoted 6 times

  CuriousLinuxCat 2 years, 5 months ago


Agreed.
upvoted 3 times

  Jack67 Most Recent  7 months, 3 weeks ago

Selected Answer: CE

ls -i ist correct
upvoted 1 times

  Lazylinux 1 year, 8 months ago


Selected Answer: CE

ls -i filename and stat filename


upvoted 1 times

  TedM 1 year, 8 months ago

Selected Answer: CE

Affirmative CE
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 87/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #82 Topic 1

Which of the following settings for umask ensures that new files have the default permissions -rw-r-----?

A. 0017

B. 0640

C. 0038

D. 0227

E. 0027

Correct Answer: E

Community vote distribution


E (100%)

  dlus Highly Voted  3 years, 6 months ago


umask 027: dirs 750, files 640
upvoted 8 times

  NeoSam999 Most Recent  11 months, 4 weeks ago

Selected Answer: E

Default permissions:
777 = default permissions for directories
666 = default for files

Default umask: 0002


To change umask:
~$ umask 027
~$ umask
0027
To check new files have the default permissions -rw-r-----
~$ touch umask-test
~$ ls -l umask-test
-rw-r----- 1 neo neo 0 Jan 1 18:01 umask-test
Easy explanation:
r=4
w=2
x=1
Files with default 002: 666 - 022 = 644
Files with default 027: 666 - 027 = 644
0 = user / 2 = Group / 7 = Others
Files: 666 - 027 = 640 = -rw-r-----
upvoted 2 times

  NeoSam999 11 months, 4 weeks ago


Correction: Files with default 027: 666 - 027 = 640
upvoted 2 times

  blk_542 1 year, 1 month ago


0027:
Initial 0: ignored
second 0: rw for files (rwx for directories)
2: r for files (rx for directories)
7: nothing (for both files and directories)
upvoted 2 times

  CuriousLinuxCat 2 years, 6 months ago


Closest I can get it to is 026.
upvoted 2 times

  amwangi 2 years, 7 months ago


this answer is available coz its 0026
upvoted 1 times

  Jcob 2 years, 10 months ago


Hang on but why it isnt 0137?
I though since chmod RW-R---- is 640
I would guess it would be when eliminating the numbers
0/7/7/7

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 88/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

-0/6/4/0
0/1/3/7
can someone explain please?
upvoted 2 times

  K1lroy 2 years, 10 months ago


I believe it is because files are by default rw- without x. So you don't need to take the 1 away
upvoted 2 times

  mentor84 3 years, 8 months ago


Why not 0026? isn't these files with starting permissions of 666?
upvoted 4 times

  jobwongdavila 3 years, 6 months ago


that's not a valid value for umask since it applies for directories as well
upvoted 3 times

Question #83 Topic 1

After a power outage, the XFS file system of /dev/sda3 is inconsistent. How can the existing file system errors be fixed?

A. By using mount -f to force a mount of the file system

B. By running xfsck on the file system

C. By mounting the file system with the option xfs_repair

D. By running xfsadmin repair on the file system

E. By running xfs_repair on the file system

Correct Answer: E

Community vote distribution


E (100%)

  Reseko 4 months, 1 week ago


Selected Answer: E

Tested on my system and working: E = xfs_repair /dev/sda3


upvoted 1 times

  ellen_AA 2 years, 5 months ago


xfs_repair /dev/sda3 command not found! anyone could confirm.
upvoted 2 times

  ant_man 2 years, 3 months ago


xfs_repair: Repair a corrupted or damaged XFS file system. Unmount the file system before running this command. If the file system cannot be
repaired, restore files from a backup with xfsrestore
upvoted 4 times

  Reseko 4 months, 1 week ago


You need to install the utilities to manage XFS file systems. In Debian/Ubuntu, for example, the package is called xfsprogs.
upvoted 1 times

  toflipv6 2 years, 5 months ago


command is available on >centos 7.1
upvoted 4 times

  ant_man 2 years, 2 months ago


Ubuntu:
xfs_repair repairs corrupt or damaged XFS filesystems (see xfs(5)).
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 89/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #84 Topic 1

Which of the following properties of an existing file changes when a hard link pointing to that file is created?

A. File size

B. Link count

C. Modify timestamp

D. Inode number

E. Permissions

Correct Answer: B

Community vote distribution


B (100%)

  tzahi Highly Voted  1 year, 9 months ago

Selected Answer: B

B. Link count
Is correct
Also this does not apply to *soft* links , as they will not increase link count
upvoted 5 times

  Reseko Most Recent  4 months, 1 week ago

Selected Answer: B

Correct answer: B

Example:
ln zip_3.0-13_amd64.deb zip_3_hardlink.deb
ls -li

1465354 -rw-r--r-- 2 calvarez calvarez 229532 feb 19 2023 zip_3.0-13_amd64.deb


1465354 -rw-r--r-- 2 calvarez calvarez 229532 feb 19 2023 zip_3_hardlink.deb
upvoted 1 times

  Guillem 2 years, 8 months ago


Correct. https://www.theunixschool.com/2012/10/link-count-file-vs-directory.html
upvoted 4 times

  halq 2 years, 4 months ago


tks you for your info!
upvoted 3 times

  CuriousLinuxCat 2 years, 5 months ago


Agreed!
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 90/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #85 Topic 1

FILL BLANK -

Following the Filesystem Hierarchy Standard (FHS), where should binaries that have been compiled by the system administrator be placed in

order to be made available to all users on the system? (Specify the full path to the directory.)

Correct Answer: /usr/local/bin/

  Bodescu Highly Voted  2 years, 7 months ago


For you to know. According to FHS:

/bin contains executables needed to up or repair the system, monouser mode.

/usr/bin contains executables for users to use. Most of non booting programs, intended for normal users, should be placed here.

/sbin/ contains boot binaries, and other executables tipically not used for nnormal users.

/usr/local/bin usually contains non system, third party locally compiled binaries. Default location for user binaries.

/usr/local/sbin contains non system binaries for root only.

https://eslinux.com/foro/1542/diferencia-sbin-bin/ (SPA)
upvoted 21 times

  Mchoeti 10 months ago


this is the one and only answer !!!
upvoted 1 times

  Matt22 2 years, 3 months ago


absolute legend thnx
upvoted 4 times

  Mchoeti Most Recent  10 months ago

nice nice nicer than nice


upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 91/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #86 Topic 1

Which of the following commands show how the shell handles a specific command?

A. where

B. type

C. stat

D. case

E. fileinfo

Correct Answer: B

  CuriousLinuxCat 2 years, 5 months ago


Massively agree that it is B.
upvoted 4 times

  Guillem 2 years, 8 months ago


Correct.

https://www.howtogeek.com/426014/how-to-use-the-linux-type-command/
upvoted 4 times

  Ladoxew 2 years, 10 months ago


Type tells you whether a command is a shell built-in, aliased to another command, or the location of the program in the PATH
upvoted 3 times

Question #87 Topic 1

When in Normal mode in vi, which character can be used to begin a reverse search of the text?

A. r

B. /

C. F

D. ?

E. s

Correct Answer: D

Community vote distribution


D (100%)

  iwkno6 Highly Voted  2 years, 5 months ago


/ for forward search
? for backward search.
D is correct
upvoted 9 times

  Amycert Most Recent  11 months, 1 week ago

Selected Answer: D

D. ?
correct
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 92/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #88 Topic 1

Which of the following commands displays the manual page command from section 1?

A. man command(1)

B. man command@1

C. man 1 command

D. man 1.command

E. man -s 1 command

Correct Answer: C

  Jcob Highly Voted  2 years, 10 months ago


C and E a both correct , tested on Linux Mint
upvoted 6 times

  Jack67 Most Recent  8 months, 1 week ago


C & E are both correct, tested today in CentOS 7
upvoted 1 times

  blk_542 1 year, 1 month ago


C and E correct, tested in CentOS 7
upvoted 2 times

  Wellison 1 year, 4 months ago


C e E ambos corretos, testados no Linux
upvoted 2 times

  cesarvasquez 2 years, 2 months ago


C y E are correct,tested!!!
upvoted 2 times

  daca11 3 years, 1 month ago


E is correct too
upvoted 1 times

  rjlg2centos8 3 years, 2 months ago


But c is correct too, no?
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 93/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #89 Topic 1

Which of the following commands creates or, in case it already exists, overwrites a file called data with the output of ls?

A. ls 3> data

B. ls >& data

C. ls > data

D. ls >> data

E. ls >>> data

Correct Answer: C

Community vote distribution


C (100%)

  Amycert 11 months, 1 week ago

Selected Answer: C

C
very easy and basic
upvoted 2 times

  blk_542 1 year, 1 month ago


Both C and B are correct, tested all options in CentOS. but I agree the only answer recognized as correct (for some reason) will be C.
upvoted 2 times

  amadeu 1 year, 11 months ago


Line C is the correct answer.
upvoted 2 times

  CuriousLinuxCat 2 years, 5 months ago


Correct.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 94/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #90 Topic 1

Which of the following commands is used to change options and positional parameters within a running Bash shell?

A. history

B. setsh

C. bashconf

D. set

E. envsetup

Correct Answer: D

Community vote distribution


D (100%)

  Amycert 11 months, 1 week ago

Selected Answer: D

set
very basic
upvoted 2 times

  blk_542 1 year, 1 month ago


True: https://phoenixnap.com/kb/linux-set
upvoted 1 times

  Lucaaa 3 years ago


why "set"??
upvoted 2 times

  richta 2 years, 11 months ago


The set command is a built-in function of the Bourne shell (sh), C shell (csh), and Korn shell (ksh), which is used to define and determine the
values of the system environment.
The option B and C are not a commands, and the option A and E are used for other things
upvoted 15 times

  iwkno6 2 years, 5 months ago


Agreed!
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 95/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #91 Topic 1

Which of the following commands display the IDs of all processes owned by root? (Choose two.)

A. pgrep -c root

B. pgrep -u root

C. pgrep -f root

D. pgrep -U 0

E. pgrep -c 0

Correct Answer: BD

Community vote distribution


BD (100%)

  linder Highly Voted  3 years, 8 months ago


I think it's B and D
upvoted 36 times

  cast7omadrid1 3 years, 8 months ago


You are right, I have tried it and it is correct.
upvoted 15 times

  wvdw1962 2 years ago


tried it on Fedora 35:
its B and D
upvoted 1 times

  mikebd Highly Voted  3 years, 6 months ago


There are a quite a few mistakes on this site :D
And however they have generated the questions needs a bit of work, things like - and "" are not handled correctly ....
upvoted 11 times

  Lollosbrollo Most Recent  1 year, 6 months ago

Selected Answer: BD

B and D
upvoted 3 times

  Lazylinux 1 year, 8 months ago

Selected Answer: BD

Tested all good


upvoted 1 times

  anhcq 2 years, 1 month ago


Selected Answer: BD

Tried, B and D are correct


upvoted 1 times

  iwkno6 2 years, 5 months ago


Agree with B & D
upvoted 2 times

  CuriousLinuxCat 2 years, 5 months ago


Correct Answer: BD

B is correct because it specifies user of 'root' with -u.


D is correct because it matches 'real user ID' with uid of 0 (which I assume is the default.)

What is the real user ID?


Who you really are (the person who owns the proess).
A unique number for a user in the system.

What is pgrep?
Look at running processes and lists the process ID to STDOUT.
For example:
pgrep -u root sshd
Will only list the process ID's that are owned by root (user).
https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 96/128
11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Example 2:
pgrep -u user -l
Will list the process ID and name used by 'user'.

-c count
-u user
-l list process name as will as process ID
upvoted 5 times

  Bodescu 2 years, 7 months ago


B&D get the point. Verified :)

(To whom is validating our comments... Please tell whoever may care, to do his/ her the f job and do correct the tests: Who wants to purchase
anything full of mistakes? TY xD )
upvoted 3 times

  penguinx64 2 years, 10 months ago


-U makes sense, but -f does not
-U, --uid uid,...
Only match processes whose real user ID is listed. Either the
numerical or symbolical value may be used.
-f, --full
The pattern is normally only matched against the process name.
When -f is set, the full command line is used.
upvoted 3 times

  Malvada 3 years, 1 month ago


Also checked this, its B & D
upvoted 5 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 97/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #92 Topic 1

Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose two.)

A. Ctrl XX

B. Ctrl :W

C. Esc zz

D. Esc :wq

E. Esc ZZ

Correct Answer: DE

Community vote distribution


DE (100%)

  Lazylinux 1 year, 8 months ago

Selected Answer: DE

Tested works
upvoted 2 times

  MartiFC 1 year, 11 months ago


Selected Answer: DE

THE ANSWER IS CORRECT!


upvoted 1 times

  iwkno6 2 years, 5 months ago


The answers are correct it's D & E.
upvoted 3 times

  CuriousLinuxCat 2 years, 7 months ago


Can confirm that D and E is correct.
upvoted 4 times

  McLaba 2 years, 9 months ago


D E is right !
upvoted 3 times

  rishard 3 years, 7 months ago


CTRL + ZZ - not Esc ZZ
upvoted 1 times

  cast7omadrid1 3 years, 7 months ago


https://www.cyberciti.biz/faq/save-file-in-vi-vim-linux-apple-macos-unix-bsd/
upvoted 2 times

  lanc 3 years, 7 months ago


just tested with the MAC vi editor.
ESC ZZ works.
upvoted 12 times

  rossricc 3 years, 7 months ago


Esc is intended to ensure you are in Vi Command Mode.
When you are in command mode you have to type ZZ (capital means actually SHIFT+zz) to save and exit. So the answer is correct Esc ZZ
upvoted 14 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 98/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #93 Topic 1

What is the effect of the -v option for the grep command?

A. It enables color to highlight matching parts.

B. It shows the command's version information.

C. It only outputs non-matching lines.

D. It changes the output order showing the last matching line first.

E. It outputs all lines and prefixes matching lines with a+.

Correct Answer: C

Community vote distribution


C (100%)

  QuangNH Highly Voted  2 years, 10 months ago


i think C is correct
upvoted 6 times

  Amycert Most Recent  11 months, 1 week ago

Selected Answer: C

C is the correct one


upvoted 1 times

  NeoSam999 12 months ago


According to man pages, man grep:
-v, --invert-match Invert the sense of matching, to select non-matching lines.
upvoted 2 times

  iwkno6 2 years, 5 months ago


correct!
upvoted 2 times

  CuriousLinuxCat 2 years, 5 months ago


-v reverses the matching so answer is correct.
upvoted 2 times

  Blondilu 3 years, 1 month ago


giusta
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 99/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #94 Topic 1

Which of the following tools can show the complete path of an executable file that the current shell would execute when starting a command

without specifying its complete path? (Choose two.)

A. find

B. pwd

C. which

D. locate

E. type

Correct Answer: CE

Community vote distribution


CD (80%) CE (20%)

  btomasz 5 months, 1 week ago

Selected Answer: CE

C and E is correct.
locate would also show other Files and excecutables outside the $PATH directories. So it does not match the requirements of the question.
upvoted 1 times

  Jack67 7 months, 4 weeks ago

Selected Answer: CD

C&E not D
upvoted 1 times

  Amycert 11 months, 1 week ago


Selected Answer: CD

C and D.
E is incorrect
upvoted 2 times

  shurik04 11 months ago


then justify your claim.
upvoted 1 times

  shurik04 1 year, 2 months ago


CE is correct
upvoted 4 times

  chikuwan 1 year, 4 months ago

Selected Answer: CD

which and locate


upvoted 1 times

  KiddyLitty 1 year, 9 months ago


locate command will show every possible items that contained *command*
It has default file globbing that needs regex control during searching.
upvoted 1 times

  rjlg2centos8 3 years, 2 months ago


Also locate command can show the full path of a executable, but if it says two all right, the other options are more correct.
upvoted 1 times

  ilputto 3 years, 2 months ago


yes, but locate needs the updatedb.
upvoted 1 times

  Quastor 2 years, 11 months ago


+ mlocate as it's not builtin hehe
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 100/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #95 Topic 1

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

A. SIGTERM

B. SIGCONT

C. SIGSTOP

D. SIGKILL

E. SIGINT

Correct Answer: C

Community vote distribution


C (100%)

  Amycert 11 months, 1 week ago

Selected Answer: C

ctrl+z is SIGSTOP
upvoted 1 times

  iwkno6 2 years, 5 months ago


An easy way to test this is to nano to a file and press ctrl+z, then you will see [stopped], hence it's SIGSTOP
upvoted 2 times

  CuriousLinuxCat 2 years, 5 months ago


Ctrl + Z is useful when you want to temporarily stop what you are doing in the text editor (like Vim) to go check on a file somewhere in your
hard drive on the same terminal.
upvoted 1 times

  OB_AK 3 years ago


Ctrl-Z sends SIGTSTP, a signal this causes the process to suspend execution. In this case, it is resumable - try executing a command that will take
a while and press Ctrl-Z; you'll see something in the lines of
[1]+ Stopped [your command].
Type fg in your Terminal and you'll see the process resuming, if it didn't end before resuming it.
upvoted 3 times

  daca11 3 years, 1 month ago


SIGTSTP is correct (which is not an answer here). https://stackoverflow.com/questions/11886812/what-is-the-difference-between-sigstop-and-
sigtstp
upvoted 2 times

  rjlg2centos8 3 years, 2 months ago


Anyone of these options are correct, when you press CTRL+Z the signal SIGTSTP is sent.
upvoted 3 times

  rjlg2centos8 3 years, 2 months ago


You can probe this by typing in the cmd:
#sleep 60
CTRL+Z
#echo $?
and you rest 128 to this number, and you obtain the number of the signal, and then
#kill -l
and you will see all signals
upvoted 1 times

  feuerphoenix 3 years, 4 months ago


E: SIGINT is correct

Some mistakes on this Site.


upvoted 1 times

  Erwinator 3 years, 4 months ago


ctrl+c is SIGINT
ctrl+z is SIGSTP
upvoted 8 times

  MirecMirec 1 year, 6 months ago


student shall learn for both signals

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 101/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

upvoted 2 times

  LKJ1230 3 years, 4 months ago


SIGINT means termination by interrupt
Ctrl + z means stop.
So C is right.
upvoted 7 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 102/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #96 Topic 1

What is the output when the regular expression s/[ABC] [abc]/xx/ is applied to the following string?

ABCabc -

A. ABxxbc

B. xxCxxc

C. xxxxxx

D. ABCabc

E. Axxaxx

Correct Answer: C

Community vote distribution


A (57%) D (43%)

  cast7omadrid1 Highly Voted  3 years, 10 months ago


The correct answer is A -> ABxxbc. You have to try it inside a file, open it with vim and do :s/[ABC] [abc]/xx/
upvoted 25 times

  sugisho Highly Voted  3 years, 2 months ago

[root@centos7 ~]# echo "ABCabc" | sed "s/[ABC] [abc]/xx/"


ABCabc
[root@centos7 ~]# echo "ABCabc" | sed "s/[ABC][abc]/xx/"
ABxxbc
upvoted 21 times

  Raafiik Most Recent  6 days, 8 hours ago

Selected Answer: D

The regular expression s/[ABC] [abc]/xx/ attempts to match a single character from the set [ABC] (i.e., A, B, or C), followed by a space, and then
another single character from the set [abc] (i.e., a, b, or c).

In the given string ABCabc, there is no occurrence where a space follows a character from the set [ABC]. Therefore, the regular expression doesn’t
find any matches within the string, resulting in no changes to the original string.

Hence, the output remains the same as the input string: ABCabc.
upvoted 1 times

  LNX_RM_Admin 7 months, 3 weeks ago

Selected Answer: A

i've tried on terminal: right answer is A) ABxxbc


upvoted 1 times

  ccpmad 9 months, 3 weeks ago


It's possible that you interpreted the regular expression as if it was being executed with single or double quotes, which could explain the
discrepancy in the answer. In a context where the regular expression is executed with single or double quotes, the answer "A. ABxxbc" could be
correct, as the regular expression "s/[ABC] [abc]/xx/" would look for an uppercase letter from "A" to "C", followed by a space, followed by a
lowercase letter from "a" to "c", and replace it with "xx". However, in a context where single or double quotes are not required to execute the
regular expression, the correct answer remains option "B. xxCxxc", as mentioned earlier. It's important to note that the execution of a regular
expression can depend on the context and the parameters used, and there may be multiple correct answers.
upvoted 1 times

  ccpmad 9 months, 3 weeks ago


in the question statement, it is not specified in what context the regular expression is being used, so it is assumed that it is used in a context
where single or double quotes are not required. Therefore, the correct answer remains option "B. xxCxxc", as it is the result of applying the
regular expression "s/[ABC] [abc]/xx/" to the string "ABCabc -"
upvoted 1 times

  DjBouz 10 months ago


The correct answer is A
upvoted 1 times

  totalchod 10 months, 1 week ago

Selected Answer: A

the answer is a
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 103/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

  Adam_H 12 months ago

Selected Answer: D

Running the command echo "ABCabc" | sed "s/[ABC] [abc]/xx/" in Ubuntu 20.04 returns the result "ABCabc", so the correct answer is D.
upvoted 1 times

  Adam_H 11 months, 4 weeks ago


I just passed the test today, and they do NOT have a space between [ABC][abc], so the correct answer is ABxxbc.
upvoted 4 times

  Adam_H 12 months ago


I just realized that the question does not have quotes around s/[ABC] [abc]/xx/ so it returns error "sed: -e expression #1, char 7: unterminated
`s' command", which means the question currently has an error.

Running the command without quotes or a space returns "ABxxbc", so I don't know which one is correct.
upvoted 1 times

  Iamrandom 1 year, 1 month ago


[root@centos7 ~]# echo "ABCabc" | sed s/[ABC][abc]/xx/ <--- no space, no quotes
ABxxbc
[root@centos7 ~]# echo "ABCabc" | sed s/[ABC] [abc]/xx/ <--- with space, no quotes
sed: -e expression #1, char 7: unterminated `s' command
[root@centos7 ~]# echo "ABCabc" | sed "s/[ABC] [abc]/xx/" <--- with space, with quotes
ABCabc

So either A or D depending if there's a typo or not.


upvoted 3 times

  TT924 1 year, 1 month ago


Selected Answer: A

A for sure
upvoted 1 times

  meer01 1 year, 2 months ago

Selected Answer: A

Used with sed, retuns A


upvoted 1 times

  Wellison 1 year, 4 months ago


Selected Answer: D

[root@centos7 ~]# echo "ABCabc" | sed "s/[ABC] [abc]/xx/"


resultado com espaço "s/[ABC] [abc]/xx/" D = ABCabc
upvoted 2 times

  Wellison 1 year, 4 months ago


[root@centos7 ~]# echo "ABCabc" | sed "s/[ABC][abc]/xx/"
resultado sem espaço "s/[ABC][abc]/xx/" A = ABxxbc
upvoted 1 times

  Lazylinux 1 year, 8 months ago

Selected Answer: A

Definitely A, Tested and as per below comment on how to test it


upvoted 1 times

  gonzaloco 1 year, 8 months ago


Selected Answer: A

A is correct
upvoted 1 times

  KiddyLitty 1 year, 9 months ago


s/[ABC] [abc]/xx/ (with a space) cannot run without single quote. In the question, there is no quote. Answer should be A.
upvoted 2 times

  MartiFC 1 year, 11 months ago

Selected Answer: A

FOR ME IS A
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 104/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #97 Topic 1

Which of the following commands print the current working directory when using a Bash shell? (Choose two.)

A. echo ‫ג‬€${PWD}‫ג‬€

B. echo ‫ג‬€${WD}‫ג‬€

C. printwd

D. pwd

E. echo ‫ג‬€${pwd}‫ג‬€

Correct Answer: AD

Community vote distribution


D (100%)

  catita3 10 months ago


echo ${PWD} works as well
upvoted 1 times

  Amycert 11 months, 1 week ago


Selected Answer: D

only pwd and echo $PWD would work.


but pwd is the only answer provided
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 105/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #98 Topic 1

Which of the following commands outputs test to the shell?

A. cat <!EOT test EOT

B. cat <|EOT test EOT

C. cat !<EOT test EOT

D. cat &<EOT test EOT

E. cat <<EOT test EOT

Correct Answer: E

Community vote distribution


E (100%)

  benjmcy Highly Voted  3 years, 7 months ago

the command is
cat << EOT
>test
>EOT
upvoted 19 times

  mvpVN 2 years, 10 months ago


bash 'heredoc' for research.
upvoted 2 times

  Roger95 Highly Voted  2 years, 1 month ago

Selected Answer: E

E is correct

#cat <<ENDofTEXT
>test
>ENDofTEXT
upvoted 5 times

  Lazylinux Most Recent  1 year, 9 months ago

Selected Answer: E

Tested for sure E, EOT can be anything i.e. Linux as long as it is typed last to end the text input
upvoted 1 times

  Vendo 3 years, 4 months ago


its just a kind of label. you can use any word in that place.
some popular usage are ftp, database processing etc.

Code:
ftp -inv $host << FTP ## start of label, below command will be treated as ftp command not the shell commans
user $user $passwd
bin
put $file
bye
FTP # end of ftp commands
ls ## shell commands again
https://www.unix.com/shell-programming-and-scripting/128056-command-eot.html
upvoted 2 times

  pablex_wolf 3 years, 7 months ago


None worked for me on Ubuntu. Anyone can explain why E would be correct? I prompts input when you run the string
upvoted 2 times

  Penguinofdarkness 1 year, 10 months ago


with
EOT [enter]
you start an input of text. you'll get a new line to type your text and can add lines by pressing enter. afterwards you close the input with
another EOT that will output the whole text in between those EOTs.
the cat << will put that output into your shell, like a print
upvoted 5 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 106/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #99 Topic 1

What is the default nice level when a process is started using the nice command?

A. -10

B. 0

C. 10

D. 15

E. 20

Correct Answer: B

Community vote distribution


C (100%)

  fightingfighter Highly Voted  3 years, 10 months ago


If you start a command with nice it'll be 10, if you start command without nice it'll be 0.
upvoted 36 times

  Mchoeti 9 months, 3 weeks ago


right you are right as mentioned before, https://linux.die.net/man/1/nice
upvoted 1 times

  iwkno6 2 years, 5 months ago


agreed!
upvoted 2 times

  3glag Highly Voted  3 years, 9 months ago

C is correct answer
upvoted 14 times

  Raafiik Most Recent  2 days, 5 hours ago

Selected Answer: C

The default "nice level", which is set for processes started using the nice command in Unix systems, is 10. This means that if you start a process
using the nice command without specifying the "nice" value, the process will receive a "nice" value set to 10.
upvoted 1 times

  peppiniello 2 months, 1 week ago


Selected Answer: C

command + nice =10


upvoted 2 times

  Reseko 4 months, 1 week ago

Selected Answer: C

niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process).

-n, --adjustment=N ==> add integer N to the niceness (default 10)


upvoted 1 times

  Jos015 6 months ago


I don't know, if we think about the test, I would say that the answer could be B - 0.
https://learning.lpi.org/en/learning-materials/101-500/103/103.6/103.6_01/
Process Niceness
Every normal process begins with a default nice value of 0 (priority 120).
upvoted 1 times

  Mchoeti 9 months, 3 weeks ago


Please check the man page it is 10 https://linux.die.net/man/1/nice
upvoted 1 times

  k3n_ 1 year ago

Selected Answer: C

Checked the man page.


upvoted 1 times

  k3n_ 1 year ago

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 107/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Acordding to man page, default is 10.


https://linux.die.net/man/1/nice
upvoted 1 times

  blk_542 1 year, 1 month ago


Also saw C as correct in another guide.
upvoted 1 times

  blk_542 1 year, 1 month ago


Selected Answer: C

C, a very easy way to test:


run a "top" (as root user) and see the own top niceness, as many processes it is 0.
then quit and run "nice top", will see the top niceness changed to 10
upvoted 3 times

  gonzaloco 1 year, 8 months ago


Selected Answer: C

C i think
upvoted 1 times

  Lazylinux 1 year, 9 months ago

Selected Answer: C

Tested and it is C - value of 10


upvoted 3 times

  alitosdavila 1 year, 10 months ago


Ans: C

$ nice sleep 200 &


[1] 13713

$ ps -l 13713
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
0 S 1000 13713 13655 0 90 10 - 864 hrtime pts/0 0:00 sleep 200
upvoted 1 times

  wvdw1962 2 years ago


according the LPIC-1 Study Guide (Breshnahan/Blum) chapt.2, page 120:
The default niceness level is zero.
Must be answer B
upvoted 2 times

  wvdw1962 1 year, 11 months ago


Sorry, wrong answer, did not read the question good enough :-(
Must be answer C:
If no value is provided, nice sets a priority of 10 by default.
upvoted 1 times

  anhcq 2 years, 1 month ago

Selected Answer: C

it's 10 if the command is started with nice


upvoted 2 times

  cesarvasquez 2 years, 2 months ago


The nice command, when run without arguments, will output the priority for the
currently logged-in user, which is normally 0. The renice command can be used to change
the priority of running processes. The other two commands shown as options for this
question do not exist
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 108/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #100 Topic 1

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remote that directory?

A. rmdir ~/\\dir

B. rmdir ‫ג‬€~/\dir‫ג‬€

C. rmdir ~/'dir'

D. rmdir ~/\dir

E. rmdir '~/\dir'

Correct Answer: D

Community vote distribution


A (100%)

  Murteira Highly Voted  2 years, 7 months ago

People pointing answers C and D are not creating the directory with the leading \. To do that you need do use mkdir "\dir" since mkdir \dir will
create a directory named only "dir". Thats why C and D are working for them.

Correct answer is A.
upvoted 18 times

  iwkno6 2 years, 5 months ago


Exactly!
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


Fully agree that it is A.
upvoted 2 times

  pablex_wolf Highly Voted  3 years, 7 months ago

There is a typo, they mean "remove"


upvoted 6 times

  peppiniello Most Recent  2 months, 1 week ago

Selected Answer: A

folder = \dir
upvoted 1 times

  sblancocr 3 months, 3 weeks ago


I think rhat C and D...
on this cases... works the remove directory

$ mkdir dir
$ ls dir
$ ls d*
dexample.gz.tar

dir:
rmdir ~/\dir
$ ls d*
dexample.gz.tar
$ mkdir dir
sblanco@idp:~$ rmdir ~/'dir'
sblanco@idp:~$ ls d*
dexample.gz.tar
$ mkdir dir
$ rmdir ~/'dir'
$ ls d*
dexample.gz.tar
upvoted 1 times

  Jack67 8 months ago

Selected Answer: A

A is correct, I tested
upvoted 1 times

  TT924 1 year, 1 month ago

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 109/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Selected Answer: A

A , /\ to display special character \


upvoted 2 times

  blk_542 1 year, 1 month ago


Selected Answer: A

A: seen as correct in another guide and tested in my home directory as regular user, cemtos 7, not root:
mkdir "\dir"
ls -l
\dir
then tried the different deleting options and the only working was A, no need to use any quotation marks.
upvoted 1 times

  meer01 1 year, 2 months ago


Selected Answer: A

A is correct
upvoted 1 times

  gonzaloco 1 year, 8 months ago

Selected Answer: A

A is correct
upvoted 1 times

  KiddyLitty 1 year, 9 months ago


Answer A didn't work for me.
Double backslash is not working on CentOS7 minimal with or without quotes.
Agree with "C"
upvoted 1 times

  KiddyLitty 1 year, 9 months ago


Sorry it is "D", not C
upvoted 1 times

  Lazylinux 1 year, 9 months ago

Selected Answer: A

Tested it is A
upvoted 2 times

  nedoex 1 year, 11 months ago

Selected Answer: A

\ for escaping
upvoted 3 times

  serlan 2 years ago


Correct answer is A.
upvoted 1 times

  anhcq 2 years, 1 month ago

Selected Answer: A

the name \dir contain character \ which needs to be escaped by \


upvoted 1 times

  Roger95 2 years, 1 month ago


basically, you can create \dir directory in homedir using 'mkdir ~/\\dir'
That's why answer is A that using the same way to remove it.
Note: backslash "\" used to remove special meaning on the following character, Example:
\x will display x as string even though x has a special meaning.
upvoted 1 times

  dspaula 2 years, 2 months ago


Correct answer is A. Tested on Centos 7
upvoted 1 times

  Avanade2023 2 years, 4 months ago


I tested on "CentOS Linux release 8.2.2004 (Core)", The answer is A(rmdir ~/\\dir).
Others' results are same as "No such file or directory".
but, if you run "rmdir ~/'\dir'", it will be removed successfully.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 110/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #101 Topic 1

Which of the following commands can perform searches on file contents using regular expressions?

A. find

B. locate

C. grep

D. reggrep

E. pgrep

Correct Answer: C

Community vote distribution


C (100%)

  Amycert 11 months, 1 week ago

Selected Answer: C

grep
very easy
upvoted 1 times

  iwkno6 2 years, 5 months ago


grep for basic regular expressions
egrep OR grep -E for extended regex
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 111/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #102 Topic 1

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

B. -dirmax

C. -maxlevels

D. -s

E. -n

Correct Answer: A

Community vote distribution


A (100%)

  Amycert 11 months, 1 week ago

Selected Answer: A

It is A
i checked the --help
upvoted 1 times

  Lazylinux 1 year, 9 months ago

Selected Answer: A

A definitely and it is in MAN page, there are both maxdepth and mindepth
upvoted 2 times

  serbal 3 years, 10 months ago


doesn't find any information in man pages in my distr
upvoted 1 times

  cast7omadrid1 3 years, 10 months ago


http://man7.org/linux/man-pages/man1/find.1.html

my recommendation is that if you have any doubts, look for the man page directly in google.
upvoted 3 times

  minajahan 3 years, 7 months ago


-maxdepth levels
Descend at most levels (a non-negative integer) levels of
directories below the starting-points. -maxdepth 0 means only
apply the tests and actions to the starting-points themselves.
upvoted 6 times

  iwkno6 2 years, 5 months ago


check 'find' manpage, and search for maxdepth, there's a section for it called -maxdepth levels
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 112/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #103 Topic 1

Which of the following commands determines a file's format by using a definition database file which contains information about all common

file types?

A. type

B. file

C. magic

D. pmagic

E. hash

Correct Answer: B

Community vote distribution


B (100%)

  Reseko 4 months, 1 week ago

Selected Answer: B

file — determine file type


upvoted 1 times

  Amycert 11 months, 1 week ago


Selected Answer: B

file is the only option there


upvoted 1 times

  NeoSam999 12 months ago

Selected Answer: B

https://phoenixnap.com/kb/linux-file-command
upvoted 2 times

  CuriousLinuxCat 2 years, 5 months ago


I love magic!
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 113/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #104 Topic 1

Which of the following commands generates a list of user names from /etc/passwd along with their login shell?

A. column -s : 1,7 /etc/passwd

B. chop -c 1,7 /etc/passwd

C. colrm 1,7 /etc/passwd

D. sort -t: -k1,7 /etc/passwd

E. cut -d: -f1,7 /etc/passwd

Correct Answer: E

Community vote distribution


E (100%)

  Amycert 11 months, 1 week ago

Selected Answer: E

cut again, just like the previous question


upvoted 1 times

  Goena 1 year, 3 months ago


E is correct:
cut -d: -f 1,7 /etc/passwd - outcome: daemon:/usr/sbin/nologin
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 114/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #105 Topic 1

If the gzip compressed tar archive texts.tgz contains the files a.txt and b.txt, which files will be present in the current directory after running

gunzip texts.tgz?

A. Only a.txt, b.txt, and texts.tgz

B. Only texts.tar and texts.tgz

C. Only a.txt.gz and b.txt.gz

D. Only a.txt and b.txt

E. Only texts.tar

Correct Answer: B

Community vote distribution


E (100%)

  serbal Highly Voted  3 years, 10 months ago

wrong answer - only *.tar file will be after gunzip


upvoted 34 times

  cast7omadrid1 3 years, 10 months ago


true! the answer is E
upvoted 29 times

  Rini_Giannenzo Highly Voted  3 years, 1 month ago


Porcaccissimo
upvoted 6 times

  peppiniello Most Recent  2 months, 1 week ago

Selected Answer: E

tried on ubuntu
upvoted 1 times

  blk_542 1 year, 1 month ago

Selected Answer: E

E:
[root@centos-vm TAR-TESTING]# tar -czf texts.tgz a.txt b.txt
[root@centos-vm TAR-TESTING]# ls -l
total 4
-rw-r--r--. 1 root root 0 Nov 20 13:58 a.txt
-rw-r--r--. 1 root root 0 Nov 20 13:58 b.txt
-rw-r--r--. 1 root root 117 Nov 20 13:59 texts.tgz
[root@centos-vm TAR-TESTING]# rm -rf a.txt b.txt
[root@centos-vm TAR-TESTING]# ls -l
total 4
-rw-r--r--. 1 root root 117 Nov 20 13:59 texts.tgz
[root@centos-vm TAR-TESTING]# gunzip texts.tgz
[root@centos-vm TAR-TESTING]# ls -l
total 12
-rw-r--r--. 1 root root 10240 Nov 20 13:59 texts.tar
[root@centos-vm TAR-TESTING]#
upvoted 5 times

  gonzaloco 1 year, 8 months ago

Selected Answer: E

I think is E
upvoted 1 times

  gonzaloco 1 year, 9 months ago


Selected Answer: E

E 100%
upvoted 2 times

  HunTec 1 year, 9 months ago

Selected Answer: E

E is correct

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 115/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

upvoted 2 times

  Lazylinux 1 year, 9 months ago

Selected Answer: E

E.....asy
upvoted 1 times

  molotov 1 year, 11 months ago


Selected Answer: E

E is correct, tested on Ubuntu 21.10.


upvoted 1 times

  serlan 2 years ago


Answer E
upvoted 1 times

  anhcq 2 years, 1 month ago


Selected Answer: E

gunzip remove original file after extract it, E is correct answer


upvoted 4 times

  iwkno6 2 years, 5 months ago


only .tar remains so E is correct
upvoted 1 times

  Abumazin 2 years, 9 months ago


Answer E
upvoted 2 times

  diocane24 2 years, 10 months ago


ciao sono troppo short
upvoted 1 times

  deewetdvjbmnjkjytfdszxc 3 years, 5 months ago


I think is D. You can create a tgz file without creating first a tar file.
upvoted 2 times

  Vano1 3 years, 5 months ago


tar -czf texts.tgz a.txt b.txt create first tar archive and after create gzip compression file.
I verified on Debian9 and answer is E.
upvoted 4 times

  klebhen 3 years, 5 months ago


After executing some commands, the answer is E because when you use gunzip without any parameter, i.e -k --keep, the extraction will not keep
.tgz, but only .tar
upvoted 3 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 116/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #106 Topic 1

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 41 or 2yj.

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

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

E. By specifying the number after a command such as 14 or yj2 followed by escape.

Correct Answer: B

  hiatusland Highly Voted  2 years, 8 months ago

ah yes, the "shit and cursor keys," my favorite of the keys.


upvoted 13 times

  sheilawu 8 months ago


lamo it is too funny when I saw "shit"
upvoted 1 times

  CuriousLinuxCat 2 years, 5 months ago


25 years have I walked this Earth, and have never found myself not using one of these glorious keys.
upvoted 5 times

  musashino_ninja Highly Voted  3 years, 4 months ago


41 should be 4l(elle).
upvoted 6 times

Question #107 Topic 1

Which of the following statements is correct for a command ending with an & character?

A. The command's output is redirected to /dev/null.

B. The command is run in background of the current shell.

C. The command's output is executed by the shell.

D. The command is run as a direct child of the init process.

E. The command's input is read from /dev/null.

Correct Answer: B

Community vote distribution


B (100%)

  Amycert 11 months ago

Selected Answer: B

command will run in the background


upvoted 1 times

  iwkno6 2 years, 5 months ago


B is correct
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 117/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #108 Topic 1

Which of the following commands reads a file and creates separate chunks of a given size from the file's contents?

A. ar

B. cat

C. break

D. split

E. parted

Correct Answer: D

Community vote distribution


D (100%)

  Amycert 11 months ago

Selected Answer: D

split: split a file into pieces


upvoted 2 times

Question #109 Topic 1

What is the purpose of the xargs command?

A. It passes arguments to an X server.

B. It repeats the execution of a command using different parameters for each invocation.

C. It reads standard input and builds up commands to execute.

D. It asks a question, graphically, and returns the answer to the shell.

E. It allows specifying long options (like --help) for commands that normally only accept short options (like -h)

Correct Answer: C

Community vote distribution


C (100%)

  Reseko 4 months, 1 week ago


Selected Answer: C

Example:
The command uses xargs to create directories in the ~/tests/ path with usernames obtained from the /etc/passwd file:
tail /etc/passwd | cut -d":" -f1 | xargs -I {} mkdir -p ~/tests/{}
upvoted 1 times

  amwangi 2 years, 7 months ago


The answer is C
upvoted 4 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 118/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #110 Topic 1

FILL BLANK -

Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or

parameters.)

Correct Answer: jobs

  Reseko 4 months, 1 week ago


renice = alter priority of running processes
upvoted 1 times

  Amycert 11 months ago


answer is correct.
jobs command
upvoted 2 times

Question #111 Topic 1

FILL BLANK -

Which command is used to change the priority of an already running process? (Specify ONLY the command without any path or parameters.)

Correct Answer: renice

  Real97 1 year, 6 months ago


renice
upvoted 2 times

Question #112 Topic 1

In Bash, inserting 1>&2 after a command redirects`¦

A. ‫ג‬€¦standard error to standard input.

B. ‫ג‬€¦standard output to standard error.

C. ‫ג‬€¦standard input to standard error.

D. ‫ג‬€¦standard error to standard output.

E. ‫ג‬€¦standard output to standard input.

Correct Answer: B

Community vote distribution


B (100%)

  blk_542 Highly Voted  1 year, 1 month ago

Selected Answer: B

B:
0: stdin, 1: stout, 2: sterr
upvoted 6 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 119/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #113 Topic 1

When booting from the hard disk, a computer successfully loads the Linux kernel and initramfs but hangs during the subsequent startup tasks.

The system is booted using a Linux based rescue CD to investigate the problem. Which of the following methods helps to identify the root

cause of the problem?

A. Using the dmesg command from the rescue CD's shell to view the original system's boot logs.

B. Investigating the file /proc/kmsg on the computer's hard disk for possible errors.

C. Investigating the file /var/log on the computer's hard disk for possible errors.

D. Using chroot to switch to the file system on the hard disk and use dmesg to view the logs.

E. Rebooting again from the hard drive since the system successfully booted from the rescue CD.

Correct Answer: C

  CuriousLinuxCat Highly Voted  2 years, 5 months ago


During boot, the logs are stored in dmesg, but are later transferred to /var/logs when the boot has finished.

In this example, it was successfully rebooted with a rescue disk, hence one needs to go look at /var/logs because your OS transferred it there!
upvoted 13 times

  catita3 Most Recent  9 months, 4 weeks ago

I had a hard time with this one. All options are wrong to me, even option C.
It says, "Investigating the file /var/log ...", but /var/log is not a file; it is a directory.
It is not well written.
upvoted 1 times

  napstervk 2 years, 5 months ago


dmesg es volatil, todo se queda guardado en log, SIEMPRE, log es lo primero
upvoted 3 times

  iwkno6 2 years, 5 months ago


After dmesg writes the contents of the ring buffer, it ends up in /var/log/messages, hence within /var/log, so C is correct.
upvoted 3 times

  Bodescu 2 years, 7 months ago


If you have a look to the dmesg, you will get the live system dmesg. So, need to chroot first, then, dmesg. D is the right answer :)
upvoted 3 times

  sugisho 3 years, 2 months ago


The log after the initialization process by the kernel is completed cannot be found without looking at the / var / log / messages file.
upvoted 1 times

  ilputto 3 years, 2 months ago


I think is C. the chroot might be also correct, but you will not able to use dmesg to troubleshoot the first boot process.
upvoted 2 times

  ismael_1_ 3 years, 3 months ago


la correcta es la D.
upvoted 2 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 120/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #114 Topic 1

Where is the bootloader stored on the hard disk of a UEFI system?

A. In the EFI Boot Record (EBR).

B. In the Master Boot Record (MBR).

C. On the EFI System Partition (ESP).

D. On the partition labeled boot.

E. On the partition number 127.

Correct Answer: C

  Ashi Highly Voted  3 years, 5 months ago


If boot mode was set to legacy BIOS then MBR would be correct choice but here boot mode in question is UEFI for which correct answer is c
upvoted 10 times

  hugorc Most Recent  2 years, 5 months ago


Uefi=ESP. C
upvoted 2 times

  Bodescu 2 years, 7 months ago


Forget about Legacy BIOS, just the past. UEFI is the present ao answer is C :)
upvoted 2 times

  CuriousLinuxCat 2 years, 9 months ago


Answer is C.
Normally, UEFI uses ESP.
However, there are times when UEFI needs to be backwards compatible for BIOS / CHS.
upvoted 3 times

  Wucrib 2 years, 11 months ago


Answer C. EFI system partition(ESP) is used by machines based on the Unified Extensible Firmware Interface(UEFI) to store boot loaders and
kernel images for O.Ss installed.
upvoted 3 times

  sandey 3 years, 5 months ago


The UEFI system does't have MBR. the right answer is B
upvoted 1 times

  sandey 3 years, 5 months ago


SORRY options "C"
becouse the UEFI systems don't have MBR
upvoted 3 times

  deewetdvjbmnjkjytfdszxc 3 years, 5 months ago


The boot.img is located in MBR for both Legacy GRUB and GRUB2. Isn't that file the bootloader?
upvoted 1 times

  Bodescu 2 years, 7 months ago


Is. For MBR (BIOS) computers. But UEFI does not use MBR, it uses ESP partition.
upvoted 1 times

  yigido 3 years, 5 months ago


Answer is B, MBR
upvoted 1 times

  iwkno6 2 years, 5 months ago


for BIOS (legacy) yes, but for UEFI it's ESP
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 121/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #115 Topic 1

What is the correct way to set the default systemd boot target to multi-user?

A. systemctl isolate multi-user.target

B. systemctl set-runlevel multi-user.target

C. systemctl set-boot multi-user.target

D. systemctl set-default multi-user.target

E. systemctl boot -p multi-user.target

Correct Answer: D

  alitosdavila Highly Voted  1 year, 10 months ago


systemctl set-default -> change the system’s default target
systemctl get-default -> show you the system’s current default target
systemctl isolate -> jump to new targets and not set default targets
upvoted 10 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 122/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #116 Topic 1

Which of the following statements are correct about the initial RAM disk involved in the boot process of Linux? (Choose two.)

A. An initramfs is a compressed file system archive, which can be unpacked to examine its contents.

B. An initramfs file contains the MBR, the bootloader and the Linux kernel.

C. After a successful boot, the initramfs contents are available in /run/initramfs/.

D. The kernel uses the initramfs temporarily before accessing the real root file system.

E. An initramfs does not depend on a specific kernel version and is not changed after the initial installation.

Correct Answer: AC

Community vote distribution


AD (100%)

  dwarf Highly Voted  3 years, 8 months ago


For me A and D.
upvoted 29 times

  cast7omadrid1 3 years, 8 months ago


I have doubts about this question, you may be right but I can't find anything to corroborate it. Where can I find this information?
upvoted 3 times

  cast7omadrid1 3 years, 7 months ago


dwarf you're right
upvoted 4 times

  glorofarz 3 years, 6 months ago


https://en.wikipedia.org/wiki/Linux_startup_process#Early_user_space
upvoted 6 times

  biggydanny 3 years, 6 months ago


i think its a and d
upvoted 6 times

  Mchoeti Most Recent  9 months, 3 weeks ago


Right it is A and D .
Option C is incorrect because the contents of the initramfs are mounted in the /initrd directory during the boot process, not in /run/initramfs.
upvoted 1 times

  Egorroico 1 year, 5 months ago

Selected Answer: AD

AD is correct
upvoted 1 times

  n42hira 1 year, 6 months ago


Asked my teacher today he says its A + D for shure, he is a Linux Expert
upvoted 1 times

  Lazylinux 1 year, 8 months ago

Selected Answer: AD

AD for sure..here is why


The kernel will then open the initramfs (initial RAM filesystem). The initramfs is an archive containing a filesystem used as a temporary root
filesystem during the boot process. The main purpose of an initramfs file is to provide the required modules so the kernel can access the “real”
root filesystem of the operating system"
An initramfs is a compressed file system archive, which can be unpacked to examine its contents.
The kernel uses the initramfs temporarily before accessing the real root file system
upvoted 3 times

  gonzaloco 1 year, 8 months ago

Selected Answer: AD

A and D
upvoted 2 times

  marenco 1 year, 10 months ago


Just in case I have read the book, Answers A and D >> based on this >> The kernel will then open the initramfs (initial RAM filesystem). The
initramfs is an archive
https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 123/128
11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

containing a filesystem used as a temporary root filesystem during the boot process. The main
purpose of an initramfs file is to provide the required modules so the kernel can access the “real”
root filesystem of the operating system.
upvoted 3 times

  molotov 1 year, 11 months ago


Selected Answer: AD

I go with A and D
upvoted 2 times

  serlan 2 years ago

Selected Answer: AD

A and D are correct


upvoted 2 times

  McReseau 2 years, 7 months ago


A and D are correct
upvoted 2 times

  MaxMer 2 years, 7 months ago


A and D are correct
upvoted 2 times

  CuriousLinuxCat 2 years, 9 months ago


Hmm, I thought it was A and D.
upvoted 2 times

  McLaba 2 years, 9 months ago


D is not 'temporaneally', it's always ready also after the boot
upvoted 1 times

  MaikyCR28 1 year, 10 months ago


"The kernel will then open the initramfs (initial RAM filesystem). The initramfs is an archive
containing a filesystem used as a temporary root filesystem during the boot process. The main
purpose of an initramfs file is to provide the required modules so the kernel can access the “real” root filesystem of the operating system".
Page 25 Official LPIC-1 101-500 book
upvoted 1 times

  Chenar 2 years, 11 months ago


The Correct Answer is :
A and D
upvoted 3 times

  [Removed] 3 years, 5 months ago


Choose two answers but there are three correct answers (A, C and D), the temporary filesystem is created at boot time after decompress
initramfs on /run/initramfs after system start and is necessary to shutdown the system, with it root filesystem can be unmounted properly.
upvoted 2 times

  blk_542 1 year, 1 month ago


I agree with you. We all agree D is true, but A: not sure how to uncompressed it, but sure it is possible. Then I checked /run/initramfs and
effectively files modification data matches today corresponding with boot. If someone can tell why C is not true, I'll be thankful!
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 124/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #117 Topic 1

Which of the following commands loads a kernel module along with any required dependency modules?

A. depmod

B. modprobe

C. module_install

D. insmod

E. loadmod

Correct Answer: B

  MartiFC Highly Voted  1 year, 11 months ago


The answer is correct
"Some modules have dependencies, which are other kernel modules that must be loaded before the module in question can be loaded. The
modprobe command always takes dependencies into account when performing operations. When you ask modprobe to load a specific kernel
module, it first examines the dependencies of that module, if there are any, and loads them if they are not already loaded into the kernel.
modprobe resolves dependencies recursively: it will load all dependencies of dependencies, and so on, if necessary, thus ensuring that all
dependencies are always met."

https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-
configuration/Working_with_Kernel_Modules/
upvoted 6 times

Question #118 Topic 1

What information can the lspci command display about the system hardware? (Choose three.)

A. System battery type

B. Device IRQ settings

C. PCI bus speed

D. Ethernet MAC address

E. Device vendor identification

Correct Answer: BCE

  anhcq Highly Voted  2 years, 1 month ago


The lspci command alone does not provide any other information but hardware vendor. To inspect further, need to run lspci twice, the 2nd run
add -s flag followed by corresponding hexadecimal numbers at the beginning of line examined in 1st lspci run, and finally -v flag.
Eg. lspci -s 00:03.0 -v
With this run, we can get IRQ and bus information
upvoted 7 times

  rockk18 Most Recent  1 year, 6 months ago


thanks anhcq for you demonstration
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 125/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #119 Topic 1

FILL BLANK -

Which System V init configuration file is commonly used to set the default run level? (Specify the full name of the file, including path.)

Correct Answer: /etc/inittab

  McReseau 2 years, 7 months ago


Right Answer
upvoted 4 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 126/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

Question #120 Topic 1

Given the following two symbolic links in a System V init configuration:

/etc/rc1.d/K01apache2

/etc/rc2.d/S02apache2

When are the scripts executed that are referenced by these links? (Choose two.)

A. S02apache2 is run when runlevel 2 is entered.

B. S02apache2 is run when runlevel 2 is left.

C. K01apache2 is never run because K indicates a deactivated service.

D. Both S02apache2 and K01apache2 are run during a system shutdown.

E. K01apache2 is run when runlevel 1 is entered.

Correct Answer: AC

Community vote distribution


AE (75%) AC (25%)

  Chenar Highly Voted  2 years, 11 months ago


The Correct Answer is :
A and E
upvoted 7 times

  glorofarz Highly Voted  3 years, 6 months ago


this does not seem right to me, this does: AE
upvoted 5 times

  Zeist 3 years, 5 months ago


I agree, AE is the correct answer in my opinon
upvoted 5 times

  jurgen1 Most Recent  10 months ago

Selected Answer: AC

A. S02apache2 is run when runlevel 2 is entered. This is because the symbolic link in /etc/rc2.d starts with the letter "S", which stands for "Start",
and is followed by a number that determines the order in which the scripts are executed when entering the corresponding runlevel.

C. K01apache2 is never run because K indicates a deactivated service. This is because the symbolic link in /etc/rc1.d starts with the letter "K",
which stands for "Kill", and is followed by a number that determines the order in which the scripts are executed when leaving the corresponding
runlevel.

Therefore, the correct answers are A and C.


upvoted 4 times

  blk_542 1 year, 1 month ago

Selected Answer: AE

AE:
Regarding the E, we all agree that K indicates that THE SERVICE (apache2) won't take place in run level 1.
But the question (and is somewhat ambiguous wording) ask about THE SCRIPT itself that will deactivate apache2.
By following the logic of https://www.golinuxhub.com/2014/01/what-are-s-and-k-scripts-in-etc-rcxd/, the K scripts are in deed executed to stop
the service.
So, if the option C didn't include the K01 and just refer to the apache2 service that would be correct. But again, the reasoning of the question
refers to the script itself, or at least that is the way it is written.
upvoted 3 times

  gonzaloco 1 year, 8 months ago


Selected Answer: AE

I think the answer is A and E.


upvoted 3 times

  serlan 2 years ago

Selected Answer: AE

A and E
upvoted 2 times

  anhcq 2 years, 1 month ago


Selected Answer: AE

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 127/128


11/1/24, 11:57 101-500 Exam – Free Actual Q&As, Page 1 | ExamTopics

The first letter of the link filename in the runlevel’s directory indicates if the service should be started or terminated for the corresponding
runlevel. A link’s filename starting with letter K determines that the service will be killed when entering the runlevel (kill).
Ref: https://learning.lpi.org/en/learning-materials/101-500/101/101.3/101.3_01/
upvoted 4 times

  ChrisGrande 2 years, 3 months ago


question is When are the scripts executed. So A and E is an answer to the question. C is not the explicit answer to the question.
upvoted 4 times

  CuriousLinuxCat 2 years, 5 months ago


Can't say for sure, but what @Zeist said resonates more intuitively for me.

I think that K01apache2 script (Answer C) is read by the OS and is promptly killed before the service can be started / has already started.

"deactivated service" may not apply because the service could have been started prior to the scripts being executed.

I would go for A and E.


upvoted 4 times

  [Removed] 3 years, 5 months ago


C is correct. The S stands for start and K for Kill. These are essentially links to the original scripts in /etc/rc.d. The numbers after S/K are the
priority by which the services will be started/Killed
upvoted 1 times

  Zeist 3 years, 5 months ago


Both S and K links gives to OS instructions on how handle a specific service when an init state change happen. K and S indicate if the service
will be started or stopped, the following number indicate the init level to which the script will be applied. Any link that start with K01 means
that the relative service will be killed as soon as the system switch of init 1 (single user mode). A and E are correct.
upvoted 9 times

  ilputto 3 years, 2 months ago


I'm agree , AE are correct
upvoted 2 times

  daca11 3 years ago


I don't agree with you. The number indicates priority of execution, the init state is indicated in the folder containing the scripts. K00 will be
executed first and K99 last.

On the other hand, for me A is correct. E is wrong, that script will be run when leaving runlevel 1. C might be correct, because runlevel 1 is
single-user mode used for system maintenance, and in that state, services are restricted to bare-minimum, and apache might be
deactivated in that runlevel.
upvoted 1 times

https://w w w .examtopics.com/exams/lpi/101-500/custom-view / 128/128

You might also like