Exploring Your Linux System

Accessing Your CD-ROM and Floppy Drive

On most systems, you can access your CD-ROM and Floppy drives through the /mnt folder. This folder will contain a hard linked directory for you CD-ROM (usually /mnt/cdrom) and you floppy (usually /mnt/floppy).

Before any file system can be accessed on Linux it must be mounted. Simply inserting a floppy or CD-ROM will not work.

Tip – If you are running a desktop environment such as KDE or Gnome, these are configured to “automount” your CD-ROM or Floppy. As soon as you insert either, a shortcut will appear on your desktop. To remove either, right click on the icon and select unmount or eject.

To mount a CD-ROM, you must mount the hardware device. Since the directory /mnt/cdrom is linked to the file that corresponds to your CD-ROM hardware, you can type [mount /mnt/cdrom]. Type [mount /mnt/floppy] for a floppy disk. You will then be able to access the files stored on the disk.

Once you are finished reading your CD-ROM or floppy, it must be dismounted. Note that in many cases, you cannot eject your CD-ROM tray until it has been dismounted, even by manually pressing the eject button. If you switch floppy disks without dismounting the old one and mounting the new, you will still see the files of the old floppy, and receive errors if you try to access them. Make sure that all users connected to the system are not accessing the drive, or you will be unable to dismount it.

To dismount type [umount /mnt/floppy] or [umount /mnt/cdrom].

Console Commands

Due to the large number of console commands, it is very difficult to for a compressive list of commands and switches, much less remember them. Fortunately there are a number of ways to receive help in a Linux system.

Most commands have what is called a man page. A man (manual) page contains basic command documentation. To access the man page for a command type [man command]. Use [space] to move down one page, and [q] to quit.

Most commands support inline help, accessed by typing [command –help]. To prevent the help from scrolling of the page, type [command –help | less] and navigate the same way you do in a man page.

Many commands also support a [-?] switch

Below is a list of commands you should be familiar with to successfully work with a Linux system. Please take some time to learn about and work with these commands and note that all commands are entered in lowercase.

clear: Clear Screen

env: Environment Variables

head/tail: Used to display the top or bottom lines in a file. [head -10] will display the top 10 lines.

more/less: Used to parse through text files. More only allows forward movement through a file, wheras less allows movement in both directions. More is older than less. More is often aliased to less, meaning when you run more you get less. Less has more functionality than more. That’s more and less, more or less…….;-)

cat: Displays the contents of a file.

cp: Copies files

mv: Moves and renames files

rm: Deletes files and directories