Linux_logo_errorbits.comFirst Linux Script

In this first script I will show you all the details and preparations that you will need to do prior creating an running your first Linux script. I will use VIM text editor (see the tutorial in the link), but you can use any editor that you might like.

Go to the folder in which you want to create the file for the script and type:


The editor will create a new file called (if the file already exist, it will be opened for editing), then input the following commands in the file:

echo “This is my first Linux script”
echo “I will learn more advanced Linux scripts…”
echo “… but a little bit later”

Save your script and exit editor.

Make sure that your file is allowed to run by running chmod command (see the permissions tutorials: File permissions in Linux and Permissions in Linux: Octal/Absolute mode):

chmod +x

Run the script file with:




Useful links:

Most used Linux commands

Linux Directory Map / Structure

Introduction to Linux

Using Help in Linux

Download and install Oracle VirtualBox

How to install CentOS on Oracle VirtualBox