To the first guy, read the news. Sun is getting bought out by Oracle.
Their no point in learning solaris at the moment cause as of today their no guarantee what will become of it in a year, or if it will remain free.
Solaris users are jumping ship fast. (personally been moving my sun sparc systems to openbsd, way way better os, so well made and not so full of fluff and crap like solaris)
Solaris has its strong points but its biggest killer is it not compatible with anything, by default it uses ZFS which is the greatest thing to ever happen to a harddrive except they licensed in a way that totally kills it for what it could of been.
Comparing Ubuntu to Solaris is like comparing a Expedition to a Mustang(with a v6) well its not the greatest metaphor but I'm kinda tired.
Ubuntu is great as a Desktop operating system. But I find it slightly humorous that it wants to be a server. I mean I know ppl use it that way but really. Ubuntu on a server, with the amount of security patch's they release in a week, not to mention their support schedule. I mean come on, who is going to upgrade every 18 months.
But Ubuntu is very well developed. Its based on Debian, which is on of the oldest distro (slackware is the oldest) around. Ubuntu is held privately like Solaris. But solaris is fairly new to the x86 market, like macOS it doesn't get the same performance on x86 hardware as linux does, macOS does a better job. But solaris has more in common with macos then it does with linux. Solaris mac bsd. Their are from the same code (or at least at one point where part of the same code).
Solaris has paid for the privledge to call itself UNIX(like osx). Ubuntu could try and pay but I highly doubt they'd quality as a system v unix os.
Linux is more user friend and more developer friendly. So really I'd have to recommend it over solaris. Besides the fact that linux has a huge advantage on x86 hardware, namely device drivers.
But an interesting point. The dude behind Debian(what ubuntu is based on) actually works for Sun works on the OpenSolaris project (at least he did back a couple months ago when I read about it.) sorry for rambling
and to the dude above, linux. well ubuntu does not beat solaris on security. I'll put money on that. (though the ssh security glitch might cost me)
And for slackware. well it is extremely close to a unix userland. It uses a very pure rc startup compared with that of ubuntu. And tgz packages. Some other similarities but i've wrote too much as it is. But ubuntu is on the forefront and the latest version 9.10 uses a new startup procedure that is very snappy. I recommend trying them all if you have the time. Its all up to preference. And the default them nimbus on OpenSolaris (especially dark nimbus) is very eye catching(though you can use it on any *nix)
The Java Desktop Enviroment is really nice as well, and solaris has the best flash support.(the only flash support on the sparc64 platform.)