Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - 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
1 months ago
I bet the admin was trying to run the script with 'chmod +x test.exe'. Wrong file extension, my friend!
upvoted 0 times
Brittani
2 days ago
B: Creating a unit file will help with running the script as a service.
upvoted 0 times
...
Audria
5 days ago
A: That's right, adding #!/bin/bash is important for script execution.
upvoted 0 times
...
Arlette
13 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
15 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
14 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
19 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
2 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
16 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
24 days ago
A) Add #!/bin/bash to the bottom of the script.
upvoted 0 times
...
Derick
1 months 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
Fausto
2 days ago
C) Add #!//bin/bash to the top of the script.
upvoted 0 times
...
Kimi
4 days ago
Yeah, those two steps should fix the issue.
upvoted 0 times
...
Lucille
13 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
2 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
1 months 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