-
-
#1
I have lots of «no-install» software on Windows, and wish to centralize the location of the binaries, but I am faced with a conundrum.
As opposed to BSD and other UNIX-like systems, Windows expects main package binaries, supporting binaries, libraries and config files in a single location/directory, which makes dispersing the binaries around nearly impossible. On the other hand, it seems quite unnatural to add every «no-install» location to the executable path.
How does BSD achieves it? I know a lot of «bin» files are actually shell scripts, or symbolic links to such and such, but there seems to be more to it than meets the eye.
-
-
#2
As opposed to BSD and other UNIX-like systems, Windows expects main package binaries, supporting binaries, libraries and config files in a single location/directory
That’s only partially accurate. While most programs will have a bunch of .DLLs sitting along with the main .EXE each in their own subdirectory under
%ProgramFiles%
(or
%ProgramFiles(x86)%
), settings are always expected to be stored under
%AppData%
(or the HKCU registry hive). Only older programs — or badly-designed ones — will break this rule. Also a lot of general-purpose libraries will go into
%SystemRoot%\SysWOW64
and
%SystemRoot%\System32
. And
ProgramData
bears a similarity to
/var
.
While all this is not always the case, nowadays filesystem hierarchy is less of a mess than it used to be in the Windows 9x era.
How does BSD achieves it?
Very easily by having 1) a clearly-defined filesystem hierarchy, 2) configuring software at build-time to be standard-compliant, and 3) providing appropriate patches for the not-so-well-behaved ones (e.g. hardcoded Linux-specific paths).
Windows simply has a different way of storing things and you have to live with it.
Skip to content
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Sign up
Appearance settings
Description
Version: 3.0
OS: [e.g. Windows 11
Shell: git bash
Anime:
installation instruction on windows doesn’t work
Metadata
Metadata
Labels
Development
No branches or pull requests
Issue actions
Al Dykes
-
#1
What to do with software that consists if little more than .exe file?
On all prior versions of Windows I’ve create c:\usr\local\bin and
inserted it in the system path. I’m thinking maybe that’s not the
right thing to do on W7.
Suggestions?
(Where in W7 is the screen that lets me modify the path?)
Andrew
-
#2
Al Dykes said:
What to do with software that consists if little more than .exe file?
On all prior versions of Windows I’ve create c:\usr\local\bin and
inserted it in the system path. I’m thinking maybe that’s not the
right thing to do on W7.Suggestions?
(Where in W7 is the screen that lets me modify the path?)
—
Al Dykes
News is something someone wants to suppress, everything else is
advertising.
— Lord Northcliffe, publisher of the Daily Mail
That path should be fine.
Regarding the environment variables:
I open the control panel and in the search control panel area I type in
«Environment»
That brings up the selection to edit environment variables.
Michael Walraven
-
#3
to get to the environment variables:
at the start orb input box type
environment
the top two items that result will be for your account / global system
settings
Michael
Contains locally compiled executables
The /usr/local/bin
directory is a location on your system where locally compiled executables are stored. These may be
programs that you have manually compiled and installed from source, or software that is not contained in the standard
Linux distribution repositories.
For example, if you downloaded and compiled a program called helloworld
, after installation, the executable file would
typically reside in /usr/local/bin
. You could run this program from anywhere in the shell by
simply typing helloworld
, because /usr/local/bin
is included in the system’s PATH
.
cd /usr/local/bin
ls
The above commands will navigate to the /usr/local/bin
directory and list all the files in it, respectively.
What It Is Used For
The /usr/local/bin
directory is used for storing system-wide executable files that are not managed by the
distribution’s package manager. It’s a place where the system looks for commands to run, so any executable placed here
can be called from anywhere in the shell.
This directory is part of the PATH
environment variable. The PATH
is a list of directories that your shell searches
through when you enter a command. Because /usr/local/bin
is in your PATH
, any executable files in this directory can
be run from any location.
Why It Is Important
The /usr/local/bin
directory is important because it provides a convenient location for storing executable files that
are not part of the standard Linux distribution. This allows you to easily run these programs from any location without
having to specify the full path to the executable.
Additionally, keeping these files separate from the rest of the system files can help keep your system organized and
make it easier to manage software that you’ve manually installed.
How It May Be Related To Other Directories/Commands/Files
The /usr/local/bin
directory is similar to other bin directories on a Linux system such
as /bin
and /usr/bin
. Each
of these directories is included in the PATH
and is used to store executable files. The primary difference is in the
type of software they store — /bin
is for essential system
binaries, /usr/bin
is for binaries managed by the package manager, and /usr/local/bin
is for locally compiled or manually installed software.
Potential Problems And Pitfalls
While the /usr/local/bin
directory provides a convenient place to store locally compiled executables, there are some
potential problems to be aware of. One common issue is that if you manually install software here, it won’t be managed
by your distribution’s package manager. This means that the software won’t be automatically updated when updates are
available, potentially leaving you with outdated or vulnerable software.
Another potential problem is that if your PATH
is misconfigured, the system may not be able to find the executables
in /usr/local/bin
, leading to command not found
errors. This can be fixed by correctly configuring your PATH
.
Examples In Bash On How To Use It
To add an executable to the /usr/local/bin
directory, you can use the cp
command. For example:
sudo cp ~/Downloads/helloworld /usr/local/bin
This command copies the helloworld
program from your Downloads directory to /usr/local/bin
. Make also sure, that the
command has the execute flag x
in the file permissions. Otherwise, you need to set it using
the chmod
command.
Once the executable is in /usr/local/bin
with the correct permissions, you can run it from anywhere in
the shell by simply typing its name:
helloworld
The output of the command will depend on what the program does. In this case, if helloworld
prints «Hello, World!» to
the console, you would see:
Hello, World!
-
#1
Quick question…
I’m setting up Subversion and am planning on using a plugin called SCPlugin to enable me to commit changes etc. through the finder.
What I need to know is how does one locate folders in the Unix file system in the finder?
I need to get to this location in the finder:
/usr/local/bin
When I click the open button which is used to locate the Subversion executable (which in my case is in /usr/local/bin) I can only see regular finder folders… not the unix folders.
How can I get to /usr/local/bin?
-
#2
Method 1: From the Terminal, type «open -a Finder /usr/local/bin».
Method 2: From Finder’s «Go» menu, select «Go to folder…». That’ll bring up a window in which you can type «/usr/local/bin».
-
#3
Method 3: Get a program such as TinkerTool (too lazy to link you) and unhide all hidden files/folders
-
#4
obelix said:
What I need to know is how does one locate folders in the Unix file system in the finder?
First off, I don’t think /usr/local/bin exists by default. You make have to create it.
Methods 1 & 2 above are correct. Do NOT dick around with method 3, IMHO.
To create the folder (if it doesn’t exist already) and open a Finder window:
In the terminal…
sudo mkdir -p /usr/local/bin
cd /usr/local/bin
open .
-
#5
wow- did not know dick was a kosher word here..
dick. hehehehe
-
#6
Baron58 said:
First off, I don’t think /usr/local/bin exists by default. You make have to create it.
Methods 1 & 2 above are correct. Do NOT dick around with method 3, IMHO.
What’s wrong with TinkerTool? It’s only being used to turn on hidden files and directories — no big deal IMHO.
-
#7
aus_dave said:
What’s wrong with TinkerTool? It’s only being used to turn on hidden files and directories — no big deal IMHO.
because those files/folders are hidden for a reason. so people don’t mess with(in) them.
-
#8
The original question was:
obelix said:
What I need to know is how does one locate folders in the Unix file system in the finder?
I agree that it’s not wise to mess with them if you don’t know what you are doing, but that wasn’t the question .
-
#9
I think you can edit the file «/.hidden» and change what directories are accessible by default through Finder. You might need to reboot for the change to take, though — and always make a backup of any file like this BEFORE you touch it!