

Ask HN: Can someone explain the console for me? - redxblood

Just some quick questions google hasn&#x27;t been able to answer.
i&#x27;m in doubt as to which language does the console use. I&#x27;ve heard it&#x27;s Bash. Sometimes Shell. Sometimes Unix. Is it one of them? All three?<p>Also, does Mac and Windows and Linux use the same console language? That is to say, if you input the same commands in the console of the three OS, will they output the same? 
By console i mean the console.app in Mac, and the little black screen in Windows that lets you type (cd, ls, etc)
Thanks
======
ggchappell
Okay, I'll give this a shot.

"Unix" is an _operating system_ that came out of Bell Labs long ago. It has
had many imitators, any of which might be loosely called "Unix". The imitators
include the various flavors of Linux. MacOS X has one buried inside it.
Windows is something rather different.

The program that runs in a console window is called a "shell". So a "shell" is
a _kind of program_. Modern shells include lots of fancy functionality, which
varies from one shell to another. But their basic operation is the same: type
the name of a program, and the program gets executed.

Most shells from the Unix tradition have names ending in "sh" (guess why).
Bash is one of these. Other popular shells include zsh, ksh, and tcsh. Bash is
by far the most popular these days. It is the default shell run by console.app
in MacOS X. It is also the default shell in many Linux distributions.

Windows, as usual, is different.

So, typing the same commands into a shell in Linux vs. MacOS will likely get
you similar results. Differences might be due to configuration that differs
from one system to another, and programs that are installed on one system, but
not on another. Typing these same commands on Windows will probably get you
completely different results.

As for "language": we usually don't use this term when referring to directly
typed console commands. Most modern shells do include a programming language
whose syntax is based on the command-prompt syntax. So a shell doubles as an
interpreter for its built-in language.

------
lightyrs
I think you'll have more luck if you start researching "Terminal Emulators"
instead of the more generic, "consoles".

[http://en.wikipedia.org/wiki/Terminal_emulator](http://en.wikipedia.org/wiki/Terminal_emulator)

Your confusions are well-founded. This is a very vast topic.

