Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Getting Started with the Console Moving Around the Filesystem

Pavle Lucic
Pavle Lucic
10,801 Points

What is bash exactly?

What is bash?

Cameron Raw
Cameron Raw
15,473 Points

Bash is the program in the console that allows you to type input, retrieve information etc, if I understand it correctly. So whenever you type something like 'ls' to look at the contents of a folder, it is bash that processes that input and returns the information.

Pavle Lucic
Pavle Lucic
10,801 Points

is it some kind of plugin for console?

Thanks! This is helpful.

1 Answer

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Hi, Pavle.

Without getting into too much technical details, Bash is a UNIX Shell environment.

is it some kind of plugin for console?

No, bash is not a plugin for console, it's much more than that; it's not too far from the truth to think of bash as the console itself.

What's UNIX shell exactly then? It's a command line interpreter, a bit similar to IDLE for Python or irb for Ruby, if you are familiar with these interpreted Programming Languages. As you type various command in the console, say, cd for changing directory path; ls for listing out directory contents; or pwd to output the current path ... Console is able to process these input then output the correct result because bash is sitting behind the scene to interpret the commands.

There're many other UNIX shells existed today besides bash, but bash is certainly the most popular one, as it's the default Shell for Mac OS X & most Linux Distros. Here're couple other popular shells.

  • csh -- C Shell, tailormade for C programmers.
  • zsh -- a drop-in replacement for bash, it is extremely popular, especially among Mac Developers, as ZSH bundled with tons and tons of cool features that bash doesn't have.

Generally speaking, when a console window is fired up, it must be using one of the UNIX shells, to find out whether you're on bash. Here's a command to confirm it.

echo $0
==> bash

Hope that I'm able to help you understand bash a little better. This is a big topic on its own, aside from being a UNIX environment, bash can also refer to as one of commands in the console, bash is a scripting language as well, I do not believe this Treehouse course covers bash scripting or bash command, but it's useful to know the term bash may carry different meaning depending on the context.

Pavle Lucic
Pavle Lucic
10,801 Points

William Li thank you on explanation. I didnt have oportunity to work with linux. Could you give me more explanation about shell? What is the shell?

William Li
William Li
Courses Plus Student 26,868 Points

Shell is just a command interpreter. Each time you type up a line of command on the console and hit enter, Shell interpret that command, and perform the given task instructed by the command, if the command is valid; or return error if sth about the command is wrong.

linux command line has many terminology, but I believe after taking the Console course in Treehouse, you'd be able to understand most of them.