Using python you can create your own commands and run it using linux terminal. The steps are : -
1. Create a simple pragram like hello world . with the location of the python interpretor .
(For eg) : #!/usr/bin/python
# Filename : myfirstprogram.py
print "This is my FirstProgram !"
here # - is used as comment
And the line follwed with the symbols #! - is known as shebang line , This is used to tell the linux system that this program should run with that interpretor at the destination.
Now give the excecute permission using:
$ chmod a+x myfirstprogram.py
then run using
$./myfristprogram.py
o/p : This is my FirstProgram !
Then rename this program as myfirstprogram and it will still run when you excecute using terminal.
Now give the command $ echo $ path
/home/usr/bin:
you will get the location of the environment variable.
Now paste the program file in that location. And run the myfirstprogram in terminal it will run. You can now run this program from any location