Question: How to Run Sh Files in Linux?
Contents

How do I execute a sh file in Linux?

Open a terminal window.

Type cd ~/path/to/the/extracted/folder and press ↵ Enter .

Type chmod +x install.sh and press ↵ Enter .

Type sudo bash install.sh and press ↵ Enter .

How do I run a .sh file in Ubuntu?

The way professionals do it

  • Open Applications -> Accessories -> Terminal.
  • Find where the .sh file. Use the ls and cd commands. ls will list the files and folders in the current folder. Give it a try: type “ls” and press Enter.
  • Run the .sh file. Once you can see for example script1.sh with ls run this: ./script.sh.
Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest