--- title: ".sh file — what it is and how to open it" description: "A .sh file is a Shell Script. A text file of Unix shell commands, run by bash, zsh or sh. How to open one on Windows, macOS and Linux, and what to convert it to." url: https://atoneplace.net/file/sh/ site: "At One Place" --- # .sh files **.sh file: Shell Script** A text file of Unix shell commands, run by bash, zsh or sh. ## What opens a .sh file - **Windows:** Git Bash, Windows Subsystem for Linux, Notepad (built in — to read) - **macOS:** Terminal (built in — bash script.sh), TextEdit (built in — to read) - **Linux:** Terminal (built in — bash script.sh), Text Editor (built in) ## What a .sh file is Shell scripts automate command-line work on macOS, Linux and any Unix system. To run one you normally make it executable with chmod +x and call it as ./script.sh, or run bash script.sh directly. As with any script it is plain text — read it before running something you downloaded, particularly the ones that pipe a web download straight into a shell. ## Converting it A .sh file is commonly converted to .bat, .ps1 or .txt. It is a plain text format, so any text editor can open and edit it directly. ## Details - **Extension:** .sh - **Full name:** Shell Script - **Category:** Programs and installers - **MIME type:** application/x-sh - **Created by:** Unix shell convention - **Format:** Plain text ## Common questions ### How do I open a .sh file? On Windows use Git Bash; on macOS use Terminal (built in — bash script.sh); on Linux use Terminal (built in — bash script.sh). A text file of Unix shell commands, run by bash, zsh or sh. ### What is a .sh file? Shell Script. Shell scripts automate command-line work on macOS, Linux and any Unix system. To run one you normally make it executable with chmod +x and call it as ./script.sh, or run bash script.sh directly. ### Can I convert a .sh file? Yes. It is usually converted to .bat, .ps1 or .txt, either by exporting from one of the programs listed above or with a format converter. ## Related pages - [.exe — Windows Executable](https://atoneplace.net/file/exe/) - [.apk — Android Application Package](https://atoneplace.net/file/apk/) - [.msi — Windows Installer Package](https://atoneplace.net/file/msi/) - [.dll — Dynamic Link Library](https://atoneplace.net/file/dll/) - [.deb — Debian Software Package](https://atoneplace.net/file/deb/) - [.jar — Java Archive](https://atoneplace.net/file/jar/) - [.bat — Windows Batch File](https://atoneplace.net/file/bat/) - [.pkg — macOS Installer Package](https://atoneplace.net/file/pkg/) - [.ps1 — PowerShell Script](https://atoneplace.net/file/ps1/) - [.ipa — iOS Application Archive](https://atoneplace.net/file/ipa/) - [.rpm — RPM Package](https://atoneplace.net/file/rpm/) - [.appimage — AppImage Portable Application](https://atoneplace.net/file/appimage/) ## Sources - Media Types Registry — IANA (https://www.iana.org/assignments/media-types/) - Official vendor product documentation — At One Place (/about/)