Major difference between Linux and Solaris


Most readers coming here are more familiar with Linux than Solaris. This little page is designed to give those users some tips for running a Solaris box.
It is in no way intended as a definitive guide, and there may be lot better ways of doing things. Feel free to contribute.


ps -ef on Linux will give the full command line, but with Solaris you don’t get it all.
This is particularly critical when looking at java processes.
Fortunately Solaris retains the BSD style binaries in /usr/ucb, so execute:

 /usr/ucb/ps wwaux|grep java



/bin/sh on Solaris is a POSIX complaint bourne shell. If you have written bash-centric scripts, replace #!/bin/sh with #!/bin/bash


Starting of NFS daemon

Instead of

# service nfsserver start

one does:

# svcadm enable network/nfs/server


Instead of the file /etc/exports, under Solaris the file /etc/dfs/dfstab needs to be edited.

Sharing with zfs

Nowadays, you would probably use zfs sharenfs eg:

# zfs set sharenfs=on zpool/sharedfolder

# zfs, zpool/sharedfolder

An attempt at a matrix

Linux command Solaris similar command Comments
top prstat You can compile top on Solaris, but you can’t rely on it’s accuracy
free vmstat
cat /proc/meminfo prtconf | grep Memory
cat /proc/cpuinfo psrinfo -v you can also use prtconf
netstat -p lsof -i lsof is not a default command. You need the package
uname -a isainfo -b to determine how many bits your os is
java -d64 java -d64 Start java with a default of 64 bit. Linux seems to do this by default though.
cat /etc/redhat-release cat /etc/release
sysdef sysdef holds a lot of system info including kernel tunables
lsmod modinfo
strace truss

Another matrix

RHEL Solaris
shutdown -h now (or) poweroff shutdown -y -g0 -i5 (or) init 5
reboot reboot (or) shutdown -y -g0 -i6 (or) init 6
halt halt
/sbin/lsmod modinfo
/sbin/insmod modload
/sbin/rmmod modunload
scanpci /usr/X11/bin/scanpci (or) prtconf -v
lp (or) lpr lp (or /usr/ucb/lpr)
lpstat (or) lpq lpstat (or /usr/ucb/lpq)
/sbin/service –status-all svcs -a
/sbin/service sendmail stop svcadm disable sendmail
/sbin/service sendmail start svcadm enable sendmail
/sbin/service sendmail status svcs sendmail
/sbin/chkconfig –list svcs -a
/sbin/chkconfig –add /etc/rc3.d/f00 svccfg import f00.xml
/sbin/chkconfig sendmail on svcadm enable sendmail
top prstat
cat /proc/cpuinfo psrinfo -v
cat /proc/meminfo prtconf
exportfs exportfs (or) share
(edit /etc/exports) share /home (or) zfs sharenfs=on
(edit /etc/exports) unshare /home (or) zfs sharenfs=off
/sbin/mii-tool ndd (or) /sbin/dladm show-dev
ifconfig ifconfig -a
/sbin/ethtool ndd
/sbin/dhclient dhcpagent
iptables ipfilter
fdisk fdisk (and) format
parted format
mkfs -t ext3 /dev/hda1 mkfs -F ufs /dev/rdsk/c0t0d0s0 (or) newfs /dev/rdsk/c0t0d0s0
cdrecord dev=2,0 f00.iso cdrw -i f00.iso
tar xfvj f00.tar.bz2 gtar xfvj f00.tar.bz2
lvm/pv*/lv*/vg* meta*
(edit /etc/ crle
gcc /opt/csw/bin/gcc
ld /usr/ccs/bin/ld
  • Akinsola

    This is quite resourceful,it really helped me.

  • krishna

    This is very good for beginner

I'm happy to use Increase Sociability.