I'm new in Linux and I have a problem with a little thing :
For example when I type this in terminal :
Code:
$ cp file.ext /lib/
I pass some arguments to a program called "cp" and it parsing the arguments and in this example it copy a file to a path
I found that some apps that I use in terminal are located in /bin folder and I can access every file that is in /bin folder directly and global
But some apps are not in /bin folder but I can use them in terminal ( for example yum ):confused
In windows there is a variable called PATH that Can be used for make a folder global
has Linux something like this ?
My question is how Linux do it ? I mean how does it recognize the apps that we use in terminal ?
For example I have a file in path :
named exam.py
I want that when I use
in terminal this file pass to python interpreter and then execute
like :
Code:
$ python /apps/exam.py
?