• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Run A Shell File In Ubuntu – Run .sh File In Ubuntu

How To Run A Shell File In Ubuntu – Run .sh File In Ubuntu

By Sourabh / July 18, 2016 Category: How To, Ubuntu

What is .sh file in Ubuntu and how to run .sh file in Ubuntu. Terminal commands to run a shell file in Ubuntu. Executing a .sh file in Ubuntu is pretty easy. Let us see how.

.sh file is a shell script. A shell script is a text file that contains a sequence of commands for a UNIX/Debian/Linux/Ubuntu-based system. A shell script file contains “script”, a sequence of commands which have a repeated use.

.sh files are Unix (Linux) shell executables files, they are the equivalent (but much more powerful) of bat files on windows. So you need to run it from a Linux console, just typing its name the same you do with bat files on windows. and that means that it uses Bourne Again Shell, so called bash.

How To Run .sh File In Ubuntu Linux

sh-file-07

Executing a .sh file in Ubuntu is pretty easy. If you have a .sh file, follow the steps given below to run .sh shell script file in Ubuntu.

Before running .sh file, you will have to give proper permission to the script. Run the following commands in Terminal:

chmod +x /path/to/yourscript.sh

Once the proper permission is granted, run the .sh script using the command below:

/path/to/yourscript.sh

If the script file is in the current directory, simply use ./yourscript.sh command. In the following command . refers to the current directory. Which means to run a .sh file in the current directory, simply run the command:

./yourscript.sh

Alternative Method

sh-file-01

You can also enable the .sh file to execute as a program. To make a shell script file executable:

  • Right-click on the file
  • Select Properties
  • Select Permissions
  • Select Allow executing file as a program

Once done, simply double-click on the shell file and click run in terminal option.

Tags: change permission .sh file in ubuntu, change permission .sh file in ubuntu 16.04, executing a .sh file in ubuntu, how to run .sh file in windows, how to run a shell file in ubuntu, how to start .sh file in ubuntu, how to use .sh files in ubuntu, linux what is .sh file, open .sh ubuntu, run .sh file in ubuntu, run .sh file in ubuntu 16.04, run sh in terminal, Ubuntu 16.04 run .sh file, ubuntu 16.04 what is .sh file, Ubuntu run .sh file, ubuntu what is .sh file, what is .sh file, what is .sh file in linux, what is .sh file in ubuntu, what is .sh file in ubuntu 16.04

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap