Linux Devices
In Linux you have various special files in
/dev. These files are called devices files. In
the Unix world accessing hardware is different. There you have a
special file which actually runs a driver which in turn accesses the
hardware. The device file is an interface to the actual system
component. Files under /dev also behave
differently than ordinary files. Below are the most important device
files listed.
fd0
First Floppy Drive
fd1
Second Floppy Drive
hda
IDE Hard disk / CD-ROM on the first IDE port (Master)
hdb
IDE Hard disk / CD-ROM on the first IDE port (Slave)
hdc
IDE Hard disk / CD-ROM on the second IDE port (Master)
hdd
IDE Hard disk / CD-ROM on the second IDE port (Slave)
hda1
First partition of the first IDE hard disk
hdd15
Fifteenth partition of the fourth IDE hard disk
sda
SCSI Hard disk with lowest SCSI ID (e.g. 0)
sdb
SCSI Hard disk with next higher SCSI ID (e.g. 1)
sdc
SCSI Hard disk with next higher SCSI ID (e.g. 2)
sda1
First partition of the first SCSI hard disk
sdd10
Tenth partition of the fourth SCSI hard disk
sr0
SCSI CD-ROM with the lowest SCSI ID
sr1
SCSI CD-ROM with the next higher SCSI ID
ttyS0
Serial port 0, COM1 under MS-DOS
ttyS1
Serial port 1, COM2 under MS-DOS
psaux
PS/2 mouse device
gpmdata
Pseudo device, repeater data from GPM (mouse) daemon
cdrom
Symbolic link to the CD-ROM drive
mouse
Symbolic link to the mouse device file
null
Everything pointed to this device will disappear
zero
One can endlessly read zeros out of this device
Setting Up Your Mouse
The mouse can be used in both the Linux console (with gpm) and the X window
environment. The two uses can be made compatible if the gpm repeater is used
to allow the signal to flow to the X server as shown:
mouse => /dev/psaux => gpm => /dev/gpmdata -> /dev/mouse => X
/dev/ttyS0 (repeater) (symlink)
/dev/ttyS1
Set the repeater protocol to be raw (in /etc/gpm.conf) while
setting X to the original mouse protocol in /etc/X11/XF86Config
or /etc/X11/XF86Config-4.
This approach to use gpm even in X has advantages when the mouse is
unplugged inadvertently. Simply restarting gpm with
user@debian:# /etc/init.d/gpm restart
will re-connect the mouse in software without restarting X.
If gpm is disabled or not installed with some reason, make sure to set X to
read directly from the mouse device such as /dev/psaux. For details, refer
to the 3-Button Mouse mini-Howto at
/usr/share/doc/HOWTO/en-txt/mini/3-Button-Mouse.gz,
man gpm,
/usr/share/doc/gpm/FAQ.gz, and
README.mouse.
For PowerPC, in /etc/X11/XF86Config or
/etc/X11/XF86Config-4, set the mouse device to
"/dev/input/mice".
Modern kernels give you the capability to emulate a three-button mouse
when your mouse only has one button. Just add the following lines to
/etc/sysctl.conf file.
# 3-button mouse emulation
# turn on emulation
/dev/mac_hid/mouse_button_emulation = 1
# Send middle mouse button signal with the F11 key
/dev/mac_hid/mouse_button2_keycode = 87
# Send right mouse button signal with the F12 key
/dev/mac_hid/mouse_button3_keycode = 88
# For different keys, use showkey to tell you what the code is.
Disk Space Needed for Tasks
The base woody installation on the author's computer required 117MB.
The installed size for all standard packages was 123MB, with a
download size of 38MB; so 278MB of space was needed to install the
base and all standard packages.
The following table lists sizes reported by aptitude (a very nice
program, by the way) for the tasks listed in tasksel. The system
for which the figures were reported already had all standard packages
installed. Note that some tasks have overlapping constituents, so
the total installed size for two tasks together may be less than
the total obtained by adding the numbers up.
Task Installed Download Space Needed
Size (MB) Size (MB) To Install (MB)
desktop environment 345 118 463
X window system 78 36 114
games 49 14 63
Debian Jr. 340 124 464
dialup system 28 8 36
laptop system 3 1 4
scientific applications 110 30 140
C and C++ 32 15 47
Python 103 30 133
Tcl/Tk 37 11 48
fortran 10 4 14
file server 1 - 1
mail server 4 3 7
usenet news server 6 2 8
print server 48 18 66
conventional unix server 55 19 74
web server 4 1 5
TeX/LaTeX environment 171 64 235
simplified Chinese environment 80 29 109
traditional Chinese environment 166 68 234
Cyrillic environment 29 13 42
French environment 60 18 78
German environment 31 9 40
Japanese environment 110 53 163
Korean environment 178 72 250
Polish environment 58 27 85
Russian environment 12 6 18
Spanish environment 15 4 19