0

Why bash are not executed when I double click on them?

They are executable but they are not executed. Instead they are opened with gedit.

Minimus Heximus
  • 3,568
  • 9
  • 36
  • 60

2 Answers2

1

I. (GUI method) Right Click the file >> Properties >> Permissions >> (check) Allow executing file as program

Reference

OR

II. (Teminal method)

chmod +x /path/to/yourscript.sh 
bash /path/to/yourscript.sh

Reference

0

Open Nautilus: Edit -> Preferences -> Behavior.

Select "Ask each time" under "Executable Text Files".

Now you can double-click your executable text file in Nautilus to be asked whether to execute or edit your script.

Pabi
  • 7,351
  • 3
  • 40
  • 49