ExamGecko
Home Home / CompTIA / XK0-005

CompTIA XK0-005 Practice Test - Questions Answers, Page 15

Question list
Search
Search

List of questions

Search

Related questions











Which of the following enables administrators to configure and enforce MFA on a Linux system?

A.
Kerberos
A.
Kerberos
Answers
B.
SELinux
B.
SELinux
Answers
C.
PAM
C.
PAM
Answers
D.
PKI
D.
PKI
Answers
Suggested answer: C

Explanation:

The mechanism that enables administrators to configure and enforce MFA on a Linux system is PAM. PAM stands for Pluggable Authentication Modules, which is a framework for managing authentication and authorization on Linux systems. PAM allows the administrator to define the rules and policies for accessing various system resources and services, such as login, sudo, ssh, or cron.

PAM also supports different types of authentication methods, such as passwords, tokens, biometrics, or smart cards. PAM can be used to implement MFA, which stands for Multi-Factor Authentication, which is a security technique that requires the user to provide more than one piece of evidence to prove their identity. MFA can enhance the security of the system and prevent unauthorized access.

PAM enables administrators to configure and enforce MFA on a Linux system. This is the correct answer to the question. The other options are incorrect because they either do not manage authentication and authorization on Linux systems (Kerberos or PKI) or do not support MFA (SELinux). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 17:

Implementing Basic Security, page 517.

A systems administrator is tasked with creating an Ansible playbook to automate the installation of patches on several Linux systems. In which of the following languages should the playbook be written?

A.
SQL
A.
SQL
Answers
B.
YAML
B.
YAML
Answers
C.
HTML
C.
HTML
Answers
D.
JSON
D.
JSON
Answers
Suggested answer: B

Explanation:

The language that the playbook should be written in is YAML. YAML stands for YAML Ain't Markup Language, which is a human-readable data serialization language. YAML is commonly used for configuration files and data exchange. YAML uses indentation, colons, dashes, and brackets to represent the structure and values of the data. YAML also supports comments, variables, expressions, and functions. Ansible is an open-source tool for automating tasks and managing configuration on Linux systems. Ansible uses YAML to write playbooks, which are files that define the desired state and actions for the systems. Playbooks can be used to automate the installation of patches on several Linux systems by specifying the hosts, tasks, modules, and parameters. The language that the playbook should be written in is YAML. This is the correct answer to the question.

The other options are incorrect because they are not the languages that Ansible uses for playbooks (SQL, HTML, or JSON). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18:

Securing Linux Systems, page 549.

A Linux administrator is providing a new Nginx image from the registry to local cache. Which of the following commands would allow this to happen?

A.
docker pull nginx
A.
docker pull nginx
Answers
B.
docker attach nginx
B.
docker attach nginx
Answers
C.
docker commit nginx
C.
docker commit nginx
Answers
D.
docker import nginx
D.
docker import nginx
Answers
Suggested answer: A

Explanation:

The command that would allow this to happen is docker pull nginx. Docker is a software platform that allows the administrator to create, run, and manage containers on Linux systems. Containers are isolated and lightweight environments that can run applications and services without affecting the host system. Docker uses images to create containers, which are files that contain the code, libraries, dependencies, and configuration of the applications and services. Docker uses a registry to store and distribute images, which is a service that hosts and serves images. Docker Hub is the default public registry that provides a large number of official and community images. Nginx is a popular web server and reverse proxy that can run as a container. The command docker pull nginx will download the latest version of the Nginx image from the Docker Hub registry to the local cache, which is the storage location for the images on the host system. This will allow the administrator to provide a new Nginx image from the registry to the local cache. This is the correct command to use to accomplish the task. The other options are incorrect because they either do not download an image from the registry (docker attach nginx or docker commit nginx) or do not exist (docker import nginx). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 19: Managing Cloud and Virtualization Technologies, page 571.

In which of the following filesystems are system logs commonly stored?

A.
/var
A.
/var
Answers
B.
/tmp
B.
/tmp
Answers
C.
/etc
C.
/etc
Answers
D.
/opt
D.
/opt
Answers
Suggested answer: A

Explanation:

The filesystem that system logs are commonly stored in is /var. The /var filesystem is a directory that contains variable data files on Linux systems. Variable data files are files that are expected to grow in size over time, such as logs, caches, spools, and temporary files. The /var filesystem is separate from the / filesystem, which contains the essential system files, to prevent the / filesystem from being filled up by the variable data files. The system logs are files that record the events and activities of the system and its components, such as the kernel, the services, the applications, and the users. The system logs are useful for monitoring, troubleshooting, and auditing the system. The system logs are commonly stored in the /var/log directory, which is a subdirectory of the /var filesystem. The /var/log directory contains various log files, such as syslog, messages, dmesg, auth.log, and kern.log.

The filesystem that system logs are commonly stored in is /var. This is the correct answer to the question. The other options are incorrect because they are not the filesystems that system logs are commonly stored in (/tmp, /etc, or /opt). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 16: Managing Logging and Monitoring, page 487.

Which of the following data structures is written in JSON?

A)

B)

C)

D)

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
D.
Option D
D.
Option D
Answers
Suggested answer: C

Explanation:

Option C is the only data structure that is written in JSON format. JSON stands for JavaScript Object Notation, and it is a lightweight and human-readable data interchange format. JSON uses curly braces to enclose objects, which consist of key-value pairs separated by commas. JSON uses square brackets to enclose arrays, which consist of values separated by commas. JSON supports six data types: strings, numbers, booleans, null, objects, and arrays. Option C follows these rules and syntax of JSON, while the other options do not. Option A is written in XML format, which uses tags to enclose elements and attributes. Option B is written in YAML format, which uses indentation and colons to define key-value pairs. Option D is written in INI format, which uses sections and equal signs to define key-value pairs. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 21: Automating Tasks with Ansible, page 591.

A Linux engineer needs to download a ZIP file and wants to set the nice of value to -10 for this new process. Which of the following commands will help to accomplish the task?

A.
$ nice -v -10 wget https://foo.com/installation.zip
A.
$ nice -v -10 wget https://foo.com/installation.zip
Answers
B.
$ renice -v -10 wget https://foo.com/installation.2ip
B.
$ renice -v -10 wget https://foo.com/installation.2ip
Answers
C.
$ renice -10 wget https://foo.com/installation.zip
C.
$ renice -10 wget https://foo.com/installation.zip
Answers
D.
$ nice -10 wget https://foo.com/installation.zip
D.
$ nice -10 wget https://foo.com/installation.zip
Answers
Suggested answer: D

Explanation:

The nice -10 wget https://foo.com/installation.zip command will help to accomplish the task of downloading a ZIP file and setting the nice value to -10 for this new process. The nice command can be used to run a program with a modified scheduling priority, which affects how much CPU time the process receives. The nice value ranges from -20 (highest priority) to 19 (lowest priority), and the default value is 0. The -10 option specifies the nice value to be used for the wget command, which will download the ZIP file from the given URL. The nice -v -10 wget https://foo.com/installation.zip command is incorrect, as -v is not a valid option for nice. The renice -v -10 wget

https://foo.com/installation.zip command is incorrect, as renice is used to change the priority of an existing process, not a new one. The renice -10 wget https://foo.com/installation.zip command is incorrect for the same reason as above. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 15: Managing Memory and Process Execution, page 469.

A Linux systems administrator needs to copy files and directories from Server A to Server B. Which of the following commands can be used for this purpose? (Select TWO)

A.
rsyslog
A.
rsyslog
Answers
B.
cp
B.
cp
Answers
C.
rsync
C.
rsync
Answers
D.
reposync
D.
reposync
Answers
E.
scp
E.
scp
Answers
F.
ssh
F.
ssh
Answers
Suggested answer: C, E

Explanation:

The rsync and scp commands can be used to copy files and directories from Server A to Server B.

Both commands can use SSH as a secure protocol to transfer data over the network. The rsync command can synchronize files and directories between two locations, using various options to control the copying behavior. The scp command can copy files and directories between two hosts, using similar syntax as cp. The rsyslog command is used to manage system logging, not file copying.

The cp command is used to copy files and directories within a single host, not between two hosts.

The reposync command is used to synchronize a remote yum repository to a local directory, not copy files and directories between two hosts. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Networking Fundamentals, pages 440-441.

After installing a new version of a package, a systems administrator notices a new version of the corresponding, service file was Installed In order to use the new version of the, service file, which of the following commands must be Issued FIRST?

A.
systemctl status
A.
systemctl status
Answers
B.
systemctl stop
B.
systemctl stop
Answers
C.
systemctl reinstall
C.
systemctl reinstall
Answers
D.
systemctl daemon-reload
D.
systemctl daemon-reload
Answers
Suggested answer: D

Explanation:

After installing a new version of a package that includes a new version of the corresponding service file, the systemctl daemon-reload command must be issued first in order to use the new version of the service file. This command will reload the systemd manager configuration and read all unit files that have changed on disk. This will ensure that systemd recognizes the new service file and applies its settings correctly. The systemctl status command will display information about a service unit, but it will not reload the configuration. The systemctl stop command will stop a service unit, but it will not reload the configuration. The systemctl reinstall command does not exist. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 17: System Maintenance and Operation, page 518.

An administrator recently updated the BIND software package and would like to review the default configuration that shipped with this version. Which of the following files should the administrator review?

A.
/etc/named.conf.rpmnew
A.
/etc/named.conf.rpmnew
Answers
B.
/etc/named.conf.rpmsave
B.
/etc/named.conf.rpmsave
Answers
C.
/etc/named.conf
C.
/etc/named.conf
Answers
D.
/etc/bind/bind.conf
D.
/etc/bind/bind.conf
Answers
Suggested answer: A

Explanation:

After installing a new version of a package that includes a configuration file that already exists on the system, such as /etc/httpd/conf/httpd.conf, RPM will create a new file with the .rpmnew extension instead of overwriting the existing file. This allows the administrator to review the default configuration that shipped with this version and compare it with the current configuration before deciding whether to merge or replace the files. The /etc/named.conf.rpmsave file is created by RPM when a package is uninstalled and it contains a configuration file that was modified by the administrator. This allows the administrator to restore the configuration file if needed. The /etc/named.conf file is the main configuration file for the BIND name server, not the httpd web server. The /etc/bind/bind.conf file does not exist by default in Linux systems. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 19: Managing Packages and Software, page 561.

In order to copy data from another VLAN, a systems administrator wants to temporarily assign IP address 10.0.6 5/24 to the newly added network interface enp1s0f1. Which of the following commands should the administrator run to achieve the goal?

A.
ip addr add 10.0.6.5/24 dev enpls0f1
A.
ip addr add 10.0.6.5/24 dev enpls0f1
Answers
B.
echo "IPV4_ADDRESS=10.0.6.5/24" > /etc/sysconfig/network-scripts/ifcfg-enplsOfl
B.
echo "IPV4_ADDRESS=10.0.6.5/24" > /etc/sysconfig/network-scripts/ifcfg-enplsOfl
Answers
C.
ifconfig 10.0.6.5/24 enpsIs0f1
C.
ifconfig 10.0.6.5/24 enpsIs0f1
Answers
D.
nmcli conn add lpv4.address-10.0.6.5/24 ifname enpls0f1
D.
nmcli conn add lpv4.address-10.0.6.5/24 ifname enpls0f1
Answers
Suggested answer: A

Explanation:

The command ip addr add 10.0.6.5/24 dev enp1s0f1 will achieve the goal of temporarily assigning IP address 10.0.6.5/24 to the newly added network interface enp1s0f1. The ip command is a tool for managing network interfaces and routing on Linux systems. The addr option specifies the address manipulation mode. The add option adds a new address to an interface. The 10.0.6.5/24 is the IP address and the subnet mask in CIDR notation. The dev option specifies the device name.

The enp1s0f1 is the name of the network interface. The command ip addr add 10.0.6.5/24 dev enp1s0f1 will add the IP address 10.0.6.5/24 to the network interface enp1s0f1, which will allow the administrator to copy data from another VLAN. This is the correct command to use to achieve the goal. The other options are incorrect because they either do not add a new address to an interface (echo "IPV4_ADDRESS=10.0.6.5/24" > /etc/sysconfig/network-scripts/ifcfg-enp1s0f1 or ifconfig 10.0.6.5/24 enp1s0f1) or do not use the correct syntax for the command (nmcli conn add ipv4.address-10.0.6.5/24 ifname enp1s0f1 instead of nmcli conn add type ethernet ipv4.address 10.0.6.5/24 ifname enp1s0f1). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 12: Managing Network Connections, page 385.

Total 371 questions
Go to page: of 38