Shell Scripting Tutorial – 1


I am Aaditya Purani. Today i would be Presenting Shell Scripting Tutorial -1 The basic one 🙂

A shell script is a text file that contains a sequence of commands for a UNIX-based operating system. It’s called a shell script because it combines into a “script” in a single file a sequence of commands that would otherwise have to be presented to the system from a keyboard one at a time.


So, first of all if you need to cook up a shell code , you need to start with


It means script will always run with bash. /bin/sh is an executable representing the system shell . Now, getting this overview, you might be knowing about Printing text in PHP. So let’s print Hello World .First open any text editor and type the code



echo “Hello World!”;

Done. Now, save it as file . Now, to execute it (if you are root user) then type bash file which will print Hello world in Terminal. Now, Shell Scripting is all about commands . Let me list all files with their permission.



echo “Lets see files”;

ls -lha


So, here is what it looks, Now if you are not as root user, then you need to give chmod +x file and then run the file. It will give executable permission. Now, let’s go more and print the version of your Linux Distribution. I use Kali Linux



echo “Lets see files”;

ls -lha

echo “Show me version”

cat /etc/issue

xxxThat’s the output. Now you can watch a video of mine 🙂 Please don’t copy, if you want to put on your blog . Provide me credits.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s