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/ .

DNS

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

Handling files

Deleting a file through its inode

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

Routing

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 0.0.0.0 10.0.0.1 . To add a specific route, type route add -net 192.168.1.0 10.0.0.1 -netmask 255.255.255.0 .

To view routes, type route -nr.

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

Pkg

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
	    integrity.

User Settings

Q&A

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.

Resources

Troubleshooting

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)