Guide to Unix/Explanations/Determining Hardware

Here are some methods of Determining Hardware currently on the system:

  • run dmesg (works well on *BSD)
  • use KDE Info Center (K Menu -> System -> Info Center)


Clipboard

To do:


Examples

edit

Run dmesg on a *BSD system to determine the kernel version, amount of memory, and whether this computer has an audio device.

$ dmesg | less
...
OpenBSD 3.8 (GENERIC) #425: Sat Sep 10 15:49:26 MDT 2005
    deraadt@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 268435456 (262144K)
avail mem = 236363776 (230824K)
using 1254 buffers containing 13418496 bytes of memory
mainbus0 (root)
...
mpcpcibr1 at mainbus0: uni-north, Revision 0x5
pci1 at mpcpcibr1 bus 0
...
macobio0 at pci1 dev 23 function 0 "Apple Intrepid" rev 0x00
...
snapper0 at macobio0: irq 30,1,2
...
audio0 at snapper0
...

This system has an OpenBSD 3.8 kernel, which matches the OpenBSD 3.8 operating system distribution. (Generally, the kernel on a *BSD matches some version of the system. In contrast, there are many combinations of Linux kernels and systems.)

The real memory is 262144K, but only 230824K is "avail", which probably means available. Divide by 1024 to convert to megabytes, using bc or some other method:

$ bc
262144 / 1024
256
230824 / 1024
225
quit

This computer has 256 MB of memory, but only 225 MB are "avail". Because we used bc, the answers are rounded down to integers.

This line from the dmesg output indicates the presence of an audio device:

audio0 at snapper0

We can go up the dmesg, learning that we have audio0 at snapper0 at macobio0 at pci1 at mpcpcibr1 at mainbus0. However, we are probably only interested in "audio0", which means that we have an audio device, and "snapper0" if we want to know the type of sound card providing this audio. On this computer, it should be possible to install programs that play sound and music.