Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
144
rated 0 times [  144] [ 0]  / answers: 1 / hits: 939480  / 3 Years ago, sun, october 17, 2021, 2:25:31

Possible Duplicate:

How do I run .sh files in Terminal?






I want to download JDownloader from the internet for Linux. But the file is .sh and when I tell ubuntu to open the file it uses some text editor. I searched Ubuntu Software Store and there was no application to open it. Is there any way I can get it installed?


More From » files

 Answers
1

  1. copy the file to the desktop (for convenience)




  2. Right click on the file and select properties


    enter image description here



  3. Under permission tab check allow executing file as program


    enter image description here



  4. double click on the file and chose run in terminal if it is not a gui program)


    enter image description here




By default the file manager may not show that option and open the file in gedit instead. In that case change the preference of the file manager at: Edit-> Preferences -> Behaviour
to "ask each time" or right away to "run executables"


Command line


cd /path/to/file
chmod +x filename.sh
./filename.sh

Comment below if it wont work :)


If it still won't work, despite having allow executing file as a program ticked, when you double click on the .sh file, and it launches gedit, navigate to the folder with the script.


Once you are in the correct current folder for the script, you can run the script like this:


sudo ./filename.sh

If that doesn't work you may try


sudo bash filename.sh

From FAT partition


Follow this How do I execute a file from a FAT USB drive?


[#39270] Monday, October 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ularousand

Total Points: 380
Total Questions: 109
Total Answers: 101

Location: England
Member since Tue, Sep 8, 2020
4 Years ago
;