I can't install a .sh file. When I double click the file then it is open with archive manager not get any run or run in terminal option.
I also checked the permission on allow executing file as program
I can't install a .sh file. When I double click the file then it is open with archive manager not get any run or run in terminal option.
I also checked the permission on allow executing file as program
To run .sh file, using a terminal is the best way.
Assuming your file is in /home/user/downloads
directory;
To open a terminal press ALT+CTRL+T together. Once the terminal is opened, type pwd
to locate which directory currently you're in. pwd
will display an output like below
/root/folder/
If your .sh file is in user's downloads directory as I mentioned above, then use cd
command to navigate to the downloads folder. see below;
cd /home/user/downloads
once entered, again check whether you're in that directory by using pwd
command. If you're in that directory then simply type ls
command to list down the files. Once you see your .sh file, simply type below command to execute the file.
sudo sh shell_file.sh
terminal will ask you to type the root (admin) password which will not be visible while you type. simply type the password & enter. That's it, the execution will process.
This is just an assumption; assuming your file located in a directory. I hope this very basic and simplified process which will make you more clear.
Hope it helps! :)
EDIT: I've edited the document by adding sh command at the last step.
sh
command at the last step.. please try it again let us know. :)
– AzkerM
Jan 18 '14 at 14:34
.sh
file created by you or downloaded from any source to achieve something?? Can you try; sudo bash ./file_name.sh
instead :)
– AzkerM
Jan 19 '14 at 04:48
first give full permission to that .sh file
sudo chmod 755 YOUR_FILENAME
second run .sh file by following command inside ur CLI
sudo ./YOUR_FILENAME
**YOUR_FILENAME is full path of your file, where it is situated.
chmod 777
is not recommended since it gives write permissions to 'others' also. chmod 755
is the way to go...
– Rohith Madhavan
Jan 07 '15 at 15:25
*.sh
files are shell scripts, they should be human readable. Please post the output ofcat yourfile.sh
. – Wolfer Jan 18 '14 at 12:09./path_to_shfile/your_file.sh
– user.dz Jan 18 '14 at 12:13