0
0
Bash Scriptingscripting~10 mins

Making scripts executable (chmod +x) in Bash Scripting - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to make the script named myscript.sh executable.

Bash Scripting
chmod [1] myscript.sh
Drag options to blanks, or click blank then click option'
A+x
B-r
C-w
D+r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -r or -w which remove permissions instead of adding execute.
Using +r which only adds read permission, not execute.
2fill in blank
medium

Complete the command to make the script run.sh executable for the user only.

Bash Scripting
chmod u[1] run.sh
Drag options to blanks, or click blank then click option'
A-x
B-r
C+r
D+x
Attempts:
3 left
💡 Hint
Common Mistakes
Using -x which removes execute permission.
Using +r which adds read permission, not execute.
3fill in blank
hard

Fix the error in the command to make script.sh executable for all users.

Bash Scripting
chmod [1] script.sh
Drag options to blanks, or click blank then click option'
Aa+x
Bu-x
Ca-x
Dg-x
Attempts:
3 left
💡 Hint
Common Mistakes
Using a-x which removes execute permission.
Using u-x or g-x which remove execute permission for user or group.
4fill in blank
hard

Fill both blanks to make deploy.sh executable only for the group and others.

Bash Scripting
chmod [1],[2] deploy.sh
Drag options to blanks, or click blank then click option'
Ag+x
Bu+x
Co+x
Da+x
Attempts:
3 left
💡 Hint
Common Mistakes
Using u+x which adds permission to user instead of group or others.
Using a+x which adds permission to all users.
5fill in blank
hard

Fill all three blanks to add execute permission for user and remove read permission for others on script.sh.

Bash Scripting
chmod [1],[2],[3] script.sh
Drag options to blanks, or click blank then click option'
Au+x
B-r
Co-r
D+x
Attempts:
3 left
💡 Hint
Common Mistakes
Using +x without specifying user or group.
Confusing -r with adding permissions instead of removing.