Bird
0
0

Which command correctly makes a script named myscript.sh executable?

easy🧠 Conceptual Q2 of 15
Bash Scripting - Basics
Which command correctly makes a script named myscript.sh executable?
Achmod -x myscript.sh
Bchmod +x myscript.sh
Cchmod 000 myscript.sh
Dchmod 777 myscript.sh
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to add execute permission

    chmod +x adds execute permission to the file.
  2. Step 2: Check other options

    chmod -x removes execute permission, chmod 000 removes all permissions, and chmod 777 adds all permissions but is not the minimal correct answer.
  3. Final Answer:

    chmod +x myscript.sh -> Option B
  4. Quick Check:

    chmod +x = add execute permission [OK]
Quick Trick: Use +x to add execute permission, not -x [OK]
Common Mistakes:
MISTAKES
  • Using chmod -x instead of +x
  • Setting permissions to 000 disables access
  • Using 777 is over-permissive

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes