Possible Duplicate:
How do I run .sh files in Terminal?
When I try to run a .sh script in Terminal it says I have no permissions to do that. And when I try to run an executable nothing happens at all!
When I try to run a .sh script in Terminal it says I have no permissions to do that. And when I try to run an executable nothing happens at all! |
||||
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
In addition to what Azendale has said, I have also found that after adding the "chmod a+x" attribute to the file removing the extension some times helps as well such as "filename.sh" or "filename.bin" becomes just "filename" |
|||
|
|
|
To make it executable through a GUI, right click on the file in Nautilus, then select Properties. Go to the Permissions tab and check the "Allow executing file as program" box.
|
|||
|
|
|
In addition to chmod a+x as advised above, if you put the script in |
|||
|
|
|
Instead of telling if you can run a file by whether it ends in .exe like Windows does, Linux has a file permission that says who (if anyone) can run that file as a program. It is called the executable bit. If you run
it will make it so you are allowed to run it. Then to run it, do
|
|||
|
|
ls -lwhile on the script's folder and any further steps you tried and what errors you get when trying to run the script. Add that information to the question instead of adding it as a comment. – Bruno Pereira♦ Dec 25 '11 at 12:15ls -l script.sh, and a first line of your script. – Andrejs Cainikovs Dec 25 '11 at 18:55