How to execute *.sh files on Linux
Hey everyone, this is a very simple tutorial which shows you how to execute .sh files step by step:
1)First of all, download the file that you are going to execute e.g. "name_of_file.sh" and save it in your Desktop
2)Secondly open the Terminal from Menu Accessories Terminal
3)Now type cd ~/Desktop (With this command we change the default directory "/" to "/Desktop")
4)Then type chmod +x name_of_file.sh to make your file executable.
5)Then type sh ./name_of_file.sh to execute the file.
6)After that continue as usual.
I hope this tutorial will be of a great help to you all.
Tags: .sh files
Created: 5 years ago.
Last edited: 3 years ago.
Reviewed: 5 years ago.
Read 1730 times.
|2 years ago||
|3 years ago||
It's rather copy to Desktop folder and make it executable than install.
.sh is shell script. It doesn't need to be "installed".
Step 3 is wrong. with cd ~/Desktop you won't change to /Desktop directory. You go to the $HOME/Desktop which is completly different game.
Anyway, you can put sh script anywhere, where you are able to write. There is no need to have it on the Desktop.
|3 years ago||
|@IcyFlame It's up to you if you want to run your *.sh file outside the terminal.|
|3 years ago||
I updated my post.
|4 years ago||
Mint updated Firefox to the latest version (12), but failed to change its language from English to Spanish, as all other apps and desktop items did flawlessly.
After 20 minutes of fruitlessly searching some terminal command that would force Firefox to acknowledge the language change, I opted to manually download the darn thing and now I'm faced with the following:
$sudo sh run-mozilla.sh
--> run-mozilla.sh: Cannot execute .
Firefox 12 for Linux, downloaded from www.firefox.com
Linux Mint 12 64-bit, using GNOME Classic / MATE
Thanks in advance!
NOTE: Everybody is politely asked to please refrain from replying with any of the customary, albeit totally useless, Linux replies:
- "Why not use instead X app?" (because I want THIS app. Period.)
- Presenting another Distro's (or version's) positive outcome. Pointless.
- Flaming comments (they will be prosecuted with no exceptions)
- Redirecting to an external link (I too used google, so no thanks.)
- Redirect to use man pages (see previous.)
- Try to showoff by asking for a cryptic system log output. 99% of the time they never produce a *usable* follow-up answer. It's a fact.
|5 years ago||
|It is really weird that I didn't have to do this when I was using openSUSE, but I had to do this with the LMDE. But, Mint is a much better OS than SUSE, so I am not complaining.|
Other tutorials from efthialex
- How to Hide files in Mint
- Changing the Linux Mint StartButton Icon [2 Methods]
- Conky - System Monitor For Linux Mint
- How to Make Firefox Faster on Linux Mint
- Clean Up Grub Boot Menu
- Zip a file without compression
- Play Window's Games on Linux Mint + Install *.exe from *.iso
- Install Eclipse 3.7 Indigo and configure Eclipse for Python
- Install Sublime text editor