From Terminal, try the command "sysctl hw." You'll get information about your CPU, cache, bus, and RAM. "Sysctl -a" will give you a lot more information but very little will make sense to you.
OS X 10.2 has the command "system_profiler" which is the commandline version of the Apple System Profiler and is, overall, better than the above command. However, one thing system_profiler can't do is tell you have much RAM the Mac has if it'a "pre-New World" Mac such as a beige G3. "Sysctl hw" will make you do the math yourself to convert the RAM figure from bytes to megabytes but its a quick way to find out more about the machine, particularly when used remotely.