|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This gives information of all your mounted hard disk partitions, available space and used space. The space shown is 1024 blocks which is 1024 bytes or one Kilo Byte. It also shows at which directory the partition is mounted. Like in DOS and Windows partitions and devices are allotted drive letters such as C:, D:, E:; in Linux partitions or devices are mounted onto directories. For example /dev/hda5 is mounted on /dosd. Normally /dosc, /dosd, would be your mounted dos partitions. It could also be anything else. Which means you can access your Dos files through Linux by going through these directories. |
|
|
Another useful command is ls. Type "ls" and you will see something like: |
|
|
|
bin/ dev/ etc/ lost+found/ proc/ tmp/ boot/ dosc/ home/ mnt/ root/ usr/ cdrom/ dosd/ lib/ opt/ sbin/ var/ |
|
|
|
Type "ls -l" to see a more complete list. This will show the owners, permissions, date and time of when last modified and file sizes. You will need to understand file permissions once you get the hang of the basic Linux operations. Permissions are useful for multi-user Linux system where you need to restrict or allow access to files or directories. |
|
|
|
drwxr-xr-x 2 root root 2048 Sep 17 12:49 bin/ drwxr-xr-x 2 root root 1024 Oct 4 23:24 boot/ drwxr-xr-x 2 root root 1024 Sep 2 17:32 cdrom/ drwxr-xr-x 3 root root 21504 Oct 22 12:54 dev/ drwxr-xr-x 2 root root 1024 Oct 2 21:59 dosc/ drwxr-xr-x 13 root root 21504 Jan 1 1970 dosd/ |
|
|
|
The cd command is used to change directories, you can try by typing "cd /" to go the root directory. Type "cd -" to return back to where you were. If you just type "cd" you will return back to your home directory. Installing softwares, opening compressed files under Linux. |
|
|
|
If you download documents, utilities, software or anything else for Linux, you will find that a lot of them have extensions of .tgz or .tar.gz. In that case you will have to type the following command to extract the files. Replace filename.tar.gz with the name of the file. |
|
|
|
gzip -dc filename.tar.gz | tar xvf - |
|
|
|
If you downloaded some Linux files under DOS, chances are that the file names may get truncated. In that case you will have to rename your files before extracting them under Linux. To rename files just type "mv oldfilename newfilename". Replace oldfilename with what the current file name is and replace newfilename with what you want the file name to be. |
|
|
|
Several files are also in the .rpm format. These formats are for the Red Hat and Caldera distribution and they are also used by other distributions. To install rpm's type: |
|
|
|
rpm -i filename.rpm |
|
|
|
If you are upgrading an existing software type: |
|
|
|
rpm -U filename.rpm |
|
|
|
If your distribution does not support RPM's you can add that support by installing the RedHat Packet Manager (RPM). Similarly there is pkginstall under some distributions to manage .tar.gz files. |
|
|
|
Man Man! What's man man ? These are help pages or manuals to get some help on a specific command. To get help on man type "man man". Similarly to get help on rpm type "man rpm". To get help on ls type "man ls" and so on. You can get help on all the command using man. To begin with, get help on commonly used commands. These commands will help you move around files and directories. Some commonly used commands are: |
|
|
|
cat To type the content of a file cp Copy files du To check the disk space used pine Email client find Find files on the linux system grep Search for keywords on a file or a command kill To kill any process, ps to see the process number less If you cat a file you can pipe it to less for page by page viewing ln Create or remove links between files or directories lpr Print files or output to a printer ls List files or directories mkdir To create a new directory more Similar to less but less is better than more! mount See the mounted devices or mount additional devices umount Unmount mounted volumes mv Move or rename a file passwd Change your password ps To see the processes running rm Remove files or directories rmdir Remove directories useradd Add a user to the linux system userdel Delete a user on the linux system usermod Modify a user on the linux system which Find where a program is located who Displays the users logged in zless To see the content of a .gz file (compressed). |
|
|
|
Some more tips for bash users. If you know that the first letter of a command for example is a but don't know the rest type "a" and then press TAB twice and bash will show the list of possibilities. You can also press a single tab to complete a command if there is only one possibility. This saves a lot of typing time. Example type "mou" and then press TAB, bash will put mount on the command line. |
|
|
|
Pressing TAB twice shows all the Linux commands. It looks something like: |
|
|
|
There are 1212 possibilities. Do you really wish to see them all? (y or n) |
|
|
|
Type "y" and you will see all of them! |
|
|
|
Sometimes if you type a command, the screen may scroll by too fast for you to read, unless you are superman. In that case you can see the previous screen by pressing Shift and PG-UP keys together. |
|
|
|
If you type some commands, you can break by pressing CTRL-C or ESC. It may not work in man or less, in that case just type "q". If you need to edit some files try pico or joe. These are two easy to use editors. Joe works more like WordStar and pico is the editor for pine. Power users may try vi or emacs. These two are very powerful editors but have a high learning curve. Examples would be type "joe filename". Replace the filename with the name of the file that you wish to edit. |
|
|
|
Most distrbutions install X-Window. To start X-Window type "startx". X-Window is a GUI for Windows. There are several flavours available which give you different look and feel. |
|
|
|
Most users may want to use some dos floppies or partitions. You can type some dos commands under Linux without mounting your devices. Type "man mtools" to see a list of these commands. These commands start with m, example the dos copy command would be mcopy. Similarly there are several commands such as mattrib, mcd, mcopy, mdel, mdeltree, mdir, mformat, mlabel, mmd, mrd, mmove, mren, mtype, mzip, etc. To see some more Linux documentation's look under the following directories. If the files have .gz extension the to view them type "zless filename.gz" replace filename with the name of the file. |
|
|
|
Hani Qassim is a consultant at Beyond 2000 Solutions, a California based company that has been offering enterprise wide solutions since 1996. |
|
|
|
All Rights reservered by Hani Qassim 1998-1999 |
|