## What is bash in unix/linux/ubuntu?

Desktop is the graphical way to interact with the OS right?
So similarly is bash the textual way to interact with the OS?
Then what is bash scripting? Can we program bash? I don't really understand what bash is actually
 PhysOrg.com science news on PhysOrg.com >> New language discovery reveals linguistic insights>> US official: Solar plane to help ground energy use (Update)>> Four microphones, computer algorithm enough to produce 3-D model of simple, convex room

Mentor
 Quote by Avichal So similarly is bash the textual way to interact with the OS?
It's one of the textual ways to interact with a Unix-like OS. Generically these are called shells. Besides bash, some other shells are sh, csh, ksh, and tcsh.

 Then what is bash scripting?
A bash script is simply a file that contains a series of bash commands. Similarly for the other shells. The first line of the script normally indicates which shell is to be used, for example a sh script might have

#!/bin/sh

at the beginning. The exact form depends on exactly where the shell is installed, which depends on your version of Unix or Linux.

## What is bash in unix/linux/ubuntu?

To approach it from a slightly different direction, shell (and as jtbell already wrote, bash is a shell, actually bash stands for Bourne-again shell) is a program that takes input from your keyboard and executes it (either directly, or running other programs). Scripting means instead of typing series of commands one by one from the keyboard you put them in a single text file - and shell executes them automatically. This file is what we call a shell script.
 But you can also write programs in bash...with the for loops, while loops, if conditions etc. So bash is more than just textual input and output?
 Admin Not sure what you mean by "just textual input and output" but yes, it is more than just a simple command line interpreter like the one known from MS-DOS. In a way it is a programming language. Note that it is possible to use loops even from command line, for example single line like this one: Code: while :; do for i in *.avi; do omxplayer \$i; done; done plays for ever all *.avi files in the current directory using omxplayer (I am using it on my Raspberry Pi). Same combination of commands can be also put in its own file without semicolons, but with newlines separating commands - then it will be a standard bash script.
 Before gui came was terminal/bash like shell the way to communicate with the computer? And is this the reason why linux users love using terminal as it allows writing code to do something that would be tedious using gui