[2023年11月] 無料XK0-005試験問題集試験点数を伸ばそう [Q61-Q76]

Share

[2023年11月] 無料XK0-005試験問題集試験点数を伸ばそう

2023年最新のXK0-005実際問題集には試験のコツがあるPDF試験材料


CompTIA Linux+認定は、ITプロフェッショナルがLinuxの管理、セキュリティ、トラブルシューティングにおける専門知識を証明し、キャリアの見通しを向上させるための優れた方法です。様々な業界でLinuxベースのシステムの需要が高まる中、CompTIA Linux+認定は、この分野に特化したいITプロフェッショナルにとってますます価値があるものになっています。

 

質問 # 61
A Linux administrator has installed a web server, a database server, and a web application on a server. The web application should be active in order to render the web pages. After the administrator restarts the server, the website displays the following message in the browser: Error establishing a database connection. The Linux administrator reviews the following relevant output from the systemd init files:

The administrator needs to ensure that the database is available before the web application is started. Which of the following should the administrator add to the HTTP server .service file to accomplish this task?

  • A. WANTEDBY=mariadb.service
  • B. ONFAILURE=mariadb.service
  • C. REQUIRES=mariadb.service
  • D. TRIGGERS=mariadb.service

正解:C


質問 # 62
A Linux administrator is scheduling a system job that runs a script to check available disk space every hour. The Linux administrator does not want users to be able to start the job. Given the following:

The Linux administrator attempts to start the timer service but receives the following error message:

Which of the following is MOST likely the reason the timer will not start?

  • A. The checkdiskspace.timer should be started using the sudo command.
  • B. The checkdiskspace.timer should be configured to allow manual starts.
  • C. The timers.target should be reloaded to get the new configuration.
  • D. The checkdiskspace.timer unit should be enabled via systemctl.

正解:B


質問 # 63
A systems administrator was tasked with assigning the temporary IP address/netmask 192.168.168.1/255.255.255.255 to the interface eth0 of a Linux server.
When adding the address, the following error appears:
# ip address add 192.168.168.1/33 dev eth0
Error: any valid prefix is expected rather than "192.168.168.1/33".
Based on the command and its output above, which of the following is the cause of the issue?

  • A. The interface eth0 does not exist.
  • B. There is no route to 192.168.168.1/33.
  • C. The IP address 192.168.168.1 is already in use.
  • D. The CIDR value /33 should be /32 instead.

正解:D

解説:
The cause of the issue is that the CIDR value /33 is invalid for an IPv4 address. The CIDR value represents the number of bits in the network prefix of an IP address, and it can range from 0 to 32 for IPv4 addresses. A CIDR value of /33 would imply a network prefix of more than 32 bits, which is impossible for an IPv4 address. To assign a temporary IP address/netmask of 192.168.168.1/255.255.255.255 to eth0, the CIDR value should be /32 instead, which means a network prefix of 32 bits and a host prefix of 0 bits. There is no route to 192.168.168.1/33 is not the cause of the issue, as the ip address add command does not check the routing table. The interface eth0 does not exist is not the cause of the issue, as the ip address add command would display a different error message if the interface does not exist. The IP address 192.168.168.1 is already in use is not the cause of the issue, as the ip address add command would display a different error message if the IP address is already in use. Reference: [CompTIA Linux+ (XK0-005) Certification Study Guide], Chapter 13: Networking Fundamentals, page 435.


質問 # 64
An administrator installed an application from source into /opt/operations1/ and has received numerous reports that users are not able to access the application without having to use the full path /opt/operations1/bin/*. Which of the following commands should be used to resolve this issue?

  • A. echo 'export PATH=$PATH/opt/operations1/bin' >> /etc/profile
  • B. echo 'export $PATH:/opt/operations1/bin' >> /etc/profile
  • C. echo 'export PATH=/opt/operations1/bin' >> /etc/profile
  • D. echo 'export PATH=$PATH:/opt/operations1/bin' >> /etc/profile

正解:D

解説:
The command echo 'export PATH=$PATH:/opt/operations1/bin' >> /etc/profile should be used to resolve the issue of users not being able to access the application without using the full path. The echo command prints the given string to the standard output. The export command sets an environment variable and makes it available to all child processes. The PATH variable contains a list of directories where the shell looks for executable files. The $PATH expands to the current value of the PATH variable. The : separates the directories in the list. The /opt/operations1/bin is the directory where the application is installed. The >> operator appends the output to the end of the file. The /etc/profile file is a configuration file that is executed when a user logs in. The command echo 'export PATH=$PATH:/opt/operations1/bin' >> /etc/profile will add the /opt/operations1/bin directory to the PATH variable for all users and allow them to access the application without using the full path. This is the correct command to use to resolve the issue. The other options are incorrect because they either overwrite the PATH variable (echo 'export PATH=/opt/operations1/bin' >> /etc/profile) or do not use the correct syntax (echo 'export PATH=$PATH/opt/operations1/bin' >> /etc/profile or echo 'export $PATH:/opt/operations1/bin' >> /etc/profile). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 9: Working with the Linux Shell, page 295.


質問 # 65
A Linux administrator is troubleshooting an issue in which an application service failed to start on a Linux server. The administrator runs a few commands and gets the following outputs:

Based on the above outputs, which of the following is the MOST likely action the administrator should take to resolve this issue?

  • A. Enable the logsearch.service and restart the service.
  • B. Increase the TimeoutStartUSec configuration for the logsearch.sevice.
  • C. Update the OnCalendar configuration to schedule the start of the logsearch.service.
  • D. Update the KillSignal configuration for the logsearch.service to use TERM.

正解:B


質問 # 66
A Linux administrator is trying to remove the ACL from the file /home/user/data. txt but receives the following error message:

Given the following analysis:

Which of the following is causing the error message?

  • A. The administrator is not using a highly privileged account.
  • B. The filesystem is mounted with the wrong options.
  • C. SELinux file context is denying the ACL changes.
  • D. File attributes are preventing file modification.

正解:D

解説:
Explanation
File attributes are preventing file modification, which is causing the error message. The output of lsattr
/home/user/data.txt shows that the file has the immutable attribute (i) set, which means that the file cannot be changed, deleted, or renamed. The command setfacl -b /home/user/data.txt tries to remove the ACL from the file, but fails because of the immutable attribute. The administrator needs to remove the immutable attribute first by using the command chattr -i /home/user/data.txt and then try to remove the ACL again. The other options are incorrect because they are not supported by the outputs. The administrator is using a highly privileged account, as shown by the # prompt. The filesystem is mounted with the correct options, as shown by the output of mount | grep /home. SELinux file context is not denying the ACL changes, as shown by the output of ls -Z /home/user/data.txt. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 11: Managing Files and Directories, pages 357-358.


質問 # 67
Users have reported that the interactive sessions were lost on a Linux server. A Linux administrator verifies the server was switched to rescue.target mode for maintenance. Which of the following commands will restore the server to its usual target?

  • A. systemctl reboot
  • B. telinit 0
  • C. systemctl get-default
  • D. systemctl emergency

正解:A


質問 # 68
A Linux administrator needs to obtain a list of all volumes that are part of a volume group. Which of the following commands should the administrator use to accomplish this task?

  • A. fdisk -1
  • B. pvs
  • C. vgs
  • D. lvs

正解:D

解説:
Explanation
The lvs command can be used to obtain a list of all volumes that are part of a volume group. This command will display information such as the name, size, attributes, and volume group of each logical volume in the system. The vgs command can be used to obtain a list of all volume groups in the system, not the volumes.
The fdisk -1 command is invalid, as -1 is not a valid option for fdisk. The pvs command can be used to obtain a list of all physical volumes in the system, not the volumes. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Disk Storage, page 461.


質問 # 69
A systems administrator wants to be sure the sudo rules just added to /etc/sudoers are valid. Which of the following commands can be used for this task?

  • A. sudo vi check
  • B. test -f /etc/sudoers
  • C. cat /etc/sudoers | tee test
  • D. visudo -c

正解:D

解説:
Explanation
The command visudo -c can be used to check the validity of the sudo rules in the /etc/sudoers file.
The visudo command is a tool for editing and validating the /etc/sudoers file, which defines the rules for the sudo command. The -c option checks the syntax and logic of the file and reports any errors or warnings. The command visudo -c will verify the sudo rules and help the administrator avoid any mistakes. This is the correct command to use for this task. The other options are incorrect because they either do not check the validity of the file (test, sudo, or cat) or do not exist (sudo vi check). References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 546.


質問 # 70
A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems.
Which of the following commands can be used together to accomplish this task? (Choose two.)

  • A. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
  • B. sysctl net.ipv4.ip_forward
  • C. sysctl -w net.ipv4.ip_forward=1
  • D. sysctl -p
  • E. echo 1 > /proc/sys/net/ipv4/ip_forward
  • F. echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf

正解:C、D

解説:
Explanation
The commands that can be used together to persistently enable IPv4 forwarding in one of the Linux systems are sysctl -w net.ipv4.ip_forward=1 and sysctl -p. The first command will use sysctl to write a new value (1) to the net.ipv4.ip_forward kernel parameter, which controls whether IP forwarding is enabled or disabled for IPv4. This will enable IP forwarding immediately without rebooting. However, this change is temporary and will be lost after a reboot or a system reload. To make it permanent, we need to use the second command sysctl -p, which will load kernel parameters from /etc/sysctl.conf file. This file contains key-value pairs of kernel parameters and their values. To make sure that net.ipv4.ip_forward is set to 1 in this file, we can either edit it manually or append it using echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf.
The other options are not correct commands for persistently enabling IPv4 forwarding. The sysctl net.ipv4.ip_forward command will only display the current value of net.ipv4.ip_forward parameter, but not change it. The echo 1 > /proc/sys/net/ipv4/ip_forward command will write 1 to /proc/sys/net/ipv4/ip_forward file, which is another way to change net.ipv4.ip_forward parameter. However, this change is also temporary and will not survive a reboot or a system reload. The echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf command will append a line to /etc/sysctl.conf file that sets net.ipv6.conf.all.forwarding parameter to 1.
However, this parameter controls whether IP forwarding is enabled or disabled for IPv6, not IPv4. References: sysctl(8) - Linux manual page; Configure Linux as a Router (IP Forwarding)


質問 # 71
A Linux engineer needs to create a custom script, cleanup.sh, to run at boot as part of the system services.
Which of the following processes would accomplish this task?

  • A. Create a unit file in the /etc/default/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup
  • B. Create a unit file in the /etc/ske1/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup
  • C. Create a unit file in the /etc/sysctl.d/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup
  • D. Create a unit file in the /etc/systemd/system/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup

正解:D

解説:
Explanation
The process that will accomplish the task of creating a custom script to run at boot as part of the system services is:
* Create a unit file in the /etc/systemd/system/ directory. A unit file is a configuration file that defines the properties and behavior of a systemd service. The systemd is a system and service manager that controls the startup and operation of Linux systems. The /etc/systemd/system/ directory is the location where the administrator can create and store custom unit files. The unit file should have a name that matches the name of the script, such as cleanup.service, and should contain the following sections and options:
* [Unit]: This section provides the general information about the service, such as the description, dependencies, and conditions. The administrator should specify the following options in this section:
* Description: A brief description of the service, such as "Custom cleanup script".
* After: The name of another unit that this service should start after, such as "network.target".
* ConditionPathExists: The path of the file or directory that must exist for the service to start, such as "/opt/scripts/cleanup.sh".
* [Service]: This section defines how the service should be started and stopped, and what commands should be executed. The administrator should specify the following options in this section:
* Type: The type of the service, such as "oneshot", which means that the service will run once and then exit.
* ExecStart: The command that will start the service, such as "/bin/bash
/opt/scripts/cleanup.sh".
* RemainAfterExit: A boolean value that indicates whether the service should remain active after the command exits, such as "yes".
* [Install]: This section defines how the service should be enabled and under what circumstances it
* should be started. The administrator should specify the following option in this section:
* WantedBy: The name of another unit that wants this service to be started, such as
"multi-user.target", which means that the service will be started when the system reaches the multi-user mode.
* Run the command systemctl enable cleanup. This command will enable the service and create the necessary symbolic links to start the service at boot.
* Run the command systemctl is-enabled cleanup. This command will check the status of the service and confirm that it is enabled.
This process will create a custom script, cleanup.sh, to run at boot as part of the system services. This is the correct process to use to accomplish the task. The other options are incorrect because they either use the wrong directory for the unit file (/etc/default/, /etc/skel/, or /etc/sysctl.d/) or do not create a unit file at all. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 15: Managing System Services, pages 457-459.


質問 # 72
A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server:

The administrator performed the commands listed below to further troubleshoot and mount the missing filesystem:

Which of the following should administrator use to resolve the device mismatch issue and mount the disk?

  • A. fsck -A
  • B. mount disk by-label
  • C. mount disk by device-id
  • D. mount disk by-blkid

正解:D


質問 # 73
A new Linux systems administrator just generated a pair of SSH keys that should allow connection to the servers. Which of the following commands can be used to copy a key file to remote servers? (Choose two.)

  • A. ftpd
  • B. ssh-copy-id
  • C. ssh-keygen
  • D. scp
  • E. ssh-keyscan
  • F. wget

正解:B、D

解説:
Explanation
The commands ssh-copy-id and scp can be used to copy a key file to remote servers. The command ssh-copy-id copies the public key to the authorized_keys file on the remote server, which allows the user to log in without a password. The command scp copies files securely over SSH, which can be used to transfer the key file to any location on the remote server. The other options are incorrect because they are not related to copying key files. The command wget downloads files from the web, the command ssh-keygen generates key pairs, the command ssh-keyscan collects public keys from remote hosts, and the command ftpd is a FTP server daemon. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, pages 408-410.


質問 # 74
An administrator accidentally deleted the /boot/vmlinuz file and must resolve the issue before the server is rebooted. Which of the following commands should the administrator use to identify the correct version of this file?

  • A. cat /etc/centos-release; rpm -Uvh --nodeps
  • B. yum -y update; shutdown -r now
  • C. telinit 1; restorecon -Rv /boot
  • D. rpm -qa | grep kernel; uname -a

正解:D


質問 # 75
A user generated a pair of private-public keys on a workstation. Which of the following commands will allow the user to upload the public key to a remote server and enable passwordless login?

  • A. scp ~/.ssh/id_rsa user@server:~/
  • B. rsync ~ /.ssh/ user@server:~/
  • C. ssh-copy-id user@server
  • D. ssh-add user server

正解:C

解説:
The command ssh-copy-id user@server will allow the user to upload the public key to a remote server and enable passwordless login. The ssh-copy-id command is a tool for copying the public key to a remote server and appending it to the authorized_keys file, which is used for public key authentication. The command will also set the appropriate permissions on the remote server to ensure the security of the key. The command ssh-copy-id user@server will copy the public key of the user to the server and allow the user to log in without a password. This is the correct command to use for this task. The other options are incorrect because they either do not copy the public key (scp, rsync, or ssh-add) or do not use the correct syntax (scp ~/.ssh/id_rsa user@server:~/ instead of scp ~/.ssh/id_rsa.pub user@server:~/ or rsync ~ /.ssh/ user@server:~/ instead of rsync ~/.ssh/id_rsa.pub user@server:~/). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, page 410.


質問 # 76
......

心強いXK0-005のPDF問題集はXK0-005問題:https://www.jpntest.com/shiken/XK0-005-mondaishu

正真正銘のXK0-005問題集で無料PDF問題で合格させる:https://drive.google.com/open?id=1hEqiwkaPqlms0iuOCI_42j0U5FRcgzym

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡