Solaris Hints

From Applied Optics Wiki
Jump to: navigation, search

Familiar with Linux? This page documents some of the differences compared to Solaris 10, so you can hopefully find your way around a bit better.


root's shell is plain sh. I don't want to change the default, so usually just swap to tcsh/bash for convenience when doing things as root.

Startup Services

/etc/init.d/ exists, but contains mostly legacy or convenience scripts. Startup scripts are handled by the Service Management Facility (SMF). Among other things, this will automatically restart services if they fail. Interaction with SMF is through the svc* set of commands.

List services and their state:

svcs -a

Enable/disable/restart a service:

svcadm enable <service>
svcadm disable <service>
svcadm restart <service>

<service> here can be found with the svcs -a command mentioned above. You don't need to specify the whole service name - just a unique name. So for svc:/network/flexlm/cadence:default I'd just cadence or flexlm/cadence as the service name.

Killing services is also a way of restarting them as they get restarted automatically - I use this by preference for the flexlm services because it's more reliable than my restart scripts :)

Config Files

/etc/fstab -> /etc/vfstab


Logs are in both /var/log/ and /var/adm/

General Binaries

If command doesn't do what you expect, then try gcommand instead - these are the GNU equivalents and what you get by default on Linux. So think gdu, gdf, gsed, ...

System Binaries

As well as /usr/sbin/, there is also /usr/ucb/ - they contain binaries that take different command line arguments to do the same task. So the following are equivalent (and cause a reboot):

/usr/sbin/shutdown -y -g0 -i6
/usr/ucb/shutdown -r now


To restart the nfs server, you can use the following instead of svc if you prefer:

/etc/init.d/nfs.server stop
/etc/init.d/nfs.server start

Exported shares (distributed file systems) are stored in /etc/dfs/dfstab.


killall on Linux can be used to kill all processes of a given name. killall on Solaris kills everything. Use pkill on Linux by preference to get out of the killall habit.