support both platform mach and linux