As I understand it many Mac OS X command-line tools (like ls, cp, chmod, chown etc.) are imported from FreeBSD.

  • Which version of FreeBSD contains the command-line tools most compatible with the OS X ones?
  • What are important differences?
  • Are some of the tools imported from different systems (NetBSD, GNU...)?

My intention is to build a free environment which would contain command-line tools closest to Mac OS X for testing simple shell scripts behaviour in Mac OS X like environment. The filesytem structure, devices or other aspects do not need to be similar.


You probably want to run some variant of Darwin, probably PureDarwin, rather than FreeBSD.

  • Thank you. I know that PureDarwin exists but at least for the beginning I would prefer something with a wider community sacrificing the level of compatibility. In this phase probably the best would be to be able to compile the command-line tools on Linux. – pabouk Aug 29 '13 at 9:07

I'd say the OSX tools are closest to the OSX tools. They are open source, you can download the source directly from Apple:


  • Thank you :) Do they compile without problems on FreeBSD? – pabouk Aug 29 '13 at 8:46
  • Right now I am trying to compile some tools on Linux but I am missing some header files like membership.h. I hope that on FreeBSD I will be more successful. – pabouk Aug 29 '13 at 9:21
  • Yes, I imagine they'd be more likely to compile with FreeBSD. – Kevin Aug 29 '13 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.