BASH

Being a Linux sysadmin in a Solaris world

At work we are getting more and more Solaris box’es. Zones in Solaris are great for delivering secure webhotell and email services for large amounts of customers.
But, coming from Linux, Solaris can be a bit frustrating at first. Though Sun has released a OpenSolaris version, development there aren’t even close to what I’m used to in Linux.
I find it a bit interesting looking at Solaris ’cause it shows the power of a open source community, while one can get a bit spoiled in a mono Linux environment I easily take for granted all the great tools available at a Linux box.

Anyway here’s some useful stuff I’ve found out which makes it, for me, a lot easier to get friends with Solaris.
First of all, stuff like using pageup/pagedown keys in manual pages or even with ‘less’ is not common in a default Solaris 5.10 installation.
Since we’re more than one sysadmin at our Solaris box’es, I’ve setup my own environment and alias for commands.
I put a file called jjprofile at every box, and then I have to source the file ($ . ./jjprofile) every time I’ve logged on. A more elegant approach would of course to put this stuff in .bashrc or what ever the file being sourced when logging on.

#when using packages from http://www.blastwave.org/index.fam 
#preferably hit those binaries before Solaris' binaries in the PATH
export PATH="/opt/csw/bin:$PATH"
#less is more (Solaris defaults to more)
export PAGER="less -iMsq"
#include man pages from blastwave packages
export MANPATH="${MANPATH:=/usr/share/man}:/usr/local/man:/opt/csw/man"
#using terminfo from blastwave let 
#you use pageup/down and arrow keys and so on in man pages, less and vim
export TERMINFO="/opt/csw/share/terminfo"

# some aliases, I want to use the 
# gnu binaries which I'm used to
alias vi='/usr/bin/env TERM=xterm-color vim'
alias ls='gls --color=auto'
alias ll='gls -l --color=auto'
alias du='gdu'
alias find='gfind'
alias tar='gtar'
alias grep='ggrep'

Regarding references to blastwave, more info at blastwave.org.