So we just recently moved to a host that is based on opensolaris rather than a variant of linux. I've found that there are a bunch of commands that don't operate the way I'm used to on linux machines. I'm just wondering what command equivalents others use in linux and opensolaris and vice versa.

Some examples: (linux -> opensolaris)

 ifconfig               -> ifconfig -a
 grep -r "pattern" dir/ -> find dir/. | xargs grep "pattern"

One in particular I'm still trying to figure out:
netstat -tnlp -> ??
(-lnpt shows the listening (-l) process (-p) name, pid and the numerical addresses (-n) of all tcp (-t) connections)

closed as off-topic by HopelessN00b Mar 13 '15 at 17:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

locked by HopelessN00b Mar 13 '15 at 17:50

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.

Read more about locked posts here.


I use the Rosetta Stone for Unix as my resource for looking up commands on an OS when I know what I want to do but I only know the command on another OS.

It's absolutely brilliant. Select the OSes that you're interested in and click 'Draw table'. It'll cut down the table so all you see is, say, Linux and Solaris.


Many good links to command translations (Linux -> OpenSolaris) are listed on the Sun wiki. (Check the bottom of the page for links)

Differences between OpenSolaris and Linux


In general, I think you're going to find that opensolaris doesn't have as many 'convenience' features as linux does; your two examples above are also both good examples of this.


You can get gnu versions of many tools (the same versions as available on linux) installed on solaris, and may have them installed already. A good rule of thumb is to try putting 'g' before the name of the command you are interested in: gtar, ggrep. These of course require the right packages installed - SUNWgtar, SUNWggrp for the examples above on Solaris 10. Take a look in /usr/sfw/bin (and add it to your path if it isn't in there already) to see what tools you have available. Not everything is available this way, and some commands (such as the ifconfig one mentioned above) you just have to learn the different command variants (ifconfig -a works on linux too).

The other common one that I find myself having to remember is the ps syntax to view all processes: BSD: ps ax, Solaris: ps -ef, Linux: either syntax works. On a related note - use pkill instead of killall to kill all processes with a certain name. Killall on Solaris does what the command name suggests and kills all processes, not just those you name.


I come from a dpkg/apt world (Debian/Ubuntu) so I created a nice cheat sheet when learning about OpenSolaris package management (IPS).

APT                    IPS
apt-get install        pkg install
apt-get remove         pkg uninstall
apt-cache search       pkg search
apt-get update         pkg refresh (mostly redundant, pkg refreshes before installing)
apt-get dist-upgrade   pkg image-update
editing sources.list   pkg publisher / pkg set_publisher / pkg unset_publisher 

This is based on an outdated page at OpenSoalris.org comparing apt & IPS.

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