(c) Essential information for MSDOS users moving to Unix environments: ----------------------------------------- Written by Koen Verbeke All rights reserved Version 1.0 08/95 100425.2474@compuserve.com ------------------------------------------------------------------------------ This file contains essential information for the Unix novice. It explains some information about the system, what you need to install Linux, how drives are called, how the ports are called, how FDISK works, how common commands work, how to work with wildcards, an explanation of the Unix shells, and where to get help. This is not a howto install Linux! This is pure information for MSDOS users moving to Linux. ------------------------------------------------------------------------------ IMPORTANT! READ THIS TEXT *BEFORE* YOU'RE GETTING STARTED ! ------------------------------------------------------------------------------ The Linux system: ----------------- I will spare you the rich history of Linux ;-) but some 'practical theory' has to be said: 1) first of all: how to get Linux? That 's a quite easy question as there is legio of possibilities of how to get a Linux version. Some examples: - Getting Linux from the internet: you need ftpmail or ftp: You'll find here some sites with their directories and their IP address. + tsx-11.mit.edu : /pub/linux : 18.172.1.2 + sunsite.unc.edu: /pub/Linux : 152.2.22.81 + ftp.uu.net : /systems/unix/linux : 137.39.1.9 - Getting Linux from CompuServe: GO UNIXFORUM and check the Linux library sections. - Getting Slackware: contact Morse Telecommunication: MORSE TELECOMMUNICATION 162 WEST PARK AVENUE LONG BEACH, NEW YORK 11561 Phone: (516) 889-8500 Fax: (516) 889-8665 http://www.morse.net 2) secondly: Since Unix is a multiuser environment, you'll have to log in and out. When you start Linux, you'll be prompted to give in your login name and login password. Now, the first time you start Linux, you'll have to login as 'root' (root is the superuser of the system. When you login as root you can go anywhere you want since you have no restrictons (= complete file permission). In order to prevent yourself destroying your system, you should make an account for yourself. However, since your system will be/is new, you have nothing to lose. In other words: don't stop experimenting! And keep in mind that Unix is quite safe for normal users (= not root). To add users: - login as root. - type 'useradd' or 'adduser'. - give in what's asked. - logout as root and login again as . You may have to log in as root again when you're at a more advanced level. E.g. you can't install the GUI interface of Unix/Linux (the X Window system) when you're an normal user. Only root can do that. 3) GNU General Public License, what does it mean? I'm not going to type the whole license down but in this is the essence: the bulk of the Linux kernel is copyrighted by Linus Thorvalds. Software and other parts of the kernel are copyrighted by their authors. So, Linux is copyrighted but you may redistribute it freely under the terms of the GNU General Public License. One of these terms is that you are allowed to sell the software whenever the source code is included. 4) Since many Unix/Linux novices do not know this, you actually can set a server up and running with Linux and a normal pc with some additional hardware (modems, router, ...). I know some ISPs who use Linux on some Pentiums to get the internet connection established. They do a great job! What do you need to install Linux? ---------------------------------- Well, if you have bought a Linux version (there are several distributions) you have already more than you'll need. The slackware professional is now delivered with four cd-roms: one of them contains everything you need to get a basic Linux system, or if you want, a quite advanced system. You can even choose between some types of system: you can link all the files to your cd-rom so that you spare some disk space or you can install everything you want directly to your hard disk. One thing is needed here: a cd-rom drive ;-) If you have internet access, you can ftp the files that are needed. Some ftp sites where you can download Linux system files are listed above. I will now describe the basic steps you need to follow to get everything you need to setup a Linux system: 1) You'll need two disks to begin with. A bootdisk and a rootdisk. You'll have to make a choice between 1.44MB floppy disks are 1.2MB floppy disks. I assume here that you have 1.44MB floppy disks (the method of setting up 1.2MB disks is the same). I'll now give you a list of bootdisk files; you'll have to choose just ONE of them: - bare.gz This is a boot floppy that will have only support for IDE drives. No cd-roms are supported here. - aztech A new one! Contains IDE, SCSI, and Aztech/ Okano/Orchid/Wearnes non-IDE CD support. - cdu31a.gz Contains IDE, SCSI and the Sony CDU31a/33a driver. - mitsumi.gz Contains IDE, SCSI and the Mitsumi cd-rom driver. - modern.gz Experimental. A newer kernel, contains also all driver (no network drivers, no Sony 535). - net.gz Contains IDE and network drivers. - sbpcd.gz Contains IDE, SCSI, soundblaster pro, panasonic cd-rom drivers. - scsinet.gz Contains IDE, SCSI and SCSI cd-rom drivers. - sony535.gz Contains IDE, SCSI and Sony 535/531 cd-rom drivers. I will now give you a list of ROOTDISK file; again: only ONE file has to be chosen: - color144.gz The menu-based color installation disk for 1.44MB drives. MOST USERS SHOULD USE THIS ROOTDISK. - umsds144.gz This is the same as the color144.gz file with one difference: support for a Linux system in a MSDOS directory. - tty144.gz The terminal based installation disk for 1.44 MB drives. Use this if color144.gz fails or if do not want colors during setup. - colrlite.gz The menu-based color installation disk for 1.2MB drives. - umsds12.gz The same umsds144.gz but only for 1.2MB drives. - tty12.gz The same as tty144.gz but only for 1.2MB drives. Now you have the files you need for your system, you have to make the boot- and the rootdisk. You'll need two programs for this: GZIP.EXE (which is a compression program like ARJ.EXE or RAR.EXE) and RAWRITE.EXE (a utilitie to write the contents of a file directly to floppy without looking at its format. A DOS formatted floppy may however be better in some ways than an empty one). These programs can be found where you found your Linux. 1) GZIP -D COLOR144.GZ (or the file you've chosen) GZIP -D CDU31A.GZ (or the file you've chosen) 2) Run RAWRITE two times: one time for each file. When you have done this you're ready to start installing Linux... but... But you'll need several disk sets too. These disk sets are also delivered with the cd-roms. When you don't have cd-rom, you will have to download them again from the internet. I will not write these disk sets for you down because they change quite rapidly. A Linux kernel for instance is history within a couple of months (and no, that doesn't mean you'll have to get an update each time there's a new release. Update your kernel, say every year). It's a small example of how active the Linux Hacker's Society is. The choice of your disk sets is an important one! After all, these files will make your system. Be sure you know what you download and that all your files are up to date. Drives: ------- Drives are called a bit different than under say MS-DOS, OS/2, NT, ... Unix works with devices. That means that our drives get an other name under Unix. This table will make it clear: MS-DOS and other OSs. Unix/Linux --------------------- ---------- a: /dev/fd0 b: /dev/fd1 ... first (entire) hard drive /dev/hda first HD; primary partition 1 /dev/hda1 first HD; primary partition 2 /dev/hda2 first HD; primary partition 3 /dev/hda3 first HD; primary partition 4 /dev/hda4 first HD; logical partition 1 /dev/hda5 first HD; logical partition 2 /dev/hda6 ... second (entire) hard drive /dev/hdb second HD; primary partition 1 /dev/hdb1 second HD; primary partition 2 /dev/hdb2 second HD; primary partition 3 /dev/hdb3 second HD; primary partition 4 /dev/hdb4 second HD; logical partition 1 /dev/hdb5 second HD; logical partition 2 /dev/hdb6 ... first (entire) SCSI hard drive /dev/sda first SCSI HD; primary partition 1 /dev/sda1 first SCSI HD; logical partition 1 /dev/sda5 ... second (entire) SCSI hard drive /dev/sdb second SCSI HD; primary partition 1 /dev/sdb1 second SCSI HD; logical partition 1 /dev/sdb5 ... So, when I have two hard drives (non-SCSI) and a floppy drive; and the first hard drive is devided into 5 partitions: 3 primary partitions and 2 logical partitions; and the second hard drive is devided into two logical partitions ... Then what have I got? Right: 1 Floppy drive: /dev/fd0 (!) First HD; primary part. 1 /dev/hda1 First HD; primary part. 2 /dev/hda2 First HD; primary part. 3 /dev/hda3 First HD; logical part. 1 /dev/hda5 (!) First HD; logical part. 2 /dev/hda6 Second HD; logical part. 1 /dev/hdb5 (!) Second HD; logical part. 2 /dev/hdb6 Ports: ______ The ports do also have a different name than under the others... The others: Unix: I/O address: IRQ: DMA: ----------- ----- ------------ ---- ---- COM1 ttyS0 3f8 4 n/a COM2 ttyS1 2f8 3 n/a COM3 ttyS2 3e8 4 n/a COM4 ttyS3 2e8 3 n/a LPT1 lp0 378-37f 7 n/a LPT2 lp1 278-27f 5 n/a floppy 1 and 2 fd0/1 3f0-3f7 6 2 floppy 2 and 3 fd2/3 370-377 10 3 Don't bother about I/O addresses, IRQ or DMA. I put it there just to make the table complete. FDISK: ------ You will have to use FDISK in order to make linux partitions. There is one big advantage for the linux FDISK: it is much better, clearer than the MS-DOS one. First of all, you should not make partitions for linux with the FDISK program of an other operating system. However, one exception has to be made: when you use Boot Manager (of OS/2; which is VERY good!), you should create a partition with OS/2's FDISK program, then add that partition to Boot Manager and then make linux partitions - *in* the partition you made with OS/2 - with the linux FDISK program. Secondly, you should not use preformatted disk space to use for linux partitions. Start from empty disk space. Some people told me that this description for OS/2 seems quite difficult: it is NOT. Linux FDISK is very easy to use. When you have two (or more) hard drives, you should give the name of that drive after the FDISK command. An example: FDISK will cause FDISK to give you the first hard drive to work on. FDISK /dev/hdb will cause FDISK to give you the second hard drive to work on. Now you have started FDISK, the first thing you should do is give the 'm' command to see a list of possible commands. Don't get fraightened! ;-) You'll only need a few of these commands... First, give the command 'p' to print the partition table of the current drive on the screen. Take a look... This is what it all means: DEVICE: loot at the table above. BOOT: is this partition bootable or not? BEGIN: on what cluster does this partition begin... START: ... start ... END: ... and end? BLOCKS: most important: how BIG is this partition? One block is 1024 bytes. ID: nevermind ;-) System: what operating system does this partition contain or what format does it have. Now you can conclude what partition has to become a linux partition. Type the command 'm' again. You are now able to delete partitions and make new ones. In other words: make the perfect (for you) system. You can always quit without saving, but once you saved and you deleted partitions, you can start all over again with those partitions. So (I should have told you this earlier ;-) ) please BACKUP you data! ... I have never done that and I'm really sorry about it... I lost my virtual love letters ;-) Let's take a look at the most essential commands of FDISK: d Delete a partition (quite clear I guess) n Add a new partition (quite clear also) p Very important. It is the first thing you should do! It gives you an overview of all partitions on your hard drive(s). q This is always handy when you don't feel comfortable anymore. w Save your new settings and return to the prompt. x No way! ;-) But don't be afraid to experiment! As long as you don't save anything, you can do whatever you want. BTW, when you haven't got much physical RAM (say less than 16MB), you should create a swap partition. Once you made space with linux FDISK, you quit WITH saving changes and you type the following command: MKSWAP Partition: e.g. /dev/hdb5 Size: e.g. the size of that partition in blocks. I have 16MB of physical RAM and a swap partition of 16MB; I think that should do it. Forget it: when I boot linux, it still says: Memory is tight... ;-) When you would get this message, don't be affraid you haven't got enough physical and/or virtual RAM. It just means your kernel takes in memory beneath 1MB. After you made a swap partition, you will need to put it on. You will only have to do that one time because you are still setting up Linux. Later, when you'll have completed the installation, Linux will put the swap partition on by itself. SWAPON Common commands: ---------------- Just like in MSDOS you'll have to know some basic commands for Unix which you'll need to move arround your system. I'll describe some of the most important (the basics) commands: MSDOS: Unix: ------ ----- cd cd To be used as the equivalent MSDOS command. dir ls ls -F (gives the same info as ls but marks the executables). dir gives you a directory list with file permissions and many other things. (this might not work with your distribution however). copy cp To be used as the equivalent MSDOS command. move mv To be used as the equivalent MSDOS command. Note: this command is also used to rename files. del rm To be used as the equivalent MSDOS command. Note: erased files cannot be recovered under Unix. md mkdir To be used as the equivalent MSDOS command. deltree rmdir To be used as the equivalent MSDOS command. echo echo Simply echoes a given string. - grep Searches for a given string in all given files. Syntax: grep - cat Shows the contents of a file at once. - more Shows the contents of a file per screen. - man This command should be used when you do not know the meaning of a command anymore. You'll then get a complete manual, often very detailed. Syntax: man Wildcards: ---------- The usages of wildcards is very much the same as in an MSDOS environment. The only difference is the file system. In theory: * Linux file names can contain up to 256 characters that is, while MSDOS file names are restricted to eight and three characters. * Linux file names may contain several periods while MSDOS file names may only have one: between the file name itself and its extention. * Linux makes a difference between capitals and normal characters, MSDOS doesn't. (I'm here talking about the ext2fs (second extended filesystem); the most recent file system and thus more up to date). In concreto... we need a few examples: MSDOS: is the same as UNIX: ------ ----- dir ls dir *.* ls * dir ?2*.?5? ls ?2*.?5? dir 2*.* ls 2* - ls *o* Of course, you can use these wildcards together with the commands described above. Some handy commands: * passwd setting your password * useradd or adduser depending on your distribution, you use one of these commands to add a user to your system * man a command to look at online manuals. Syntax: man Try e.g. with 'man ls' * grep looking for certain strings in documents. * ps agux gives you a list of all current activities on the system. Search the man pages for ps. Shell: ------ Unix/Linux is a multitasking and multiuser operating system. That means respectively that your computer can handle several tasks at once and that it can handle several users at once. Because Linux runs on pc's, you cannot work with several people at the same time on one pc (unless you have a router and all other equipment needed to work in a network). Therefore, you can login several times. In fact, you can login as much as there are function keys. Twelve times that is. Now, all this is possible thanks to your shell. Without your shell, you wouldn't be able to tell your computer what to do. Your shell converts in other words your input to a language that the underlying system (Unix itself) is able to understand. So, be aware that the shell you use is NOT Unix. You can compare the Unix shell with the command interpreter of MSDOS: COMMAND.COM. With a shell you can write shell scripts, which can be compared with the MSDOS batch files. That is quite handy since you can automate several tasks. There are several types of shells but the most commonly used shells are the Bourne Again Shell (bash) and the Tcsh. Bash is 'a' Bourne shell mixed with some advanced features of the C shell. It is also the default shell of Linux nowadays. Tcsh is an expanded version of the original C shell. And there are quite a few others out there. The type of shell you should decide to use? It's either. As far as the standard commands are concerned, it's all the same. Only when you begin to write shell scripts or when you start to explore the more advanced features of Unix, the differences begin to matter. For more information about these two shells, read the man pages of them. Where to get help? ------------------ For questions about installation, you can contact me. For questions about the topics described above, you can contact me also. Then you can consult the man pages as described above. Otherwise, you can consult books as: * Linux installation and getting started written by Matt Welsh (good!). * When you buy the Slackware Professional (currently version 2.3), you get beside other useful information and offers a thick (!) book that should be able to help you on the right way. * Another thick book is 'Linux Unleashed' from Sams Publishing. It comes with one cd-rom: the slackware. * Unix books for novices are also a good choice. There isn't that much difference between Unix and its clone Linux. When all else fails, you can contact the Linux Society. On the internet there are several possibilities to contact Linux users: * On CompuServe there's a complete forum for Unix users. Just GO UNIXFORUM. * Usenet has several discussion groups: start with the first ;-) - comp.os.linux.help - comp.os.linux.announce - comp.os.linux.development - comp.os.linux.admin - comp.os.linux.misc * There is an IRC (Internet Relay Chat) channel where you can put your questions about Linux. The URL is: 'eu.undernet.org'. However, before going directly to this channel, read the man pages. IRC is manned round the clock. That should be enough to get help ;) but I still have a tip. SSC provides reference cards and other products concerning Unix/Linux. You should contact them and ask them for a catalog. Here's the address: SSC Inc PO Box 55549 Seattle, WA 98155-0549 USA Voice: 206-782-7733 Fax: 206-782-7191 Email: sales@ssc.com W3: http://www.ssc.com/ Really, you should ask them for their reference cards. They're a good help for novices and more experienced users of Unix/Linux. Anyway, I hope you enjoy using Linux. Once you start with it, you won't be able to stop yourself anymore. Don't be afraid to experiment! Kind regards, Koen Verbeke Tarweveld 44 B-8500 Kortrijk Belgium 100425.2474@compuserve.co