They're similar enough that Linux users can easily migrate to Macs and continue to use the command line interface they're accustomed to.
Of course, the easiest migration path would be just to install Linux on one’s Mac.