While all operating systems have some things in common, you may find yourself wondering if one type of operating system has a specific ‘feature’ that another one does. With that in mind, today’s SuperUser Q&A post has the answers to a curious reader’s question.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

Photo courtesy of BiblioArchives/LibraryArchives (Flickr).

The Question

SuperUser reader Toby Blunt wants to know if there is an equivalent for the (Linux) bin directory in Windows:

Is there an equivalent for Linux’s bin directory in Windows? If so, how can I access it from the command prompt?

What is the equivalent of the (Linux) bin directory in Windows?

The Answer

SuperUser contributor CBHacking has the answer for us:

There is actually nothing special about /bin on Unix/Linux at all. It is just the location where executable files and scripts (which are not actually binary files) are placed by convention. It is included in the PATH environment variable by default for all users.

As Ryan says (comments one and two), the \Windows\System32 directory on Windows is also in PATH for all Windows users (and, even if it is not, the program loader in Windows will search there anyhow).

You can easily create your own equivalent of /bin on Windows. To make it system-wide, place it somewhere like the root of the file system (such as C:\bin or under an already-restricted location like \Windows\System32\bin), and add it to the PATH environment variable for all users.

For a per-user location, create the directory in your own profile (%USERPROFILE%\bin) and add it to your account’s PATH environment variable. Windows combines environment variables with the same name, so anything in the machine PATH variable is also added to any user’s PATH, but not the other way around.

Of course, you will have to add files, scripts, shortcuts, and symlinks to your /bin directory yourself. Windows installers do not expect such a thing and will not put files there automatically the way that Linux installers usually do.

Make sure to read through the other interesting answers for this question thread via the link below!

Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

Akemi Iwaya
Akemi Iwaya has been part of the How-To Geek/LifeSavvy Media team since 2009. She has previously written under the pen name "Asian Angel" and was a Lifehacker intern before joining How-To Geek/LifeSavvy Media. She has been quoted as an authoritative source by ZDNet Worldwide.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.