
Lpi 102-500 Exam Questions (Updated 2025) 100% Real Question Answers
Pass Lpi 102-500 Exam Quickly With ITPassLeader
NEW QUESTION # 140
What output will the command seq 10 produce?
- A. The numbers 1 through 10 with one number per line.
- B. A continuous stream of numbers increasing in increments of 10 until stopped.
- C. The number 10 to standard output.
- D. The numbers 0 through 9 with one number per line.
Answer: A
NEW QUESTION # 141
Of the ways listed, which is the best method to temporarily suspend a user's ability to interactively login?
- A. Use chage to expire the user account.
- B. Use passwd -d username to give the user an empty password.
- C. Change the user's password.
- D. Add the command exit to the user's .login file.
Answer: A
Explanation:
The chage command can be used to change the expiration date of a user account. By setting the expiration date to a past date, the user account will be disabled and the user will not be able to login interactively. This is a temporary method, as the expiration date can be changed back to a future date or removed to re-enable the user account. The other options are either permanent, insecure, or ineffective. Option A is insecure, as it allows anyone to login as the user without a password. Option C is permanent, as it changes the user's password without saving the original one. Option D is ineffective, as it only affects the user's .login file, which is used by the csh and tcsh shells, and not by other shells such as bash or zsh. Therefore, option B is the best method to temporarily suspend a user's ability to interactively login. References:https://linuxconfig.org/disabling-user-logins-to-linux-system
https://askubuntu.com/questions/282806/how-to-enable-or-disable-a-user
NEW QUESTION # 142
Which command makes the shell variable named VARIABLE visible to subshells?
- A. set VARIABLE
- B. export $VARIABLE
- C. export VARIABLE
- D. env VARIABLE
- E. set $VARIABLE
Answer: C
Explanation:
The export command makes the shell variable named VARIABLE visible to subshells. This means that any child process that is spawned from the current shell will inherit the value of VARIABLE. The export command does not need a dollar sign ($) before the variable name, as that would expand the variable to its value. The set command only affects the current shell and does not export the variable to subshells. The env command can be used to run a command in a modified environment, but it does not export the variable to subshells either. References:
* [LPI Linux Essentials - Topic 105: Shells, Scripting and Data Management]
* [LPI Linux Administrator - Exam 102 Objectives - Topic 105: Shells and Shell Scripting]
NEW QUESTION # 143
What is the conventional purpose of Linux UIDs that are lower than 100?
- A. They are reserved for system accounts.
- B. They are used to match with GIDs in grouping users.
- C. They are unused, aside from 0, because they are targets of exploits.
- D. They are reserved for the system admin accounts.
- E. They are reserved for super user accounts.
Answer: A
NEW QUESTION # 144
What output is produced by the following command sequence?
echo '1 2 3 4 5 6' | while read a b c; do
echo result $c $b $a;
done
- A. result: 6 5 4
- B. result: 1 2 3 4 5 6
- C. result: 3 4 5 6 2 1
- D. result: 6 5 4 3 2
- E. result: 3 2 1
Answer: C
Explanation:
Explanation/Reference:
NEW QUESTION # 145
With IPv6, how many bits have been used for the interface identifier of an unicast address? (Specify the number using digits only.)
Answer:
Explanation:
64
Explanation:
With IPv6, the interface identifier of an unicast address is typically a 64-bit value that is used to identify a host's network interface. The interface identifier can be derived from the MAC address of the network card, or it can be randomly generated or manually configured. The interface identifier is the rightmost 64 bits of the most commonly encountered address types, such as global unicast (2000::/3) and link-local (fe80::/10). The interface identifier is different from the network prefix, which is the leftmost bits of the address that indicate the network or subnet to which the host belongs. The network prefix can vary in length, depending on the address type and the subnetting scheme. The network prefix and the interface identifier are separated by a double colon (::) in the IPv6 address notation. For example, in the address 2001:db8:1234:5678:abcd:ef12:3456:7890, the network prefix is 2001:db8:1234:5678 and the interface identifier is abcd:ef12:3456:7890. Reference: https://study-ccna.com/ipv6-interface-identifier/
https://networklessons.com/ipv6/ipv6-eui-64-explained
NEW QUESTION # 146
By default, the contents of which directory will be copied to a new user's home directory when the account is created by passing the -m option to the useradd command? (Specify the full path to the directory.)
Answer:
Explanation:
etcskel
Explanation:
The /etc/skel directory contains files and directories that are used as a template for creating a new user's home directory. The useradd command uses the -m (or --create-home) option to create the user home directory as /home/username and copy the files from /etc/skel to it. The files in /etc/skel are typically initialization files such as .bashrc, .profile, and .bash_logout that set the user's environment variables, aliases, and other preferences. The system administrator can customize the /etc/skel directory to provide a consistent and convenient initial setup for new users. Reference:
https://www.howtouselinux.com/post/create-new-user-with-home-directory-in-linux
https://linuxize.com/post/how-to-create-users-in-linux-using-the-useradd-command/
NEW QUESTION # 147
Which of the following tasks can the date command accomplish? (Choose two.)
- A. Calculate the time span between two dates.
- B. Set the system's date and time.
- C. Display time in a specific format.
- D. Set the system's date but not the time.
- E. Print a calendar for a month or a year.
Answer: B,C
Explanation:
The date command is used to display or set the system's date and time. The date command has the following syntax:
date [options] [+format] [time]
The options can modify the behavior of the date command, such as setting the time zone, printing the date in RFC 3339 format, or updating the hardware clock. The +format argument can specify the output format of the date command, using various conversion specifiers that represent different components of the date and time, such as %Y for the year, %m for the month, %d for the day, %H for the hour, %M for the minute, and %S for the second. The time argument can set the system's date and time, using the format MMDDhhmm[[CC]YY][.ss], where MM is the month, DD is the day, hh is the hour, mm is the minute, CC is the century, YY is the year, and ss is the second.
Therefore, the date command can accomplish the following tasks:
* A. Set the system's date and time. For example, to set the system's date and time to November 8, 2023,
18:30:00, the command would be:
date 110818302023.00
* E. Display time in a specific format. For example, to display the current date and time in the format YYYY-MM-DD HH:MM:SS, the command would be:
date +%Y-%m-%d %H:%M:%S
The other options in the question are not correct for this task. The date command cannot set the system's date but not the time, as the time argument requires both the dateand the time components. The date command cannot calculate the time span between two dates, as it can only display or set the current date and time. The date command cannot print a calendar for a month or a year, as that is the function of the cal command.
References:
* LPI 102-500 Exam Objectives, Topic 105.1: Customize and use the shell environment
* LPI 102-500 Study Guide, Chapter 5: Customizing Shell Environments, Section 5.1: Working with the Shell
* date man page
NEW QUESTION # 148
What is Irue regarding public and private SSH keys? (Choose TWO correct answers.)
- A. The private key must never be revealed to anyone.
- B. To maintain the private key's confidentiality, the SSH key pair must be created by its owner.
- C. Several different public keys may be generated (or the same private key.
- D. For each user account, there is exactly one key pair that can be used to log into that account.
- E. To allow remote logins, the user's private key must be copied to the remote server.
Answer: A,B
NEW QUESTION # 149
Which of the following statements is true regarding systemd timer units?
- A. Timer units only exist in the system scope and are not available for users.
- B. The command executed by the timer is specified in the timer unit's [Cmd]section.
- C. Timer units can only be defined within a service unit's file.
- D. A dedicated system service, systemd-cron, handles the execution of timer units.
- E. Each systemd timer unit controls a specific systemd service unit.
Answer: E
Explanation:
Explanation/Reference:
NEW QUESTION # 150
After adding a new email alias to the configuration, which command must be run in order to ensure the MTA knows about it? (Specify the command without any path but including all required parameters.)
Answer:
Explanation:
newaliases, sendmail -bi
Explanation:
The command that must be run in order to ensure the MTA knows about the new email alias is:
newaliases
This command updates the MTA's aliases database and makes the changes effective. It is equivalent to the commands sendmail -bi or sendmail -I12. The newaliases command should be run after making modifications to the /etc/aliases file, which contains the email aliases for the system3.
NEW QUESTION # 151
Which keyword must be listed in the hosts option of the Name Service Switch configuration file in order to make host lookups consult the /etc/hosts file?
Answer:
Explanation:
files
Explanation:
The keyword files must be listed in the hosts option of the Name Service Switch configuration file in order to make host lookups consult the /etc/hosts file. The files service specifies that the local files, such as /etc/hosts, should be used as a source of information. The order of the services on the line determines the order in which those services will be queried, in turn, until a result is found. For example, if the hosts option is set to:
hosts: files dns
then the /etc/hosts file will be searched first, and if no match is found, the DNS server will be queried next. If the hosts option is set to:
hosts: dns files
then the DNS server will be queried first, and if no match is found, the /etc/hosts file will be searched next. Reference:
LPI 102-500 Exam Objectives, Topic 110: Network Fundamentals, Weight: 4, 110.3 Basic network troubleshooting LPI 102-500 Study Guide, Chapter 10: Network Fundamentals, Section 10.3: Basic Network Troubleshooting, Page 125-126 nsswitch.conf: Name Service Switch configuration file
NEW QUESTION # 152
If neigher cron, allow nor cron, deny exist in /etc/, which of the following is true?
- A. Without additional configuration, only root may create user specific crontabs.
- B. Without additional configuration, all users may create user specific crontabs.
- C. The aon daemon will refuse to start and report missing files in the system's logfile.
- D. When a user creates a user specific crontab the system administrator must approve it explicitly.
- E. The default settings of /etc/crond.conf define whether or not user specific crontabs are generally allowed or not.
Answer: E
NEW QUESTION # 153
Which of the following statements is true regarding systemd timer units?
- A. The command executed by the timer is specified in the timer unit's [Cmd] section.
- B. Timer units only exist in the system scope and are not available for users.
- C. Timer units can only be defined within a service unit's file.
- D. A dedicated system service, systemd-cron, handles the execution of timer units.
- E. Each systemd timer unit controls a specific systemd service unit.
Answer: E
NEW QUESTION # 154
On a machine running several X servers, how do programs identify the different instances of the X11 server?
- A. By a display name like: 1.
- B. By a unique IPv6 address from the fe80::/64subnet.
- C. By a fixed UUID that is defined in the X11 configuration file.
- D. By a device name like /dev/X11/xservers/1.
- E. By the name of the user that runs the X server like x11:bob.
Answer: A
Explanation:
Explanation
NEW QUESTION # 155
After configuring printing on a Linux server, the administrator sends a test file to one of the printers and it fails to print. What command can be used to display the status of the printer's queue? (Specify ONLY the command without any path or parameters.)
Answer:
Explanation:
/usr/bin/lpstat
NEW QUESTION # 156
The presence of what file will temporarily prevent all users except root from logging into the system? (Specify the full name of the file, including path.)
Answer:
Explanation:
/etc/nologin
NEW QUESTION # 157
What the echo $$ command?
- A. The process ID for the following command.
- B. The process ID of the last command executed.
- C. The process ID of the last command which has been placed in the background.
- D. The process ID of the echo command.
- E. The process ID of the current shell.
Answer: E
NEW QUESTION # 158
Which command should be added to /etc/bash_profile to change the language of messages from an internationalised program to Portuguese (pt)? (Select TWO correct answers)
- A. export MESSAGE="pt"
- B. export LANGUAGE="pt"
- C. export ALL_MESSAGES="pt"
- D. export LANG="pt"
- E. export LC_MESSAGES="pt"
Answer: D,E
Explanation:
The commands that should be added to /etc/bash_profile to change the language of messages from an internationalised program to Portuguese (pt) are:
export LANG="pt"
export LC_MESSAGES="pt"
The LANG and LC_MESSAGES environment variables are used to control the language of messages from an internationalised program. The LANG variable sets the default locale for all categories, such as collation, currency, date and time formats, etc. The LC_MESSAGES variable sets the locale for the language of messages, overriding the LANG variable for this category. Therefore, to change the language of messages to Portuguese, both variables should be set to "pt" in /etc/bash_profile, which is a script that is executed when a user logs in. This will affect the current user and any subsequent login sessions.
Reference:
Locale Environment Variables in Linux - Baeldung on Linux
Environment Variables - The Open Group
[LPI Linux Essentials - 1.4 Localization and Internationalization]
NEW QUESTION # 159
Which of the following changes may occur as a consequence of using the command ip? (Choose three.)
- A. The routing table may change.
- B. Network interfaces may become active or inactive.
- C. New name servers may be added to the resolver configuration.
- D. The system's host name may change.
- E. IP addresses may change.
Answer: A,B,E
Explanation:
The ip command is a versatile tool that can be used to configure and manage various aspects of the network interfaces, such as IP addresses, routes, tunnels, and more. Depending on the options and arguments used, the ip command can cause different changes to the network configuration. Some of the possible changes are:
* Network interfaces may become active or inactive. The ip command can be used to bring up or down a network interface, which means to activate or deactivate its connection to the network. For example, the command ip link set eth0 up will bring up the interface eth0, while the command ip link set eth0 down will bring it down. This can affect the network connectivity and performance of the system.
* IP addresses may change. The ip command can be used to assign or remove IP addresses to a network interface, which are the numerical identifiers that allow the system to communicate with other hosts in the network. For example, the command ip addr add 192.168.1.100/24 dev eth0 will assign the IP address 192.168.1.100 with a subnet mask of 255.255.255.0 to the interface eth0, while the command ip addr del 192.168.1.100/24 dev eth0 will remove it. This can affect the network reachability and routing of the system.
* The routing table may change. The ip command can be used to add or delete routes to the routing table, which is a data structure that stores the information about how to reach different network destinations.
For example, the command ip route add 10.0.0.0/8 via 192.168.1.1 dev eth0 will add a route to the network 10.0.0.0/8 through the gateway 192.168.1.1 using the interface eth0, while the command ip route del 10.0.0.0/8 via 192.168.1.1 dev eth0 will delete it. This can affect the network traffic and efficiency of the system.
The ip command does not affect the following settings:
* New name servers may be added to the resolver configuration. The resolver configuration is a file that specifies the name servers that the system uses to resolve domain names to IP addresses. The resolver configuration file is usually /etc/resolv.conf, and it is not modified by theip command. To add or remove name servers, the file has to be edited manually or by another tool, such as resolvconf or NetworkManager.
* The system's host name may change. The host name is a human-readable name that identifies the system in the network. The host name is usually stored in the file /etc/hostname, and it is not changed by the ip command. To change the host name, the file has to be edited manually or by another tool, such as hostnamectl or nmtui.
References:
* LPIC-1 Exam 102 Objectives, Topic 109: Networking Fundamentals, Subtopic 109.2: Persistent network configuration, Weight: 2, Key Knowledge Areas: Query and modify the behavior of network interfaces. Objective: Use the ip command to configure and modify the behavior of network interfaces.
* LPIC-1 Exam 102 Learning Materials, Topic 109: Networking Fundamentals, Subtopic 109.2: Persistent network configuration, Section 109.2.2: ip, Page 17-19.
NEW QUESTION # 160
Which of the following may occur as a consequence of using the command ifconfig? (Choose THREE correct answers.)
- A. The routing table may change.
- B. Network interfaces may become active or inactive.
- C. New name servers may be added to the resolver configuration.
- D. The system's host name may change.
- E. IP addresses may change.
Answer: A,B,E
NEW QUESTION # 161
A French user has installed the French language pack, but currencies are still being displayed with a leading '$' sign in his spreadsheets. What must be done to fix this?
- A. Set the timezone correctly.
- B. Reinstall the French language pack.
- C. Edit /etc/currency.
- D. Alter the locale.
Answer: D
NEW QUESTION # 162
The X11 configuration file xorg.conf is grouped into sections. How is the content of the section SectionName associated with that section?
- A. It is placed between the tags <Section name="SectionName"> and </Section>
- B. It is placed in curly brackets as in Section SectionName { ... }.
- C. It is placed after the row [SectionName].
- D. It is placed between a line containing Section "SectionName" and a line containing EndSection.
- E. It is placed after an initial unindented Section "SectionName" and must be indented by exactly one tab character.
Answer: D
Explanation:
The X11 configuration file xorg.conf is grouped into sections, and the content of the section SectionName is associated with that section by placing it between a line containing Section "SectionName" and a line containing EndSection. For example, the following is a section named ServerLayout that defines the layout of the X server:
Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSection The other options are incorrect for the following reasons:
A: Curly brackets are not used to delimit sections in xorg.conf. They are used to enclose values that are lists, such as Option "XkbLayout" "{us,fr}".
C: Tags are not used to delimit sections in xorg.conf. They are used in XML files, which have a different syntax and structure than xorg.conf.
D: Rows are not used to delimit sections in xorg.conf. They are used to define key-value pairs within a section, such as Identifier "Screen0".
E: Indentation is not required to delimit sections in xorg.conf. It is used to improve readability and clarity, but it does not affect the functionality of the file.
Reference:
xorg.conf - X Window System
Editing basics for the xorg.conf file - Linux.com
106.1 Lesson 1 - Linux Professional Institute Certification Programs
NEW QUESTION # 163
......
Real Lpi 102-500 Exam Questions [Updated 2025]: https://exam-labs.itpassleader.com/Lpi/102-500-dumps-pass-exam.html