Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bin directory and PATH

Tags:

path

windows

I'm beginner in programming. Can somebody please explain (by simple words) what do I have inside the bin directory of program?

What is this PATH environment variable of windows, how does it work (please don't think that I don't know how to use Google, I just want to understand it more clearly)?

like image 325
wantSTUDY Avatar asked Jul 11 '10 20:07

wantSTUDY


People also ask

What is bin in command line?

1. Purpose. /bin contains commands that may be used by both the system administrator and by users, but which are required when no other filesystems are mounted (e.g. in single user mode). It may also contain commands which are used indirectly by scripts.


1 Answers

You usually put all the binary files for a program in the bin directory. This would be the executable itself and any dlls (dynamic link libraries) that the program uses.

This isn't essential as Windows use the PATH environment variable to look for dlls your program needs. This is a list of folders that Windows searches, in order, when it can't find a dll (say) in the current directory.

So if you want to have a dll used by more than one program you could put it in a location already on the PATH or add a new folder to the PATH.

like image 194
ChrisF Avatar answered Oct 03 '22 15:10

ChrisF