Welcome to awslagi.com – Sharing AWS, Anthropic, Google Cloud, Microsoft Azure IT Exams. It's free for all!

CompTIA Linux+ Powered by LPI 2

Practice questions for the CompTIA Linux+ Powered by LPI 2 certification exam.

4.8★★★★★(366 ratings)
18,092 studentsIntermediate
This course covers everything you need to pass the CompTIA Linux+ Powered by LPI 2 (LX0-104) exam. Each part of this course contains real exam questions taken from the actual exam pool, with hint answers to guide your study. Practice with these questions to build confidence and master the topics needed for certification success.

What you'll learn

  • Master the core concepts for LX0-104 certification
  • Practice with real exam-style questions
  • Understand platform services and architectures covered in LX0-104
  • Build confidence through timed practice exams
  • Learn from detailed hint answers and explanations
  • Pass the official LX0-104 certification exam on your first try

LX0-104

Lectures1
Questions42
Duration30 week
Students18,092

$20.00

Full Free Question Bank (42 Questions)

CompTIA Linux+ Powered by LPI 2 (LX0-104) Practice Questions & Verified Answers

Click any option to test your knowledge, or reveal the verified answer and detailed explanation below each question.

Question #1Part 1

What is the purpose of the sticky keys feature in X?

ATo assist users who have difficulty holding down multiple keys at once.
BTo prevent repeated input of a single character if the key is held down.
CTo ignore brief keystrokes according to a specified time limit.
DTo repeat the input of a single character.
Question #2Part 1

Which file, when using Sendmail or a compatible MTA system, will allow a user to redirect all of their mail to another address and is configurable by the user themselves?

A/etc/alias
B/etc/mail/forwarders
C~/.alias
D~/.forward
Question #3Part 1

How many bits make up an IPv6 address?

A32
B48
C64
D128
E256
Question #4Part 1

On a machine running several X servers, how are the different instances of the X11 server identified?

ABy a fixed UUID that is defined in the X11 configuration file.
BBy a unique IPv6 address from the fe80::/64 subnet.
CBy the name of the user that runs the X server like x11:bob.
DBy a device name like /dev/X11/xservers/1.
EBy a display name like:1.
Question #5Part 1

What is the purpose of the xhost program?

AGrant or revoke access to a X11 session.
BInstall all packages and video drivers required to run X11 on a host.
CStart the X11 server and announce its availability within the local network.
DSend informational messages to all users logged into a host using X11.
EDisplay the MOTD and other important information when a user logs in via X11.
Question #6Part 1

Which of the following commands will convert files from one character encoding to another?

Aconvert
Benc2utf
Ciconv
Dtranscode
Question #7Part 1

Which of the following are commonly used Mail Transfer Agent (MTA) applications? (Choose THREE correct answers.)

APostfix
BProcmail
CSendmail
DExim
ESMTPd
Question #8Part 1

Which of the following files is consulted when programs like netstat try to match port numbers to names?

A/etc/networks
B/etc/portmapper
C/etc/protocols
D/etc/resolv.conf
E/etc/services
Question #9Part 1

What output will the following command produce? seq 1 5 20

A1
B1
C1
D2
E5
Question #10Part 1

What of the following statements is true regarding a display manager?

AA display manager handles remote X11 logins only and has no purpose on a system that is not attached to a network.
BThe display manager is configured in the X11 configuration file xorg.conf.
CThere is only one display manager X11DM that must be started on all systems running X11.
DAfter system startup, the display manager handles the login of a user.
EWithout a display manager, no graphical programs can be run.
Question #11Part 1

Which environment variable will override all LC_* variables?

ALANG
BLC_ALL
CLC_COLLATE
DLOCALE
Question #12Part 1

Which of the following words is used to restrict the records that are returned from a SELECT SQL query based on a supplied criteria for the values in the records?

ACASE
BFROM
CWHERE
DIF
Question #13Part 1

How is a display manager started?

AIt is started by a user using the command startx.
BIt is started like any other system service by the init system.
CIt is started by inetd when a remote hosts connects to the X11 port.
DIt is started automatically when a X11 user logs in to the system console.
Question #14Part 1

Which command will set the local machine's timezone to UTC?

Acat UTC > /etc/timezone
Bln -s /usr/share/zoneinfo/UTC /etc/localtime
Cdate --timezone=UTC
Dmv /usr/timezone/UTC /etc
Question #15Part 1

What is NTP?

AA more secure protocol replacement for FTP.
BA protocol for synchronizing time on computers.
CA routing aid for finding next hops on a network.
DA simple tunnelling protocol for computers behind firewalls.
Question #16Part 1

Which of the following is a correct entry in the /etc/hosts file?

Alocalhost 127.0.0.1 localhost.localdomain
Blocalhost.localdomain localhost 127.0.0.1
Clocalhost localhost.localdomain 127.0.0.1
D127.0.0.1 localhost.localdomain localhost
Elocalhost.localdomain 127.0.0.1 localhost
Question #17Part 1

Which of the following commands lists all defined variables and functions within Bash?

Aenv
Bset
Cenv -a
Decho $ENV
Question #18Part 1

What is true regarding the time in a Linux system?

AThe BIOS clock of a computer always indicates the current local time and time zone.
BEach application must convert the Unix time to the current time zone which is usually done by using standard libraries.
CWhen the system is on the network, each query for the current time leads to a new network connection to a time server.
DWhen the system time changes, running processes must be restarted in order to get the correct time.
Question #19Part 1

Which of the following SQL queries counts the number of occurrences for each value of the field order_type in the table orders?

ASELECT order_type,COUNT(*) FROM orders WHERE order_type=order_type;
BSELECT order_type,COUNT(*) FROM orders GROUP BY order_type;
CCOUNT(SELECT order_type FROM orders);
DSELECT COUNT(*) FROM orders ORDER BY order_type;
ESELECT AUTO_COUNT FROM orders COUNT order_type;
Question #20Part 1

Which of the following configuration files should be modified to globally set shell variables for all users?

A/etc/bashrc
B/etc/profile
C~/.bash_profile
D/etc/.bashrc
Question #21Part 1

Which of the following commands shows the current color depth of the X Server?

Axcd
Bxcdepth
Cxwininfo
Dxcolordepth
Ecat /etc/X11
Question #22Part 1

What is the main difference between the batch and at commands?

AThe batch command will run multiple times. The at command will only run once.
BThe commands of a batch job run sequentially one after another while the commands in at jobs may run in parallel.
CThe at command reads commands from standard input. The batch command requires a command line argument.
DThe at command e-mails results to the user. The batch command logs results to syslog.
Question #23Part 1

What is the purpose of the dig command?

AIt can be used as a tool for querying DNS servers.
BIt can be used for searching through indexed file content.
CIt can be used to look for open ports on a system.
DIt can be used to ping all known hosts on the current subnet.
Question #24Part 1

Which of the following commands are used to manage the environment and shell variables within a shell process? (Choose TWO correct answers.)

Aexport
Binit
Creset
Dset
Etset
Question #25Part 1

For accessibility assistance, which of the following programs is an on-screen keyboard?

Axkb
Batkb
CGOK
DxOSK
Question #26Part 1

Why should a regular user edit his personal crontab by using the command crontab instead of just editing his crontab file manually?

ABecause user specific crontab entries are stored in a common database and must be extracted before editing.
BBecause crontab starts the cron daemon in case it is not running due to no other crontab entries existing.
CBecause user specific crontab entries are stored in a special directory which is maintained by the cron daemon and not writable for regular users.
DBecause crontab collects information about all users crontabs and recommends similar commands used by other users of the system.
Question #27Part 1

Why should an NTP client maintain connections to several NTP servers?

ATo receive NTP information every second as each server transmits NTP pings every five seconds only.
BTo improve the precision of the time by comparing responses from several servers.
CTo not overload the remote server in case the local NTP time cache is not enabled.
DTo not lose contact with all NTP servers in case the client changes networks.
Question #28Part 1

What is true about groups in a Linux system? (Choose TWO correct answers.)

AEach user may be a member of several groups. However, only one group is the user's primary group.
BGroups may have a password that allows users to join that group temporarily.
CEach user can only be a member of one group at a time.
DGroup memberships are optional such that there may be users that do not belong to any group.
EGroups can be nested meaning that one group can be a member of another group.
Question #29Part 1

With syslog, what is a facility?

AFacilities are different connection interfaces to syslog. Each facility has its own device in /dev/syslog/.
BFrom syslog's point of view, each Unix process that issues messages is a facility.
CFacilities describe the severity of a log message such as emerg or info.
DWhen using remote logging, the hostname of the server that generated a message is called facility.
EFacilities describe categories or groups of messages such as mail or auth.
Question #30Part 1

When issuing the command ifconfig eth0 192.168.1.20/24 up, which of the following happens? (Choose TWO correct answers.)

AThe address 192.168.1.20 is associated with the interface eth0.
BA network route to 192.168.1.0 with the netmask 255.255.255.0 pointing directly to eth0 is created.
C192.168.1.1 is probed for router functionality and, in case of success, it is added to the list of default routers.
DThe addresses from 192.168.1.20 to 192.168.1.24 are activated on the interface eth0.
EIf eth0 was configured with a previous IP address, it is retained in addition to adding the new address.
Question #31Part 1

Which of the following commands creates a function in Bash that outputs the sum of two numbers?

Afunction sumitup { echo $(($1 + $2)) ; }
Bcommand sumitup { echo $(($1 + $2)) ; }
Cfunction sumitup { echo $1 + $2 ; }
Dmethod sumitup { echo $1 + $2 ; }
Ecommand sumitup { echo $1 + $2 ; }
Question #32Part 1

Which of the following are tasks handled by a display manager like XDM or KDM? (Choose TWO correct answers.)

AStart and prepare the desktop environment for the user.
BConfigure additional devices like new monitors or projectors when they are attached.
CHandle the login of a user.
DLock the screen when the user was inactive for a configurable amount of time.
ECreate an X11 configuration file for the current graphic devices and monitors.
Question #33Part 1

Which of the following files holds the configuration for journald when running systemd?

A/etc/systemd/journalctl.conf
B/etc/systemd/journald.conf
C/etc/systemd/systemd-journald.conf
D/etc/systemd/systemd-journalctl.conf
E/usr/lib/systemd/journalctl.conf
Question #34Part 1

Which file used by XDM specifies the default wallpaper?

A/etc/X11/xdm/Xsetup
B/etc/X11/xdm.conf
C/etc/X11/xdm/Defaults
D/etc/X11/defaults.conf
Question #35Part 1

What output will the following command sequence produce? echo '1 2 3 4 5 6' | while read a b c; do echo result: $c $b $a; done

Aresult: 3 4 5 6 2 1
Bresult: 1 2 3 4 5 6
Cresult: 6 5 4
Dresult: 6 5 4 3 2 1
Eresult: 3 2 1
Question #36Part 1

What happens if the password of a user in the /etc/shadow file is prepended with the ! character?

AWhen logging in, the user automatically gets root privileges in addition to his regular privileges.
BThe password is inverted which allows the user to log in with any password other than the current password.
CThe user is disabled and all login methods, including but not limited to password based logins, are disabled.
DUpon the next log in, the user is forced to change his password.
EThe password becomes invalid which disables password based logins although other login methods remain usable.
Question #37Part 1

Which of the following commands can be used to associate open TCP ports with the processes that opened the ports?

Aptrace
Bstrace
Cdebug
Dnessus
Elsof
Question #38Part 1

When the command echo $? outputs 1, which of the following statements are true?

AIt is the process ID of the echo command.
BIt is the process ID of the current shell.
CIt is the exit value of the command executed immediately before echo.
DIt is the exit value of the echo command.
Question #39Part 1

Which of the following details can be found in an entry of a user specific crontab? (Choose TWO correct answers.)

AThe verbal description of the job.
BThe syslog facility to where the output of the job should be sent.
CThe time when the cron job should run.
DThe command that should be started by the cron job.
EThe name of the user which should run the job.
Question #40Part 1

Which of the following is observed and corrected by a NTP client?

AThe skew in time between the system clock and the hardware clock.
BThe skew in time between the system clock and the reference clock.
CChanges in the time zone of the current computer's location.
DAdjustments needed to support Daylight Saving Time.
Question #41Part 1

The X11 configuration file xorg.conf is grouped into sections. How is the content of the section SectionName associated with that section?

AIt is placed in curly brackets as in Section SectionName { ... }.
BIt is placed between a line containing Section "SectionName" and a line containing EndSection.
CIt is placed between the tags and
DIt is placed after the row [SectionName].
EIt is placed after an initial unindented Section "SectionName" and must be indented by exactly one tab character.
Question #42Part 1

Each entry in a crontab must end with what character?

ATab
BSpace
CBackslash
DNewline

📢 Unlock Full Access to Success!

"The content displayed here is a promotional preview and contains only 50% of the actual exam database. To access the complete set of updated questions, please upgrade to the Full Version."

👉 Click the button and follow the instructions to secure your full access immediately!