Linux Tricks

August 2015

Mounting a CD-ROM drive

To mount a CD-ROM drive under Linux, log in as the system administrator, i.e. with the login "root".
It is then sufficient to mount the drive, i.e. to "capture" the content of the CD-ROM drive in a directory (most of the time /mnt/cdrom/) by typing in the following command:
mount -t iso9660 /dev/cdrom /mnt/cdrom
Do not forget to unmount the drive by using the command
umount /mnt/cdrom

Mounting a MS-DOS partition

Under Linux, it is possible to access MS-DOS partitions by mounting them in the Unix file system. To mount the partition /dev/hda1, it is sufficient to type:
mount -t msdos /dev/hda1 /mnt/hd
Do not forget to unmount the partition
umount /mnt/cdrom

Mounting a floppy disk drive

A floppy disk drive can be mounted just like a MS-DOS partition, and the data contained on a DOS formatted floppy disk can be accessed by using the following command:
mount -t msdos /dev/fd0 /mnt/fd
Do not forget to unmount the floppy disk drive
umount /mnt/fd.

Restarting the computer

To correctly restart the computer, it is sufficient to use the command "shutdown". For most Linux distributions, the keystroke sequence <CTRL> <ALT> <DEL> has been programmed as the equivalent of the command shutdown.
To quickly restart the computer, it is sufficient to type in "shutdown -r now".

Forcing recognition of the SCSI controller

In case the controllers have no bios, they are generally not detected by Linux, in which case detection can be forced by typing in the following at the LILO prompt:
boot: linux tmx8xx=<IRQ>,<adress>
tmx8xx represents a TMC-8xx controller; in case you have a different controller, you must know its name. IRQ represents the interruption of the controller and "addresses" the adress of its shared memory.

Creating an alias

First of all, what is an alias?
An alias is a shortcut which makes it possible to execute another command. The term may also cover other concepts, and an alias may also refer to a shortcut to an email.
The commands under Linux to mount a peripheral device are (as you have seen above) very long to type in.

Instead of typing the command:
"mount -t iso9660 /dev/cdrom /mnt/cdrom"
it is therefore sufficient to type in:
alias cdrom='mount -t iso9660 /dev/cdrom /mnt/cdrom'
it is therefore sufficient to type in "cdrom" to mount this peripheral device.

However, if you ask: Why should I type in this command if I have to declare it every time that I reinitialize the system?
It is actually sufficient to edit the file "/etc/bashrc" and add the following line:
alias cdrom='mount -t iso9660 /dev/cdrom /mnt/cdrom'

For unlimited offline reading, you can download this article for free in PDF format:
Linux-tricks .pdf

See also


Trucos de Linux
Trucos de Linux
Linux-Tipps
Linux-Tipps
Astuces Linux
Astuces Linux
Astuzie Linux
Astuzie Linux
astucias Linux
astucias Linux
This document entitled « Linux Tricks » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.