Phat Linux V 3.0 (Igloo) User Manual

Version 1.01 July 1999

 


3.0 A brief introduction to Linux

    Before you dive into Phat Linux and configure all your peripherals you should have a basic knowledge of how linux is setup. All cards, drives and other accessories are kept in a special directory, /dev. Each file in the /dev/directory is a device, for example, /dev/ttys0 is the equivalent of ‘COM 1’ in DOS.

Your first (IDE) harddrive is called /dev/hda, the second /dev/hdb. Although /dev/hda actually refers to the first drive on the primary IDE controller, but in most cases this is a harddrive. /dev/hdb refers to the second device on the primary controller and /dev/hdc and /dev/hdd the first and second drives on the secondary harddrive. The secondary controller usually contains a CD-ROM drive. The first partition , or section, of the harddrive is /dev/hda1, the second /dev/hda2, and so on. The floppy drive is /dev/fd0. To access the files on these drives, see mount.

    At this time I should also note that linux is case sensitive, meaning that Linux is different from linux, which is different than linuX. This goes for all commands as well as file names.

In your / directory (pronounced root) you will see numerous directories, including, but not limited to:

/root

The ‘super user’s’ directory

/home

Users home directories

/usr

Contains source, binaries and configuration files

/dev

System files

/boot

Files that linux needs to boot, like the kernel

/etc

Contains linux and program configuration and init files

/tmp

A directory for temporary files

/var

Contains logfiles amongst other things

/proc

Contains the proc file system which contains system information and other interesting things

/lib

Libraries that linux needs

3.1 Basic Linux Commands

    You have a basic knowledge of linux and you are sitting at the prompt. Now you need to learn the fundamental commands to get around linux:

            ls – This command is the equivalent to the DOS command ‘dir’. ls in its simplest form will list all the regular files in               the current directory. There are many different switches for the ls command. To read about them use the ‘man’               command.

            cd – This command is used to change the current working directory. Using ‘cd’ by its self will take you to your home               directory. For more information use ‘man cd’.

            rm – rm is used to remove files. It is the equivalent to the DOS command ‘remove’. More information on rm can be               found by issuing the command ‘man rm’.

            rmdir – rmdir is used to delete directories. All information regarding the command ‘rmdir’ can be found by using               man.

            man – man is the command to learn about linux commands and programs. Just about every command and program               have a man entry and they all follow the same, standard format. To use, simply type man [name of command or               program].

            mv – mv can be used either to move a file from one directory to another or to rename a file. As always, more info.               can be found with the man command.

            cp – cp is the equivalent the DOS command copy. cp’s syntax is exactly that of copy’s. cp [source file] [new file               name].

            mount – mount is the command used to mount a device so it can be read and written to. For example, to mount your               floppy drive, you would type: mount /dev/fd0 /mnt/floppy. Make sure /mnt/floppy exists.

            mkdir – mkdir will create a directory.

            cat – cat [file] will display the contents of a file on screen. Make sure not to ‘cat’ a binary file or you will have to               login again.

            ps – ps, short for process’s running, will show all the process’s running and their pid number. You can then use the              ‘kill’ command to terminate these process’s. ps has many switches including one for showing background process’s.

 

    A unique aspect of Unix/Linux is the ability to ‘pipe’ information from one program to another. For example, if you wanted to search a directory for a file, you could pipe the output of ls to grep, which is a utility, which finds patterns. This would look like ‘ls /dev | grep ttyS1’. The possibilities with piping is endless.

You can also direct the output of a command to an ascii file by using ‘>’ and ‘>>’. By issuing a command like ‘ls > newfile’ it will create a new file called ‘new file’ and write the output of ls to it. If ‘new file’ already exists it will erase the contents. By issuing a command like ‘ls >> oldfile’ it will append the output of ls to ‘oldfile’.


3.2 Basic Programs

    There are (non-X) applications which Phat Linux come bundled with that are very useful. You should definitely check out:

lynx A text only browser
mc Midnight Commander, a great file manager
tin A news reader
pine A mail client
pico A great file editor

 


3.3 Adding/Removing Users

    You can add and remove users and edit their settings through the program 'linuxconf'.


Phat Linux V. 3.0 (Igloo) Manual

Version 1.01 July 1999