Receive all updates via Facebook. Just Click the Like Button Below

Shell Variables

In Linux (Shell), there are two types of variable:
(1) System variables - Created by Linux developers ( inbuild variables ).
These variables are defined in UPPER case.
(2) User defined variables (UDV) - Created by user.
These variables are defined in lower case.


Variables in Linux Shell Scripting


System Variables
To see the system variables try the command: # set
To print the system variables use echo:


echo $HOME

User Defined Variables
How to define User defined variables (UDV)?
To define a User defined variables use the following syntax:
# variable name=value

How to access value of UDV?
Use a $ symbol to access

Lets try creating a User defined variable and accessing it.

echo $value

Save the above script as
chmod 755

You will find 100 printed on the screen!


Related posts:

Advertise here

picture picture

Follow us


- Tech-Tutorials

Like us

About Techcuriosity

I am Telson, the webmaster of and through this site, I share my knowledge and curiosities in the Tech World.

What We Offer

  • What is ..?
  • How to ..?
  • Difference between ..?
  • How .. works?
  • Get in Touch
    UK : +44 77 33 890 678

    picture picture

    Our Partners

  • Website Design Dubai
  • SEO Link Exchange
  • picture