.bash
💻 CodeText-based

.bash File — Bash Script

application/x-bash

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

BASH

Drop a .bash file here or click to choose

Or drop any file to identify its extension

Expected MIME type:application/x-bash

Quick Facts

Extension.bash
Full NameBash Script
MIME Typeapplication/x-bash
CategoryCode
TypeText-based (human-readable)
Typical Size100 B – 50 KB
First Appeared1989

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

VS Code
vim
Emacs
nano
any text editor
bash (execution)

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.