Install The KSUID Command Line Tool On A Mac

November - 2021

Took me a bit to figure this one out. This is how to get it installed so you can hit it from your command line. (NOTE: I've got go installed. I'm not sure if that's necessary or not. Your milage may vary.)

The install command to run is:

go install github.com/segmentio/ksuid/cmd/ksuid@latest

That installs the app on your $GOPATH which is not a regular environmental variable. It's also not a location that's on your PATH by default. You find it with:

go env GOPATH

That defaults to a go directory in your home directory. Wherever it points, the executable is in the ...go/bin folder. Copy that into /usr/local/bin with something like:

cp ~/go/bin/ksuid /usr/local/bin

And, that should do it.

References:

go install github.com/segmentio/ksuid/cmd/ksuid@latest
cp "" "/usr/local/bin/ksuid"