Some filesystem differences
Linux directory |
OpenSolaris directory |
---|---|
/home |
/export/home |
/var/log |
/usr/adm, /var/adm, /var/log |
/tmp |
/var/tmp |
/sys |
/devices |
/dev |
/dev |
/lib/modules/foo/* |
/kernel/drv/* |
/boot/grub |
/rpool/boot/grub |
Some command line differences
Linux command |
OpenSolaris command |
Aim |
---|---|---|
sudo |
pfexec |
Execute a command as root |
apt-cache search foo |
pkg search -r foo |
Search for a package containing foo |
apt-get install foo |
pkg install SUNWfoo |
Install package foo |
apt-get dist-upgrade |
pkg image-update |
Upgrade all packages that have updates available |
lsmod |
modinfo |
List loaded drivers |
insmod |
modload |
Load a driver |
rmmod |
modunload |
Unload a loaded driver |
top |
prstat |
List the running processes |
free |
vmstat |
List the free memory |
cat /proc/cpuinfo |
psrinfo -v |
List processor info |
ifconfig |
ifconfig -a |
List all network interfaces |
parted |
format |
Format a disk |
uname -m |
isainfo -v or -b |
instruction set architectures |
ZFS: the Zettabyte File System
One of the most important reasons to use OpenSolaris is its filesystem, ZFS. Conceptually, ZFS is simple: disks are assigned to pools, and data sets are made of pools. Filesystems and volumes are two types of data sets. For pools, OpenSolaris has the administration command zpool and for datasets OpenSolaris has the administration command zfs. We'll focus here on pools. This is how you list the available pools:
$ zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT rpool 15.9G 1.28G 14.6G 8% ONLINE -
Rpool is the default pool created by the distribution's installer. With the zpool status command, you can display the status of all pools:
$ zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c7d0s0 ONLINE 0 0 0 errors: No known data errors
One of the outstanding features of OpenSolaris is related to the filesystem: snapshots. A snapshot is a point-in-time copy of a ZFS filesystem or volume, saving the state for later reference or recovery. You can create a snapshot with the zfs snapshot command, but OpenSolaris 2009.06 has integrated this functionality in Nautilus and the Gnome Administration panel Time Slider.