Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that Apple's Terminal.app provides a bash shell. Are there any differences between this and a bash on Linux?

share|improve this question
For clarity's sake: Terminal.app does not provide bash, OSX provides bash (in the sense that bash is installed when OSX is installed). You could delete Terminal.app (not sure whether that would cause trouble with other applications that depend on it - or whether the system even allows you to delete it - but in theory you could. at least) and bash would still be available. – sepp2k Oct 19 '10 at 10:23
up vote 23 down vote accepted

Terminal is a terminal emulator. It interprets various control sequences sent by programs (control characters like CR, LF, BS and longer control sequences for commands like “clear screen”, “move cursor up 3 lines”, etc.). Terminal is the same kind of program as xterm, rxvt, Konsole, or GNOME Terminal. Almost all modern terminal emulators support the “xterm” control sequences, so they are generally highly compatible (and most programs use the ncurses library and its terminfo database to abstract over the actual control sequences).

bash is a shell. It interprets commands that usually involve running other programs. In normal, interactive use the shell’s input comes from a user via a terminal emulator. The terminal emulator and the shell are connected via a “pseudo tty” device (e.g. /dev/pts/24, or /dev/ttyp9).

Because the tty devices are the only interface between Terminal and bash, they are completely independent. You can use bash with iTerm instead of Terminal, and you can use zsh instead of bash inside a Terminal window.

The version of bash installed on your Mac OS X and Linux systems may be different, but should be fairly easy to install pretty much whatever version of bash you want on either system. You might look at MacPorts, homebrew, or Fink for ways to install recent versions of bash (and other shells) on Mac OS X. Whatever Linux distribution you are using surely comes with packages for common shells.

share|improve this answer
To clarify (since it's not explicitly stated here either way) Terminal.app doesn't support xterm256 mode, whereas iTerm and iTerm2 do. (I'd also strongly recommend iTerm2 as your go to Terminal app on OS X.) – Slomojo May 16 '11 at 4:19
Support for xterm256 was added in 10.7. – user495470 Sep 19 '12 at 12:50

Mac OS uses the standard released of bash. Here are the versions from some systems that I have easy access to:

  • SLES 10.2: GNU bash, version 3.1.17(1)-release (x86_64-suse-linux)
  • SLES 11.0: GNU bash, version 3.2.49(1)-release (x86_64-suse-linux-gnu)
  • OSX Leopard (10.5.8): GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)
  • OSX Snow Leopard (10.6.4): GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
share|improve this answer
Even though they use GNU bash, much of the toolset in OS X is based on BSD. – Aeyoun Mar 15 '12 at 18:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.