TextText-based

text/x-shellscript

Shell Script

Reference for text/x-shellscript, the MIME type for shell scripts (bash, sh, zsh) used for automation and system administration.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

Expected extensions: .sh, .bash, .zsh

HTTP Content-Type Header

HTTP Header
Content-Type: text/x-shellscript; charset=utf-8

Associated File Extensions

.sh.bash.zsh

Quick Facts

MIME Typetext/x-shellscript
CategoryText
TypeText-based (human-readable)
Extensions.sh, .bash, .zsh

Common Usage

Shell scripts automate system administration tasks, deployment workflows, CI/CD pipelines, environment setup, and development tooling. Bash is the most common shell scripting language on Linux and macOS, used in Dockerfiles, Makefiles, and init scripts.

Code Examples

HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.sh" type="text/x-shellscript">

<!-- Or for script/media elements -->
<script type="text/x-shellscript" src="file.sh"></script>
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('text/x-shellscript');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'text/x-shellscript' });
nginx
# nginx.conf — add to types block or use default
types {
    text/x-shellscript  sh bash zsh;
}

# Or set for a specific location
location /api/ {
    default_type text/x-shellscript;
}

Related MIME Types

More Text MIME Types

Other text types in the Text family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.