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?
Accepted Answer
Give execute permission to your script:
chmod +x /path/to/yourscript.sh
And to run your script:
/path/to/yourscript.sh
Since .
refers to the current directory: if yourscript.sh
is in the current directory, you can simplify this to:
./yourscript.sh
The post How to run .sh scripts in Ubuntu? appeared first on Stack All Flow.
Top comments (0)