I recently had the need to install GNU’s Core Utilities on my mac. After a bit of Googling, the easiest, and most straightforward way to proceed was of course with Brew.
Here’s the steps I took for the installation of the GNU packages:
1) Install coreutils and gnu-sed:
2) Edit my .bashrc file to add the corresponding paths:
That’s all there was too it. The commands I needed worked perfectly. That is until I attempted to load up one of my Vagrant boxes. Then that annoying NFS exports prompt came up asking me for my password!? I fixed this before didn’t I?
Vagrant NFS Synced Folders
As most of you know, you can add a little snippet to your /etc/sudoers file so vagrant up doesn’t require your password. It’s in the documentation here, but looks like this for macs:
After some debugging to see what was happening, it became clear what the problem was. Vagrant was running the tee and sed commands from my newly installed GNU packages. Luckily there’s an easy fix: