I agree with using brew install coreutils
to install the tools. But if you want to use them without the g
prefix and are using Oh My Zsh, you can add gnu-utils
to your zshrc file to do enable this easily:
plugins=(... gnu-utils)
More info available here: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gnu-utils