Toolserver:Using Solaris

This page explains the differences between Solaris (as used on willow), and the existing login server (nightshade) that runs Linux. It is intended for people converting from Linux, but even if you're an experienced Solaris user, this page documents several Toolserver-specific things.

GNU userland
The Solaris userland (/usr/bin) is quite different to GNU/Linux. To make things easier, we provide the GNU userland as well, and the default $PATH puts the GNU utilities first. This means that most commands (such as 'ls') are the GNU versions, and identical to the Linux versions.

Sometimes, you might want to use the Solaris utilities instead; either because you prefer them, or you need Solaris-specific functionality that the GNU utilities don't provide. There are two ways to do this. If you want to use the Solaris userland permanently, just set $PATH in your shell rc file:

$ PATH=/usr/bin:$PATH

Alternatively, you can just specify the full path, e.g.

$ /usr/bin/id -p

The GNU userland includes "coreutils", "diffutils" and "findutils", as well as gcc, tar and make. If you think any other utilities should be provided, file a request in JIRA.

cron
Solaris cron is different to the Vixie cron that Linux uses. It does not support "/" syntax or @reboot. Instead of /, you can write out the times explicitly, e.g. */10 for minutes becomes 0,10,20,30,40,50. For an @reboot</tt> replacement, see job scheduling.

According to this documentation, Solaris cron doesn't support MAILTO</tt> and requires defining SHELL</tt> in order to use "~" in path names. A .forward</tt> file in your root directory and the use of $HOME</tt> should mitigate these issues.

ACLs
Solaris supports NFSv4 ACLs, which are much more powerful than the POSIX draft ACLs Linux uses. See man -s1 chmod</tt> for a description of how to use NFSv4 ACLs.

/bin/sh
Solaris /bin/sh</tt> is not GNU Bash. If your script needs Bash, use #! /bin/bash</tt> (this also works on Linux). If you need a strictly POSIX-compliant shell, use #! /usr/xpg4/bin/sh</tt>

Third-party software
Additional Toolserver-specific software is installed in /opt/ts</tt>. Usually you won't need to worry about this as it's included in the default $PATH, but if you need to know the location of a particular piece of software, see Solaris software.

Perl modules
If you have any locally installed Perl modules that use XS, they will have to be reinstalled on willow as the compiled code is architecture dependent.

Miscellaneous differences

 * man : instead of man </tt>, use man -s  </tt>.
 * xterm-color: Don't use it, it doesn't work.
 * #! : on Solaris, #!</tt> only accepts one argument. this means that #! /usr/bin/perl -I/home/foo/lib</tt> will work, but #! /usr/bin/perl -I /home/foo/lib</tt> will not.
 * whereis : use which</tt>

Enable delete key
.profile: "\e[3~": delete-char

Also useful: Ctrl+shift keys for word shifting: "\e[5C": forward-word "\e[5D": backward-word