Close Menu
Technoracle
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    TechnoracleTechnoracle
    • Home
    • AWS
      • EC2
      • Lightsail
      • RDS
      • S3
    • Ubuntu
      • Ubuntu 20.04
      • Ubuntu 22.04
    • AI Tools
    • Web Hosting
    • WordPress
    • Tech News
    Technoracle
    Home - Uncategorized - How to Run Shell Script in Linux Terminal Easily
    Uncategorized

    How to Run Shell Script in Linux Terminal Easily

    Rajesh ShivamBy Rajesh ShivamJune 1, 2021Updated:December 27, 2023No Comments2 Mins Read
    how to run shell script in linux

    Shell Script is nothing but a group of commands written in a file to execute together. Some of the Linux software bundles come with shell script files such as “installer.sh“. You can run the .sh file in two ways. In this article, I am going to explain step-by-step how to run shell script in Linux. So let’s dive in.

    How to Run Shell Script in Linux

    As I mentioned in the introduction, there are two ways to run .sh file in linux. Let’s discuss one by one.

    Let’s take an example shell script (.sh) file “installer.sh“. You can execute shell script using following command.

    bash installer.sh

    Bash: Bourne Again SHell is the GNU’s project that allows you to efficiently perform many tasks.

    Following is the second way to run sh file in Linux is

    ./installer.sh

    Run sh file in Linux – Steps

    • Open the Terminal application on Linux.
    • Create a new script file with .sh extension using a text editor such as Vim.
    • Write shell instructions on the file(.sh) using any text editor such as Vim.
    • Set execute permission using
      “chmod +x installer.sh“
    • Now run the script using
      “bash installer.sh“
      and
      “sh installer.sh” or “./installer.sh”

    Conclusion

    In this tutorial, you have learned how to run shell script in linux. If you have any doubts feel free to contact me, I will definitely try to help you. Also, you can join our elite Facebook group to get direct help from me. If you like this tutorial, please share this article on your social media handle.

    how to run shell script in linux run .sh file in linux
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit
    Previous ArticleHow to Install MariaDB on Ubuntu 20.04 Quickly
    Next Article How to Create a Powerful Gig in Fiverr
    Rajesh Shivam
    • LinkedIn

    Rajesh Shivam is a seasoned professional with expertise in AWS and Linux System Administration. With over 10 years of freelancing experience, he brings a wealth of knowledge to the table. Rajesh has a strong passion for technology and stays connected with the latest happenings in the field. His dedication and expertise make him a trusted resource for all things tech-related.

    Related Posts

    Uncategorized

    How to Get your First Order On Fiverr in 2024 – 5 Proven tricks

    Read More
    Copy File from Local to Remote Server
    Uncategorized

    How to Copy File from Local to Remote Server Easily

    Read More
    increase execution time in PHP
    Uncategorized

    How to Increase Execution Time in PHP

    Read More
    Add A Comment
    Leave A Reply Cancel Reply

    linux commands every user should know in 2025

    25 Must-Know Linux Commands Every User Should Master in 2025

    April 10, 2025
    TeamViewer and Ubuntu logos on gradient background – banner for how to install TeamViewer on Ubuntu 24.04 tutorial

    How to Install TeamViewer on Ubuntu 24.04 [Fast & Easy Steps]

    April 10, 2025
    Troubleshooting ‘Permission Denied (publickey)’ SSH error on a Linux server using secure terminal access

    Fix ‘Permission Denied (publickey)’ SSH Error on Linux [Step-by-Step Guide]

    April 8, 2025
    Blog banner showing Ubuntu logo, coding laptop, and icons for VS Code, Docker, and Git with the title 'Perfect Dev Setup in Ubuntu 24.04 – Step-by-step guide for developers' on a dark tech-themed background.

    How to Set Up the Perfect Development Environment on Ubuntu 24.04

    April 8, 2025

    Subscribe to Blog

    Enter your email address to subscribe to
    this blog and receive notifications of new posts by email.

    Facebook X (Twitter) Instagram Pinterest
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    © 2025 Technoracle

    Type above and press Enter to search. Press Esc to cancel.

    Click to Copy