Linux & Shell Scripting Guide For Beginner's

In simple words Linux is an Operating System just like Windows and Mac OSx, but the main difference between Linux and other Operating Systems is that the Linux is Open Source Operating System. It means you are free to download, use, modify and redistribute it without paying any bucks because it is entirely free. Most Linux Operating Systems or often called Linux Distributions are Community developed and a number of companies are also contribute to its development. The word Linux Stands for LINUs  + uniX , because it is built on Unix tradition and the Linux kernel is created by linus torvalds.

Get Started With Linux

Linux Distributions takes linux kernel and combines it with free software to create a complete Operating System. Currently there are more then 280 different Linux Distributions available. To know more about Linux Distributions visit : Here is the list of Top 10 Destros : Click here. But as a Beginner perspective I would recommend to first try Ubuntu because of its simple user interface, it is one of the most popular and well-known Linux Distribution. You can download the latest Ubuntu ISO image from here , After download the ISO file, burn it on a DVD or either make a bootable usb. You can also use Ubuntu without installing it by using Live cds or usb drives, just boot your PC or Laptop with bootable DVD or USB drives and click on "Try Ubuntu" Button.

or if you want to install Ubuntu then hit install Button and follow the instructions. You can also use virtualization software such as Virtual Box or VMware to install Ubuntu. this method is best for Beginners because it could not causes any changes in your physical drives or host OS. I am using Virtual Box which can be found here. So in order to install Ubuntu in Virtual Box first download and install Virtual Box, then follow these steps :

Some Basics About Ubuntu
 By default Ubuntu 14.04 uses unity Desktop Environment, the main components of Ubuntu Desktop are

Panel :  Panel is a horizontal bar placed at top of the Desktop, it contains status bar and Application Menu button, where we can access system settings, Shutdown button etc.

Launcher :  Launcher is a vertical docking station at the left side of the Desktop, it contains files, folders and Applications shortcuts to launch it quickly. In order to attach new Application on launcher just right click on the App icon and click "Lock to Launcher" & to detach an App right click and then click "Unlock from Launcher".

Dash :  With the help of Dash interface we can easily search any file, folder or Application and run or launch it, it also shows recently run applications. To open Dash click on the Ubuntu button located at top of the launcher.

Command Line Interface

In CLI or Command Line Interface a user type a command in a console window to interact with files and Operating System & receive the result back from the system. It is Beneficial to know how to use CLI because it gives more power and control over commands and Operating Systems as compared to GUI or Graphical User Interface. It does not consumes much memory and processor's resources as comparison to GUI. To launch a Console window in Ubuntu click on the Dash and type 'Terminal' then click on the terminal Icon.

Now type this command :        echo hello world

Command Shell Scripting

A Shell script is a program file, which contains a series of commands and executes all commands sequentially at one time. Shell scripts are not Binary files, instead these are simple ASCII text files. We can create a Shell script by using a text editor. In Ubuntu we can use nano text editor to create our first Shell script. nano is a command-line text editor and very easy to use. So first of all start a terminal or console then type 
and press enter.

In nano type these commands

echo "hello world This is My First Shell Script"
read -p "Enter Your Name : " name
echo "hello $name"

after that press Ctrl+O and then press enter to save your file. To exit nano press Ctrl+X

Now we need to give the Shell permission to execute the Shell script by using chmod command type this command :    chmod +x

To execute the script type :    ./

First line of this script indicates what program is used to interpret the script, which is Bash interpreter. In third line we use echo command, which simply prints all given arguments. In fourth line we use read command, in this command we use -p parameter, so first it prints the arguments under " " and then it reads user supplied data then points it to a variable name. The next command is echo with variable $name.

Resources for Shell Scripting Tutorials  :

So thats it, this is a short guide to Linux and Shell Scripting For Beginners, I hope you like it.