Technoracle
    Facebook Twitter Instagram
    Facebook 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, 2021No Comments2 Mins Read
    how to run shell script in linux
    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

    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 2023 – 5 Proven tricks

    Read More
    Convert PEM to PPK file
    Uncategorized

    How to Convert PEM to PPK file [Step by Step Guide]

    Read More
    Copy File from Local to Remote Server
    Uncategorized

    How to Copy File from Local to Remote Server Easily

    Read More
    Add A Comment

    Leave A Reply Cancel Reply

    install PHP GD on Ubuntu

    How to Install PHP GD on Ubuntu 22.04 [Easy Guide]

    May 2, 2023
    Install PHP on Ubuntu 22.04

    How to Install PHP on Ubuntu 22.04 [Simple Guide]

    April 26, 2023
    Install PHP 8.0 on Ubuntu

    How to Install PHP 8.0 on Ubuntu 20.04

    April 25, 2023
    Enable PHP Zip Extension

    How to Enable PHP Zip Extension in cPanel

    April 2, 2023

    Subscribe to Blog

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

    Facebook Twitter Instagram Pinterest
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    © 2023 Technoracle

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

    Click to Copy
    Go to mobile version