A user on a Linux VM is running /work/test.sh Bash script and receives the following error:bash: /work/test.sh: Permission deniedAfter further investigation, the user receives the following outputs:Which of the following commands should a systems administrator run to fix the issue?
Answer(s): A
The script /work/test.sh already has execute permissions (-rwxr--r--), but the filesystem is mounted with the noexec option, which prevents execution of binaries and scripts. Remounting the filesystem with the exec option allows execution of the script.
A systems administrator needs to set the IP address of a new DNS server. Which of the following files should the administrator modify to complete this task?
Answer(s): B
The /etc/resolv.conf file defines DNS resolver settings, including the IP addresses of DNS servers that the system should use for hostname resolution.
Following the completion of monthly server patching, a Linux administrator receives reports that a critical application is not functioning. Which of the following commands should help the administrator determine which packages were installed?
The dnf history command shows a log of past package operations (install, update, remove), allowing the administrator to review which packages were installed or updated during the patching process.
A Linux administrator wants to make the ENABLE_AUTH variable set to 1 and available to the environment of subsequently executed commands. Which of the following should the administrator use for this task?
Answer(s): D
The export command sets an environment variable and makes it available to subsequently executed commands and child processes, ensuring ENABLE_AUTH=1 is recognized system-wide in that shell session.
A Linux administrator wants to use AI to deploy infrastructure as code. Which of the following is a best practice regarding the use of AI for this task?
Answer(s): C
Linting ensures that AI-generated infrastructure-as-code (IaC) follows proper syntax, formatting, and best practices. This helps prevent errors, enforces consistency, and improves security before deployment.
Which of the following passwords is the most complex?
This password is the most complex because it uses uppercase and lowercase letters, numbers, and multiple special characters, making it significantly harder to guess or brute-force compared to the others.
A systems administrator needs to write a script that counts the number of times "FAIL" appears in a log file. If "FAIL" appears zero times, then the administrator would like to print the message "SUCCESS." Given the following:Which of the following should be used before the zero to complete the script?
The test should check if the count of "FAIL" equals zero. The operator -eq is used for numeric equality in shell conditionals, so [ $(grep -c FAIL /var/file.log) -eq 0 ] correctly evaluates whether the count is zero.
An administrator receives the following output while attempting to unmount a filesystem:umount /data1: target is busy.Which of the following commands should the administrator run next to determine why the filesystem is busy?
The lsof command lists open files and the processes using them. Running lsof | grep /data1 will show which processes are keeping the /data1 filesystem busy, preventing it from being unmounted.
Post your Comments and Discuss CompTIA XK0-006 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the XK0-006 content, but please register or login to continue.