Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

5 Answers 5

up vote 11 down vote accepted

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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