Technology

How to execute .sh files in Linux(Ubuntu)

You may encounter with a .sh file several times when you try to download an application/software for linux. .sh files are shell script files for Unix-based operating systems. There are 2 ways in which it can be executed.  One is by using the terminal and another is by using the GUI of the operating system.

1. Using Terminal

Step 1: Open Terminal
Step 2: For giving permission to execute your script, Type this in the terminal. Remember to give your file path.
chmod +x /path/to/yourscript.sh
Step 3: Execute the script. Just point your file location.
Eg:  /path/to/yourscript.sh

2. Using GUI

Step 1 : Locate the file in your system. Step 2 :  For giving permission to execute your script,
Right-click on the fileSelect Properties
Select Permissions
Select Allow executing file as a program Once its done, close the Properties window Step 3: Double-click the file. A dialog will pop up giving you the option to run the script in a terminal. Go with it. It’s all done. Note: Not all files are safe to install. Verify the original source before executing these type of files.


Harikrishnan V

Management professional with an extra edge over technology and solution consulting. Over the years, Hari has helped many organizations in establishing their presence on digital media and expanding their business over geographies.

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from Youtube
Vimeo
Consent to display content from Vimeo
Google Maps
Consent to display content from Google
Spotify
Consent to display content from Spotify
Sound Cloud
Consent to display content from Sound