FileHint

.sh

High risk

Shell script

A script executed by a Unix shell (bash, zsh, sh). A shebang on line one picks the interpreter; the execute bit controls whether it can run.

MIME types

  • application/x-sh
  • text/x-shellscript

Category

executable

Aliases

.bash / .zsh

What opens this file

  • macOS Terminal
  • GNOME Terminal
  • Windows Terminal + WSL
  • VS Code

How to open by OS

Windows

  • Run via WSL, Git Bash, or Cygwin.

Mac

  • Terminal or iTerm2.

Linux

  • Native terminals.

Ios

  • Not natively (iSH provides limited support).

Android

  • Runs inside Termux.

Safety notes

  • The classic curl | sh install pattern is convenient but leaves no integrity check. Only use it with HTTPS sources you trust.
  • Without chmod +x, a .sh will not execute on double-click or direct invocation.

Common mistakes

  • Missing shebang (#!/usr/bin/env bash) defaults to POSIX sh, breaking bash-specific syntax.
  • Saving with CRLF line endings leads to #!/bin/bash^M on Linux and a cryptic 'No such file' error.

Related extensions

References