Quick Guide to Solaris

As an introduction, I must say that I know very little about Solaris, and what I saw so far doesn't make me feel like learning any more than necessary. And I thought Linux was often a bitch to work with on a daily basis... If you want to maintain some kind of sanity, the first thing to do is to download and install the GNU utilities you came to take for granted.

Installing GNU utilities

Aim at http://www.sunfreeware.com/, and download your favorite goodies. If gzip/gunzip is not available on the Solaris box, first unzip those utilities on a Linux box. Once done, download them through an FTP session.

To install those utilies, pkgadd -d myutility. The utilities I downloaded would install all their files in /usr/local/ .


By default, the Sparc Solaris 7 (2.7) had no /etc/resolv.conf. Here's a sample:
domain acme.com
nameserver nameserver

Handling files

Deleting a file through its inode

cd <directory>
ls -li | pg
find . -inum <inode number> -exec rm "{}" ";"


By default, no route is set up when booting, which means that you cannot connect to any host sitting in a different network. To add a default route, type route add net . To add a specific route, type route add -net -netmask .

To view routes, type route -nr.

To delete any route, just replace add with delete, eg. route delete net


Summary of pkg* commands:

	    pkginfo <pkg>   - test for presence of package.
	    pkgadd -d /<cdrom>/Solaris_2.3 <pkg ...>
			    - add missing packages
	    pkgrm <pkg ...> - remove packages.
	    pkgchk -q <pkg> - test for existence of package
	    pkgchk <options> [pkg] - check installed packages for

User Settings


I compiled and installed Bash on a Solaris Sparc 2.6. Where should I add command aliases?

I tried /etc/profile and /etc/bashrc, to no avail.



I cannot connect to Apache

I downloaded Apache from http://www.sunfreeware.com, installed and launched it, but I cannot connect. Is there some kind of protection?

Killall doesn't work like in Linux

If used with no parameters, it kills all active processes instead of prompting you for a signal.

Temp stuff

As read in Kurt Seifried's Solaris 8 - Good and Bad (Great OS, Terrible Defaults)