Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application… → Terminal.
How do I open this file in the terminal?
bashcommand lineexecute-commandscripts
Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application… → Terminal.
How do I open this file in the terminal?
Best Answer
Give execute permission to your script:
And to run your script:
Since
.
refers to the current directory: ifyourscript.sh
is in the current directory, you can simplify this to: