Quantcast
Channel: How to replace Mac OS X utilities with GNU core utilities? - Ask Different
Viewing all articles
Browse latest Browse all 8

Answer by Jonathan Komar for How to replace Mac OS X utilities with GNU core utilities?

$
0
0

As an alternative to setting the PATH and MANPATH environment variables (which I would actually recommend), it is also possible to symlink binaries to an existing PATH location like this:

You need to know where Homebrew installs coreutils binaries.

/usr/local/opt/coreutils/bin

The /usr/local/opt directory is where Homebrew stores relatively static files that are unlikely to change between updates.

Then you can create symbolic links from there to a location that is already on your PATH. It must be a path that is loaded early on PATH, because the PATH is searched on a first-come, first-serve basis. /usr/local/bin is a good choice based on looking at echo $PATH.

which sha256sum # prove it is not on PATHln -s /usr/local/opt/coreutils/bin/sha256sum /usr/local/bin/which sha256sum # prove it is on PATH

This way, it would almost as easy to create symbolic links. In some cases, like when you want tighter control, it is a good option rather than adding an entire directory to your PATH and MANPATH.


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>