売れ筋トップクラスのXK0-005最新試験問題2024年最新のCompTIA試験練習 [Q124-Q141]

Share

売れ筋トップクラスのXK0-005最新試験問題2024年最新のCompTIA試験練習

Linux+問題集でXK0-005試験は完全版問題で試験学習ガイド


Comptia Linux+認定試験は、90の複数選択とパフォーマンスベースの質問で構成されています。この試験は、Linuxベースのシステムのさまざまな分野で候補者の知識とスキルをテストするように設計されています。この試験は英語、日本、ポルトガル語で利用でき、候補者は90分を完了するために与えられます。試験に合格するには、候補者は900のうち最低720を獲得する必要があります。

 

質問 # 124
A Linux administrator is troubleshooting SSH connection issues from one of the workstations.
When users attempt to log in from the workstation to a server with the IP address 104.21.75.76, they receive the following message:

The administrator reviews the information below:


Which of the following is causing the connectivity issue?

  • A. The server's firewall is preventing connections from being made.
  • B. The server has an incorrect default gateway configuration.
  • C. The workstation has the wrong IP settings.
  • D. The sshd service is disabled.

正解:A

解説:
Explanation
The server's firewall is preventing connections from being made, which is causing the connectivity issue. The output of iptables -L -n shows that the firewall is blocking all incoming traffic on port 22, which is the default port for SSH. The output of ssh -v [email protected] shows that the connection is refused by the server. To resolve the issue, the administrator needs to allow port 22 on the firewall. The other options are incorrect because they are not supported by the outputs. The workstation has the correct IP settings, as shown by the output of ip addr show. The sshd service is enabled and running, as shown by the output of systemct1 status sshd. The server has the correct default gateway configuration, as shown by the output of ip route show. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, pages 406-407.


質問 # 125
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. telinit 0
  • B. systemctl reboot
  • C. systemctl emergency
  • D. systemctl get-default

正解:B


質問 # 126
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 configured to allow manual starts.
  • B. The checkdiskspace.timer should be started using the sudo command.
  • C. The timers.target should be reloaded to get the new configuration.
  • D. The checkdiskspace.timer unit should be enabled via systemctl.

正解:A


質問 # 127
Users have been unable to reach www.comptia.org from a Linux server. A systems administrator is troubleshooting the issue and does the following:

Based on the information above, which of the following is causing the issue?

  • A. The server 192.168.168.53 is unreachable.
  • B. The network interface eth0 is disconnected.
  • C. No default route is set on the server.
  • D. The name www.comptia.org does not point to a valid IP address.

正解:A

解説:
Explanation
The issue is caused by the server 192.168.168.53 being unreachable. This server is the DNS server configured in the /etc/resolv.conf file, which is used to resolve domain names to IP addresses. The ping command shows that the server cannot be reached, and the nslookup command shows that the name www.comptia.org cannot be resolved using this server. The other options are incorrect because:
The name www.comptia.org does point to a valid IP address, as shown by the nslookup command using another DNS server (8.8.8.8).
The default route is set on the server, as shown by the ip route command, which shows a default gateway of 192.168.168.1.
The network interface eth0 is connected, as shown by the ip link command, which shows a state of UP for eth0. References: CompTIA Linux+ Study Guide, Fourth Edition, page 457-458, 461-462.


質問 # 128
A systems administrator is checking the system logs. The administrator wants to look at the last 20 lines of a log. Which of the following will execute the command?

  • A. tail -c 20
  • B. tail -n 20
  • C. tail -l 20
  • D. tail -v 20

正解:B

解説:
The command tail -n 20 will display the last 20 lines of a file. The -n option specifies the number of lines to show. This is the correct command to execute the task. The other options are incorrect because they either use the wrong options (-v, -c, or -l) or have the wrong arguments (20 instead of 20 filename). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 11: Managing Files and Directories, page 352.


質問 # 129
A Linux systems administrator is configuring a new filesystem that needs the capability to be mounted persistently across reboots. Which of the following commands will accomplish this task? (Choose two.)

  • A. echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab
  • B. fsck /dev/sdc1
  • C. df -h /data
  • D. fdisk -l /dev/sdc1
  • E. echo "/data /dev/sdc1 ext4 defaults 0 0" >> /etc/fstab
  • F. mkfs.ext4 /dev/sdc1

正解:A、F

解説:
"modify the /etc/fstab text file to automatically mount the new partition by opening it in an editor and adding the following line:
/dev/ xxx 1 /data ext4 defaults 1 2
where xxx is the device name of the storage device"
https://learning.oreilly.com/library/view/mastering-linux-system/9781119794455/b01.xhtml To configure a new filesystem that needs the capability to be mounted persistently across reboots, two commands are needed: mkfs.ext4 /dev/sdc1 and echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab. The first command creates an ext4 filesystem on the device /dev/sdc1, which is the partition that will be used for the new filesystem. The second command appends a line to the /etc/fstab file, which is the configuration file that controls persistent mount points of filesystems. The line specifies the device name, the mount point (/data), the filesystem type (ext4), the mount options (defaults), and the dump and pass values (0 0). The other commands are incorrect because they either do not create or configure a filesystem, or they have wrong syntax or arguments. Reference: CompTIA Linux+ Study Guide, Fourth Edition, page 409-410, 414-415.


質問 # 130
A Linux system fails to start and delivers the following error message:

Which of the following commands can be used to address this issue?

  • A. fsck.ext4 /dev/sda1
  • B. mkfs.ext4 /dev/sda1
  • C. fdisk /dev/sda1
  • D. partprobe /dev/sda1

正解:A

解説:
Explanation
The command fsck.ext4 /dev/sda1 can be used to address the issue. The issue is caused by a corrupted filesystem on the /dev/sda1 partition. The error message shows that the filesystem type is ext4 and the superblock is invalid. The command fsck.ext4 is a tool for checking and repairing ext4 filesystems. The command will scan the partition for errors and attempt to fix them. This command can resolve the issue and allow the system to start. The other options are incorrect because they either do not fix the filesystem (partprobe or fdisk) or destroy the data on the partition (mkfs.ext4). References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Storage, page 325.


質問 # 131
A Linux administrator intends to start using KVM on a Linux server. Which of the following commands will allow the administrator to load the KVM module as well as any related dependencies?

  • A. modprobe kvm
  • B. insmod kvm
  • C. hotplug kvm
  • D. depmod kvm

正解:A

解説:
Explanation
This command will load the KVM module as well as any related dependencies, such as kvm-intel or kvm-amd, depending on the processor type. The modprobe command is a Linux utility that reads the /etc/modules.conf file and adds or removes modules from the kernel. It also resolves any dependencies between modules, so that they are loaded in the correct order.
The other options are incorrect because:
B: insmod kvm
This command will only load the KVM module, but not any related dependencies. The insmod command is a low-level Linux utility that inserts a single module into the kernel. It does not resolve any dependencies between modules, so they have to be loaded manually.
C: depmod kvm
This command will not load the KVM module at all, but only create a list of module dependencies for modprobe to use. The depmod command is a Linux utility that scans the installed modules and generates a file called modules.dep that contains dependency information for each module.
D: hotplug kvm
This command is invalid and does not exist. The hotplug mechanism is a feature of the Linux kernel that allows devices to be added or removed while the system is running. It does not have anything to do with loading modules.


質問 # 132
A junior administrator is trying to set up a passwordless SSH connection to one of the servers. The administrator follows the instructions and puts the key in the authorized_key file at the server, but the administrator is still asked to provide a password during the connection.
Given the following output:

Which of the following commands would resolve the issue and allow an SSH connection to be established without a password?

  • A. systemct1 restart sshd.service
  • B. restorecon -rv .ssh/authorized_key
  • C. mv .ssh/authorized_key .ssh/authorized_keys
  • D. chmod 600 mv .ssh/authorized_key

正解:C

解説:
Explanation
The command mv .ssh/authorized_key .ssh/authorized_keys will resolve the issue and allow an SSH connection to be established without a password. The issue is caused by the incorrect file name of the authorized key file on the server. The file should be named authorized_keys, not authorized_key.
The mv command will rename the file and fix the issue. The other options are incorrect because they either do not affect the file name (restorecon or chmod) or do not restart the SSH service (systemct1). References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, page 410.


質問 # 133
A Linux administrator is troubleshooting the root cause of a high CPU load and average.

Which of the following commands will permanently resolve the issue?

  • A. renice -n -20 6295
  • B. pstree -p 6295
  • C. iostat -cy 1 5
  • D. kill -9 6295

正解:A


質問 # 134
Application code is stored in Git. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app . conf, in the repository. Which of the following should the engineer do to prevent the file from being uploaded to the repository?

  • A. Add app . conf to . gitignore.
  • B. Add app . conf to . exclude.
  • C. Run git exclude app. conf.
  • D. Run git stash app. conf.

正解:A

解説:
This will prevent the file app.conf from being tracked by Git and uploaded to the repository. The .gitignore file is a special file that contains patterns of files and directories that Git should ignore. Any file that matches a pattern in the .gitignore file will not be staged, committed, or pushed to the remote repository. The .gitignore file should be placed in the root directory of the repository and committed along with the other files.
The other options are incorrect because:
A) Run git exclude app.conf
This is not a valid Git command. There is no such thing as git exclude. The closest thing is git update-index --assume-unchanged, which tells Git to temporarily ignore changes to a file, but it does not prevent the file from being uploaded to the repository.
B) Run git stash app.conf
This will temporarily save the changes to the file app.conf in a stash, which is a hidden storage area for uncommitted changes. However, this does not prevent the file from being tracked by Git or uploaded to the repository. The file will still be part of the working tree and the index, and it will be restored when the stash is popped or applied.
C) Add app.conf to .exclude
This will have no effect, because Git does not recognize a file named .exclude. The only files that Git uses to ignore files are .gitignore, $GIT_DIR/info/exclude, and core.excludesFile.
Reference:
Git - gitignore Documentation
.gitignore file - ignoring files in Git | Atlassian Git Tutorial
Ignoring files - GitHub Docs
[CompTIA Linux+ Certification Exam Objectives]


質問 # 135
An administrator added the port 2222 for the SSH server on myhost and restarted the SSH server. The administrator noticed issues during the startup of the service. Given the following outputs:

Which of the following commands will fix the issue?

  • A. semanage port -a -t ssh_port_t -p tcp 2222
  • B. firewall-cmd -- zone=public -- add-port=2222/tcp
  • C. chcon system_u:object_r:ssh_home_t /etc/ssh/*
  • D. iptables -A INPUT -p tcp -- dport 2222 -j ACCEPT

正解:A

解説:
Explanation
The correct answer is A. semanage port -a -t ssh_port_t -p tcp 2222
This command will allow the SSH server to bind to port 2222 by adding it to the SELinux policy. The semanage command is a utility for managing SELinux policies. The port subcommand is used to manage network port definitions. The -a option is used to add a new record, the -t option is used to specify the SELinux type, the -p option is used to specify the protocol, and the tcp 2222 argument is used to specify the port number. The ssh_port_t type is the default type for SSH ports in SELinux.
The other options are incorrect because:
B: chcon system_u:object_r:ssh_home_t /etc/ssh/*
This command will change the SELinux context of all files under /etc/ssh/ to system_u:object_r:ssh_home_t, which is not correct. The ssh_home_t type is used for user home directories that are accessed by SSH, not for SSH configuration files. The correct type for SSH configuration files is sshd_config_t.
C: iptables -A INPUT -p tcp --dport 2222 -j ACCEPT
This command will add a rule to the iptables firewall to accept incoming TCP connections on port 2222.
However, this is not enough to fix the issue, as SELinux will still block the SSH server from binding to that port. Moreover, iptables may not be the default firewall service on some Linux distributions, such as Fedora or CentOS, which use firewalld instead.
D: firewall-cmd --zone=public --add-port=2222/tcp
This command will add a rule to the firewalld firewall to allow incoming TCP connections on port 2222 in the public zone. However, this is not enough to fix the issue, as SELinux will still block the SSH server from binding to that port. Moreover, firewalld may not be installed or enabled on some Linux distributions, such as Ubuntu or Debian, which use iptables instead.
References:
How to configure SSH to use a non-standard port with SELinux set to enforcing Change SSH Port on CentOS/RHEL/Fedora With SELinux Enforcing How to change SSH port when SELinux policy is enabled


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

Given the following analysis:

Which of the following is causing the error message?

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

正解:B

解説:
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. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 11: Managing Files and Directories, pages 357-358.


質問 # 137
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 configured to allow manual starts.
  • B. The checkdiskspace.timer should be started using the sudo command.
  • C. The checkdiskspace.timer unit should be enabled via systemct1.
  • D. The timers.target should be reloaded to get the new configuration.

正解:A

解説:
Explanation
The most likely reason the timer will not start is that the checkdiskspace.timer should be configured to allow manual starts. By default, systemd timers do not allow manual activation via systemct1 start, unless they have RefuseManualStart=no in their [Unit] section. This option prevents users from accidentally starting timers that are meant to be controlled by other mechanisms, such as calendar events or dependencies. To enable manual starts for checkdiskspace.timer, the administrator should add RefuseManualStart=no to its [Unit] section and reload systemd.
The other options are not correct reasons for the timer not starting. The checkdiskspace.timer unit does not need to be enabled via systemct1 enable, because enabling a timer only makes it start automatically at boot time or after a system reload, but does not affect manual activation. The timers.target does not need to be reloaded to get the new configuration, because reloading a target only affects units that have a dependency on it, but does not affect manual activation. The checkdiskspace.timer does not need to be started using the sudo command, because the administrator is already running systemct1 as root, as indicated by the # prompt. References: systemd.timer(5) - Linux manual page; systemct1(1) - Linux manual page


質問 # 138
A systems administrator is investigating a service that is not starting up. Given the following information:

Which of the following systemd commands should the administrator use in order to obtain more details about the failing service?

  • A. sysctl -a network
  • B. systemctl info network
  • C. journalctl -xu network
  • D. systemctl analyze network

正解:C

解説:
Explanation
The systemd is a system and service manager for Linux systems that provides a standard way to control and monitor system services. The systemd uses various commandsand tools to manage and troubleshoot system services, such as systemctl, sysctl, and journalctl. The systemctl command is used to start, stop, enable, disable, restart, reload, status, and list system services. The sysctl command is used to configure kernel parameters at runtime. The journalctl command is used to view and filter the logs of system services.
To investigate a service that is not starting up, the administrator can use the journalctl command with the -xu option. The -x option enables verbose output that includes explanatory text and priority information.
The -u option filters the output by a specific unit name, such as network.service. Therefore, the command journalctl -xu network will show detailed logs of the network service, which can help identify the cause of the failure. The statement D is correct.
The statements A, B, and C are incorrect because they do not provide more details about the failing service.
The systemctl analyze network command does not exist. The systemctl info network command shows basic information about the network unit, such as description, load state, active state, sub state, and main PID.
The sysctl -a network command shows all kernel parameters related to network settings. References: [How to Use Systemd to Manage System Services]


質問 # 139
A Linux administrator has been tasked with installing the most recent versions of packages on a RPM-based OS. Which of the following commands will accomplish this task?

  • A. apt-get upgrade
  • B. rpm -a
  • C. dnf update
  • D. yum updateinfo
  • E. yum check-update

正解:C


質問 # 140
A systems administrator is implementing a new service task with systems at startup and needs to execute a script entitled test.sh with the following content:

The administrator tries to run the script after making it executable with chmod +x; however, the script will not run. Which of the following should the administrator do to address this issue? (Choose two.)

  • A. Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.
  • B. Restart the computer to enable the new service.
  • C. Create a unit file for the new service in /etc/init.d with the name helpme.service in the location.
  • D. Add #!//bin/bash to the top of the script.
  • E. Shut down the computer to enable the new service.
  • F. Add #!/bin/bash to the bottom of the script.

正解:A、D

解説:
Explanation
The administrator should do the following two things to address the issue:
Add #!/bin/bash to the top of the script. This is called a shebang line and it tells the system which interpreter to use to execute the script. Without this line, the script will not run properly. The shebang line should be the first line of the script and should start with #! followed by the path to the interpreter.
In this case, the interpreter is bash and the path is /bin/bash. The other option (A) is incorrect because the shebang line should be at the top, not the bottom of the script.
Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location. This is necessary to register the script as a systemd service and enable it to run at startup. A unit file is a configuration file that defines the properties and behavior of a service, such as the description, dependencies, start and stop commands, and environment variables. The unit file should have the extension .service and should be placed in the /etc/systemd/system/ directory. The other option (E) is incorrect because /etc/init.d is the directory for init scripts, not systemd services.
References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Processes and Scheduling Tasks, pages 429-430.


質問 # 141
......


CompTIA Linux+ 認定試験に備えるために、候補者は、学習ガイド、練習問題、オンラインコースなどのさまざまな学習リソースを活用することができます。これらのリソースは、試験目標を理解し、実際の試験に備えるのに役立ちます。さらに、仮想ラボを利用するか、自分自身の Linux 環境を構築することで、Linux システムの実践的な経験を積むこともできます。

 

最善な方法で問題集を使おう!練習テストならこれCompTIA XK0-005:https://www.jpntest.com/shiken/XK0-005-mondaishu

XK0-005問題集を無料提供しております!試験問題と解答:https://drive.google.com/open?id=1M6-yLTXmaRWJksLdB8OvEgIQD6etb5Uz

弊社を連絡する

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

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

サポート:現在連絡