.sh Shell script
Text & source code
| MIME type | application/x-shellscript |
|---|---|
| Description | Shell script |
| Category | Text & source code |
| Based on | application/x-executable, text/plain |
Frequently asked questions
What is a .sh file?
A .sh file is a “Shell script” (MIME type application/x-shellscript).
How do I open a .sh file?
With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.
How can you tell a genuine .sh file?
No fixed signature at the start of the file is registered for this format; it is recognised mainly by its extension. On Linux and macOS, file --mime-type example.sh shows the guessed type.
Which format is .sh based on?
Technically a .sh file is a subtype of “Executable” (application/x-executable), so programs for that base format can often read it too.
Which MIME type belongs to .sh?
The MIME type is application/x-shellscript. In the Apache web server: AddType application/x-shellscript .sh; in nginx: types { application/x-shellscript sh; }.