Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA Exam XK0-005 Topic 10 Question 10 Discussion

Actual exam question for CompTIA's XK0-005 exam
Question #: 10
Topic #: 10
[All XK0-005 Questions]

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.)

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Delila
25 days ago
I bet the admin was trying to run the script with 'chmod +x test.exe'. Wrong file extension, my friend!
upvoted 0 times
Arlette
7 days ago
B: They should create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.
upvoted 0 times
...
Lashawnda
9 days ago
A: The admin should add #!/bin/bash to the bottom of the script.
upvoted 0 times
...
...
Leota
1 months ago
I heard the admin tried to run the script with 'sudo chmod +x test.sh' but forgot the 'sudo' part. Classic rookie mistake!
upvoted 0 times
Vivan
8 days ago
B: They should also create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.
upvoted 0 times
...
Lashawnda
13 days ago
A: The admin should add #!/bin/bash to the bottom of the script.
upvoted 0 times
...
...
Jutta
1 months ago
Shutting down the computer? Are you kidding me? That's like using a sledgehammer to crack a nut. A is the obvious choice here.
upvoted 0 times
...
Azzie
1 months ago
Why would you create a systemd service for a simple script? That's overkill. Just add the shebang line and make it executable. A is the simple solution.
upvoted 0 times
Merilyn
10 days ago
B) Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.
upvoted 0 times
...
Xenia
18 days ago
A) Add #!/bin/bash to the bottom of the script.
upvoted 0 times
...
Derick
25 days ago
B) Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.
upvoted 0 times
...
Marci
1 months ago
A) Add #!/bin/bash to the bottom of the script.
upvoted 0 times
...
...
Mica
2 months ago
Restarting the computer won't help here. The script needs to be properly set up, not the system. I'd say A and B are the way to go.
upvoted 0 times
Lucille
7 days ago
B) Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.
upvoted 0 times
...
Ira
1 months ago
A) Add #!/bin/bash to the bottom of the script.
upvoted 0 times
...
...
Tegan
2 months ago
I also think creating a unit file for the new service in /etc/systemd/system/ might be necessary.
upvoted 0 times
...
Joye
2 months ago
The issue is likely that the script doesn't have the shebang line, which specifies the interpreter to use. I'd go with option A - adding #!/bin/bash to the top of the script.
upvoted 0 times
Casie
25 days ago
User 2: Yeah, that sounds like the right solution. Let's go with option A.
upvoted 0 times
...
Crissy
1 months ago
User 1: I think adding #!/bin/bash to the script should fix the issue.
upvoted 0 times
...
...
Shaniqua
2 months ago
I agree with Eugene, that could help address the issue.
upvoted 0 times
...
Eugene
2 months ago
I think the administrator should add #!/bin/bash to the bottom of the script.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77