Linux definitely has a lot going for it already, but there are certain things - especially those related to improving portability - that could be better. To introduce some facsimile of this, you could check the exit code of every command to look for exit code 127 ('command not found') and append a call to that function after. OS X Yosemite ships with bash-3.2 by default. Instead, it just still needs to focus on improving hardware support and especially power management. commandnotfoundhandle was introduced to Bash version 4.
So what can Linux learn from Mac OS X and improve on? While I don't think that there's ever going to be a truly recognizable desktop environment (although Unity is arguably the closest one to that ideal), Linux can still pride itself on a customizable experience. (For what its worth, my readout says its v1.0.42 and says its the Apple System Profiler Tool. It can be run simply by typing AppleSystemProfiler (no spaces) at the prompt in Terminal.
And those elements combined are why Macs, especially for laptops, have become much more popular in recent years. Evidently, Apple included a command-line version of Apple System Profiler in with Mac OS X, located in the /usr/sbin/ directory. It works well (although not quite as fast as Linux), and it has fantastic power management for great battery life. While the user interface may not be very innovative, it is certainly familiar and still good looking. Elementary OS Luna is a Linux distro based on Ubuntu 12.04 LTS. If you work on a Windows PC and don’t want to build a Hackintosh, you can try this alternative: Elementary OS Luna. And I don't really want to break that tie because, although I love Linux and like to "hate" on OS X because it's proprietary and from Apple, I have to give credit in some areas to Apple's operating system. macOS is definitely one of, if not the most, consistent and aesthetically pleasing desktop OS on the market to date but in order to use it, you still need to get a Mac. After these comparisons, Yosemite and Linux are tied at three apiece.