.bash File — Bash Script
application/x-bash
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .bash file here or click to choose
Or drop any file to identify its extension
application/x-bashQuick Facts
| Extension | .bash |
| Full Name | Bash Script |
| MIME Type | application/x-bash |
| Category | Code |
| Type | Text-based (human-readable) |
| Typical Size | 100 B – 50 KB |
| First Appeared | 1989 |
What Is a .bash File?
BASH files are scripts specifically written for the Bash (Bourne Again Shell) interpreter, the default shell on most Linux distributions and macOS (prior to Catalina). While .sh files may target any POSIX-compatible shell, .bash files explicitly use Bash-specific features including arrays (indexed and associative), string manipulation operators (${var//pattern/replace}), process substitution (<(command)), here strings (<<<), extended globbing, regular expression matching (=~), arithmetic evaluation ((( ))), and Bash-specific built-in commands. The .bash extension is also used for Bash configuration files: .bash_profile (login shell initialization), .bash_aliases (command aliases), .bash_logout (cleanup on logout), and .bashrc (interactive shell configuration). Bash was created by Brian Fox for the GNU Project in 1989 as a free replacement for the Bourne shell, incorporating features from csh and ksh. Bash 4+ added associative arrays, coprocesses, and mapfile, while Bash 5 added name references and improved history handling. Despite zsh's growing popularity (especially on macOS), Bash remains the most widely used shell for scripting due to its ubiquity across Linux servers and its extensive documentation.
How to Open .bash Files
Related File Extensions
More Code File Extensions
Other code formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.