Skip to content
TheFilesGuy
en
Menu

Programs & apps · .sh

What Is an SH File?

A .sh file is a script of commands for the Unix shell.

Extension
.sh
Full name
Shell script
Type
Program
MIME type
application/x-sh

Free SH Tools

These run in your browser. Your SH files are never uploaded.

About SH Files

A .sh file contains commands for a Unix shell such as bash or zsh, run one after another to automate tasks like installing software or backing up files. They run on macOS and Linux, and on Windows through WSL or Git Bash. Because a script can do anything you can do in a terminal, read an unknown script before running it, especially if a website tells you to pipe it into sh.

How to Open an SH File

Any device
Open it in a text editor to read it.
Mac & Linux
Run bash file.sh, or make it executable with chmod +x file.sh and run ./file.sh.
Windows
Run it in WSL or Git Bash.

SH File Questions

How do I run a .sh file on Windows?

Install WSL or Git for Windows, then run bash file.sh.

Why do I get 'permission denied'?

The file isn't marked executable. Run chmod +x file.sh or start it with bash file.sh.

See all file formats