📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    How can you make a shell script

    executable?
    A By saving with .sh extension Correct Answer Incorrect Answer
    B By using chmod +x script.sh Correct Answer Incorrect Answer
    C By using run script.sh Correct Answer Incorrect Answer
    D By moving it to /bin directory Correct Answer Incorrect Answer
    E By compiling it Correct Answer Incorrect Answer

    Solution

    The chmod +x command adds execute permissions, allowing the script to be run directly from the terminal.

    Practice Next
    ask-question