PC Software Manual
Installation of Linux
Aim : To install Linux on the computer wherein the windows was
installed.
Objective : To make students aware that they can install two or more operating systems in a single
system.
Hardware Requirements
The following information represents the minimum hardware requirements necessary to successfully install Red Hat Linux 9:
CPU:
- Minimum: Pentium-class
- Recommended for text-mode: 200 MHz Pentium-class or better
- Recommended for graphical: 400 MHz Pentium II or better
Hard Disk Space (NOTE: Additional space will be required for user data):
- Custom Installation (minimum): 475MB
- Server (minimum): 850MB
- Personal Desktop: 1.7GB
- Workstation: 2.1GB
- Custom Installation (everything): 5.0GB
Memory:
- Minimum for text-mode: 64MB
- Minimum for graphical: 128MB
- Recommended for graphical: 192MB
The Red Hat Installation
Step: 1 Choosing Text or Graphics Installation
Red Hat Linux gives you two choices for installation: text-based or X-based. If you have installed Linux before or are familiar with operating systems, you can use either with equal confidence. The graphical interface installation using X is a more visually pleasant installation process, and it is a neat aspect of Red Hat Linux.
On the other hand, the text-based installation process is more traditional and familiar to veteran Linux users. If you are unsure of how to use X, or not sure of your system configuration with respect to mouse and video card, you should stay with the text-based installation. It guides you through each step with full descriptions on the screen.
Step: 2 Setting Up Your Hard Drive
If you have not set up Linux on your system before, or you need to allocate partitions for Linux on your system, you will need to use a disk-partitioning scheme. Red Hat Linux gives you a choice of two disk partitioning utilities: fdisk and cfdisk. The fdisk utility is similar to the DOS FDISK program.
The cfdisk utility is similar to fdisk but is a little more friendly. Many people find cfdisk easier to use than fdisk, as it uses simple mnemonic commands to perform each function. The choice of partitioning utility is entirely up to you: they both do the same job.
If you have set new partitions on your hard disk for Linux, you will have to reboot your system to make them effective (don't forget to write the partition table to disk when you exit either fdisk or cfdisk!). After a reboot, start the installation process again either from your boot floppies or the CD-ROM, and the new disk partitions will be recognized by Linux.
Step: 3 Formatting the Partitions
After the disk partitions are set, Red Hat will try to detect your swap partition. The installation routine will display a window with the device names of all your swap partitions listed. To format the swap partition, choose one of the partitions listed (or the only entry if you set up only one swap partition) and choose Yes from the menu to start the formatting. The process takes about a minute, depending on the size of the swap partition.
After the swap partition has been formatted and made available to the kernel, the installation routine detects any Linux data partitions. These are displayed with the option to format them. For a new installation, you should format the Linux partition using this screen.
Step: 4 Setting Up Ethernet
During the swap and Linux data-formatting process, Red Hat asks if you want to install Ethernet now. If you have an Ethernet card in your machine and want to set it up while the installation process is running, you can do so. If you don't have an Ethernet card or want to delay the installation for later, that's fine, too; you can skip a few steps.
If you elect to set up Ethernet now, you are asked for a machine name and a domain name. After that, you are asked for the IP address of your machine and the subnet mask (which is generated automatically and probably doesn't need changing). A few other configuration settings based on the IP address may be displayed. Again, the default settings are fine for almost every system.
You will be asked if your machine uses a gateway. If you use a separate machine to access the Internet or another network, answer Yes. If you use a gateway, you will be asked for its identification.
You will also be asked if there is a nameserver to be used by this machine. If your network has a DNS (Domain Name System) server that performs IP address conversions, answer Yes and supply its identification. Otherwise, answer No. You can always add a nameserver later, after the system is up and running.
Step: 5 Setting Up the Mouse
After a message about the Metro-X server supplied with Red Hat Linux and a selection of the type of graphics card to use (if in doubt, select standard VGA or SVGA), you are asked for the type of mouse attached to your system. Select the entry that matches the type of mouse you use, or one that is compatible with your mouse.
You are then asked which device your mouse is attached to. In most cases, the mouse is attached to COM1 (/dev/ttyS0) or COM2 (/dev/ttyS1). Select the proper entry. If you are not sure which port your mouse uses, select COM1; it is the most common configuration.
In multimedia lab pc are not in good condition should I format them I asked to hirendra and alok sir also
Configuring X
If you have selected the X-based installation routine, Red Hat Linux tries to determine your video system so it can start X. If you are using the text-based installation routine, this process is skipped for now.
In most cases, Red Hat Linux will try to set up the X system by checking the type of video card you have. You will probably see a message asking if you want the installation routine to "autoprobe," which means it will try to determine the type of video card and video chipset installed on your machine. If you have a particular reason for not autoprobing (some video cards will hang if they are sent the wrong sequence), you will have to manually supply the configuration information. If you are unsure whether or not autoprobing should be allowed, let it go ahead and try. The worst that can happen (usually) is that the system will hang and you have to reboot.
Selecting Packages to Install
Whether you are using X or text-based installation, you will see a screen that lists all the packages on the Linux CD-ROM. You can select which packages are to be installed during the setup process. You can install as many or as few of these packages as you want. You can delay the installation of many of them until later, if you want.
After selecting the packages to be installed, you will see a message asking if you want to have individual package contents displayed for selection. This lets you select only portions of the more generic packages for installation. If you select this option, you will have to wait by your screen and provide input at regular intervals. If you want Linux to install all the components in a package, answer No to this prompt and you can leave the system to install by itself.
After you have selected the packages to be installed, Red Hat's installation routine will start installing the software. You will see status messages on the screen as the process goes along.
Using LILO
LILO (which means LInux LOader) is a bit tricky to use if you are not familiar with it and its purpose. You need to install the LILO program, which changes the boot sector of your hard drive to allow you to choose between a DOS or a Linux partition as the boot source partition. LILO is included with Red Hat Linux and is installed automaically when you load the system from CD-ROM.
Some of the features of LILO include the following:
It is independent of the file system. You can use LILO with DOS, UNIX, OS/2, and Windows NT.
It can replace the master boot record on your hard drive.
It can use up to 16 different boot images on several partitions on your hard drive. Each image can be protected by a password.
It provides support for boot-sector, map-file, and boot images to reside on different disks or partitions.
Boot and Root Disks
Even if you are installing from CD-ROM, you need three high-capacity floppies (either 1.2MB or 1.44MB). These are a single-boot floppy and two root (also called swap) floppies. The boot floppy holds the kernel used to start Linux the first time. The root or swap floppies hold a small file system that includes utilities needed for the installation.
The Text Mode Installation Program User Interface
The Red Hat Linux text mode installation program uses a screen-based interface that includes most of the on-screen "widgets" commonly found on graphical user interfaces. Figure 3-1, and Figure 3-2, illustrate the screens you will see.
Figure 3-1. Installation Program Widgets as seen in Boot Loader Configuration
Figure 3-2. Installation Program Widgets as seen in Disk Druid
Here is a list of the most important widgets shown in Figure 3-1, and Figure 3-2:
· Window — Windows (usually referred to as dialogs in this manual) will appear on your screen throughout the installation process. At times, one window may overlay another; in these cases, you can only interact with the window on top. When you are finished in that window, it will disappear, allowing you to continue working in the window underneath.
· Checkbox — Checkboxes allow you to select or deselect a feature. The box displays either an asterisk (selected) or a space (unselected). When the cursor is within a checkbox, press [Space] to select an unselected feature or to deselect a selected feature.
· Text Input — Text input lines are regions where you can enter information required by the installation program. When the cursor rests on a text input line, you may enter and/or edit information on that line.
· Text Widget — Text widgets are regions of the screen for the display of text. At times, text widgets may also contain other widgets, such as checkboxes. If a text widget contains more information than can be displayed in the space reserved for it, a scroll bar appears; if you position the cursor within the text widget, you can then use the [Up] and [Down] arrow keys to scroll through all the information available. Your current position is shown on the scroll bar by a # character, which moves up and down the scroll bar as you scroll.
· Scroll Bar — Scroll bars appear on the side or bottom of a window to control which part of a list or document is currently in the window's frame. The scroll bar makes it easy to move to any part of a file.
· Button Widget — Button widgets are the primary method of interacting with the installation program. You progress through the windows of the installation program by navigating these buttons, using the [Tab] and [Enter] keys. Buttons can be selected when they are highlighted.
· Cursor — Although not a widget, the cursor is used to select (and interact) with a particular widget. As the cursor is moved from widget to widget, it may cause the widget to change color, or you may only see the cursor itself positioned in or next to the widget. In Figure 3-1, the cursor is positioned on the OK button. Figure 3-2, shows the cursor on the Edit button.
3.2.1. Using the Keyboard to Navigate
Navigation through the installation dialogs is performed through a simple set of keystrokes. To move the cursor, use [Left], [Right], [Up], and [Down] arrow keys. Use [Tab], and [Alt]-[Tab] to cycle forward or backward through each widget on the screen. Along the bottom, most screens display a summary of available cursor positioning keys.
To "press" a button, position the cursor over the button (using [Tab], for example) and press [Space] or [Enter]. To select an item from a list of items, move the cursor to the item you wish to select and press [Enter]. To select an item with a checkbox, move the cursor to the checkbox and press [Space] to select an item. To deselect, press [Space] a second time.
Pressing [F12] accepts the current values and proceeds to the next dialog; it is equivalent to pressing the OK button.
Caution
Unless a dialog box is waiting for your input, do not press any keys during the installation process (doing so may result in unpredictable behavior).
Welcome to Red Hat Linux
The Welcome screen does not prompt you for any input. Please read over the help text in the left panel for additional instructions and information on where to register your Red Hat Linux product.
Please notice the Hide Help button at the bottom left corner of the screen. The help screen is open by default. If you do not want to view the help information, click on Hide Help to minimize the help portion of the screen.
Click on the Next button to continue.
Language Selection
Using your mouse, select the language you would prefer to use for the installation (see Figure 3-7).
Selecting the appropriate language will also help target your time zone configuration later in the installation. The installation program will try to define the appropriate time zone based on what you specify on this screen.
Figure 3-7. Language Selection
Once you select the appropriate language, click Next to continue.
Keyboard Configuration
Using your mouse, select the correct layout type (for example, U.S. English) for the keyboard you would prefer to use for the installation and as the system default (see Figure 3-7).
Once you have made your selection, click Next to continue.
Figure 3-8. Keyboard Configuration
Tip
To change your keyboard layout type after you have completed the installation, use the Keyboard Configuration Tool.
Type the redhat-config-keyboard command in a shell prompt to launch the Keyboard Configuration Tool. If you are not root, it will prompt you for the root password to continue.
Mouse Configuration
Choose the correct mouse type for your system. If you cannot find an exact match, choose a mouse type that you are sure is compatible with your system (see Figure 3-9).
To determine your mouse's interface, follow the mouse cable back to where it plugs into your system and use the following diagrams. If you are installing Red Hat Linux on a laptop computer, in most cases the pointing device will be PS/2 compatible.
If your mouse is a serial mouse, the port will look similar to .
If your mouse is a PS/2 mouse, the port will look similar to .
If your mouse is a USB mouse, the port will look similar to .
If your mouse is a AT (Advanced Technology) mouse, the port will look similar to .
If you cannot find a mouse that you are sure is compatible with your system, select one of the Generic entries, based on your mouse's number of buttons, and its interface.
Tip
If you have a scroll mouse, select the Generic - Wheel Mouse entry (with your proper mouse port) as the compatible mouse type.
If you have a PS/2, USB, or Bus mouse, you do not need to pick a port and device. If you have a serial mouse, choose the correct port and device that your serial mouse is on.
The Emulate 3 buttons checkbox allows you to use a two-button mouse as if it had three buttons. In general, the graphical interface (the X Window System) is easier to use with a three-button mouse. If you select this checkbox, you can emulate a third, "middle" button by pressing both mouse buttons simultaneously.
Figure 3-9. Mouse Configuration
Tip
To change your mouse configuration after you have completed the installation, use the Mouse Configuration Tool.
Type the redhat-config-mouse command in a shell prompt to launch the Mouse Configuration Tool. If you are not root, it will prompt you for the root password to continue.
To configure your mouse to work as a left-handed mouse, reset the order of the mouse buttons. To do this, after you have booted the system, type gpm -B 321 at the shell prompt.
Choosing to Upgrade or Install
The Upgrade Examine screen appears automatically if the installation program detects a prior version of Red Hat Linux on your system.
Note
If the contents of your /etc/redhat-release file have been changed from the default, your Red Hat Linux installation may not be found when attempting an upgrade to Red Hat Linux 9.
You can relax some of the checks against this file by booting with the following boot command:
boot: linux upgradeany
Use the linux upgradeany command if your Red Hat Linux installation was not given as an option to upgrade.
If you would like to perform an upgrade, select Perform an upgrade of an existing installation.
Be sure to select Customize packages to be upgraded if you would to have more control over which packages are upgraded on your system.
To perform a new installation of Red Hat Linux on your system, select Perform a new Red Hat Linux installation and click Next.
Figure 3-10. Choosing to Upgrade or Install
Installation Type
Choose the type of installation you would like to perform (see Figure 3-11). Red Hat Linux allows you to choose the installation type that best fits your needs. Your options are Personal Desktop, Workstation, Server, Custom, and Upgrade.
Figure 3-11. Choosing Install or Upgrade
Disk Partitioning Setup
Partitioning allows you to divide your hard drive into isolated sections, where each section behaves as its own hard drive. Partitioning is particularly useful if you run more than one operating system. If you are not sure how you want your system to be partitioned, read Appendix E An Introduction to Disk Partitions for more information.
On this screen, you can choose to perform automatic partitioning, or manual partitioning using Disk Druid.
Automatic partitioning allows you to perform an installation without having to partition your drive(s) yourself. If you do not feel comfortable with partitioning your system, it is recommended that you do not choose to partition manually and instead let the installation program partition for you.
To partition manually, choose the Disk Druid partitioning tool.
Warning
The Red Hat Update Agent downloads updated packages to /var/spool/up2date by default. If you partition the system manually, and create a separate /var partition, be sure to create the partition large enough to download package updates.
Figure 3-12. Disk Partitioning Setup
If you chose to manually partition using Disk Druid, refer to Section 3.19 Partitioning Your System.
Warning
If you receive an error after the Disk Partitioning Setup phase of the installation saying something similar to
The partition table on device hda was unreadable. To create new partitions it must be initialized, causing the loss of ALL DATA on this drive.
you may not have a partition table on that drive or the partition table on the drive may not be recognizable by the partitioning software used in the installation program.
Users who have used programs such as EZ-BIOS have experienced similar problems, causing data to be lost (assuming the data was not backed up before the installation began).
No matter what type of installation you are performing, backups of the existing data on your systems should always be made.
Automatic Partitioning
Automatic partitioning allows you to have some control concerning what data is removed (if any) from your system. Your options are:
· Remove all Linux partitions on this system — select this option to remove only Linux partitions (partitions created from a previous Linux installation). This will not remove other partitions you may have on your hard drive(s) (such as VFAT or FAT32 partitions).
· Remove all partitions on this system — select this option to remove all partitions on your hard drive(s) (this includes partitions created by other operating systems such as Windows 9x/NT/2000/ME/XP or NTFS partitions).
Caution
If you select this option, all data on the selected hard drive(s) will be removed by the installation program. Do not select this option if you have information that you want to keep on the hard drive(s) where you are installing Red Hat Linux.
· Keep all partitions and use existing free space — select this option to retain your current data and partitions, assuming you have enough free space available on your hard drive(s).
Figure 3-13. Automatic Partitioning
Using your mouse, choose the hard drive(s) on which you want Red Hat Linux to be installed. If you have two or more hard drives, you can choose which hard drive(s) should contain this installation. Unselected hard drives, and any data on them, will not be touched.
Note
It is always a good idea to back up any data that you have on your systems. For example, if you are upgrading or creating a dual-boot system, you should back up any data you wish to keep on your hard drive(s). Mistakes do happen and can result in the loss all of your data.
To review and make any necessary changes to the partitions created by automatic partitioning, select the Review option. After selecting Review and clicking Next to move forward, you will see the partitions created for you in Disk Druid. You will also be able to make modifications to these partitions if they do not meet your needs.
Click Next once you have made your selections to proceed.
Partitioning Your System
If you chose automatic partitioning and did not select Review, please skip ahead to Section 3.21 Network Configuration.
If you chose automatic partitioning and selected Review, you can either accept the current partition settings (click Next), or modify the setup using Disk Druid, the manual partitioning tool.
At this point, you must tell the installation program where to install Red Hat Linux. This is done by defining mount points for one or more disk partitions in which Red Hat Linux will be installed. You may also need to create and/or delete partitions at this time (refer to Figure 3-14).
Note
If you have not yet planned how you will set up your partitions, refer to Appendix E An Introduction to Disk Partitions. At a bare minimum, you need an appropriately-sized root partition, and a swap partition equal to twice the amount of RAM you have on the system.
Figure 3-14. Partitioning with Disk Druid
The partitioning tool used by the installation program is Disk Druid. With the exception of certain esoteric situations, Disk Druid can handle the partitioning requirements for a typical installation.
3.19.1. Graphical Display of Hard Drive(s)
Disk Druid offers a graphical representation of your hard drive(s).
Using your mouse, click once to highlight a particular field in the graphical display. Double-click to edit an existing partition or to create a partition out of existing free space.
Above the display, you will see the drive name (such as /dev/hda), the geom (which shows the hard disk's geometry and consists of three numbers representing the number of cylinders, heads, and sectors as reported by the hard disk), and the model of the hard drive as detected by the installation program.
3.19.2. Disk Druid's Buttons
These buttons control Disk Druid's actions. They are used to change the attributes of a partition (for example the file system type and mount point) and also to create RAID devices. Buttons on this screen are also used to accept the changes you have made, or to exit Disk Druid. For further explanation, take a look at each button in order:
· New: Used to request a new partition. When selected, a dialog box appears containing fields (such as mount point and size) that must be filled in.
· Edit: Used to modify attributes of the partition currently selected in the Partitions section. Selecting Edit opens a dialog box. Some or all of the fields can be edited, depending on whether the partition information has already been written to disk.
You can also edit free space as represented in the graphical display to create a new partition within that space. Either highlight the free space and then select the Edit button, or double-click on the free space to edit it.
· Delete: Used to remove the partition currently highlighted in the Current Disk Partitions section. You will be asked to confirm the deletion of any partition.
· Reset: Used to restore Disk Druid to its original state. All changes made will be lost if you Reset the partitions.
· RAID: Used to provide redundancy to any or all disk partitions. It should only be used if you have experience using RAID. To read more about RAID, refer to the Red Hat Linux Customization Guide.
To make a RAID device, you must first create software RAID partitions. Once you have created two or more software RAID partitions, select RAID to join the software RAID partitions into a RAID device.
· LVM: Allows you to create an LVM logical volume. The role of LVM (Logical Volume Manager) is to present a simple logical view of underlying physical storage space, such as a hard drive(s). LVM manages individual physical disks — or to be more precise, the individual partitions present on them. It should only be used if you have experience using LVM. To read more about LVM, refer to the Red Hat Linux Customization Guide.
To create an LVM logical volume, you must first create partitions of type physical volume (LVM). Once you have created one or more physical volume (LVM) partitions, select LVM to create an LVM logical volume.
3.19.3. Partition Fields
Above the partition hierarchy are labels which present information about the partitions you are creating. The labels are defined as follows:
· Device: This field displays the partition's device name.
· Mount Point/RAID/Volume: A mount point is the location within the directory hierarchy at which a volume exists; the volume is "mounted" at this location. This field indicates where the partition will be mounted. If a partition exists, but is not set, then you need to define its mount point. Double-click on the partition or click the Edit button.
· Type: This field shows the partition's type (for example, ext2, ext3, or vfat).
· Format: This field shows if the partition being created will be formatted.
· Size (MB): This field shows the partition's size (in MB).
· Start: This field shows the cylinder on your hard drive where the partition begins.
· End: This field shows the cylinder on your hard drive where the partition ends.
Hide RAID device/LVM Volume Group members: Select this option if you do not want to view any RAID device or LVM Volume Group members that have been created.
3.19.4. Recommended Partitioning Scheme
Unless you have a reason for doing otherwise, we recommend that you create the following partitions:
· A swap partition (at least 32MB) — swap partitions are used to support virtual memory. In other words, data is written to a swap partition when there is not enough RAM to store the data your system is processing. The size of your swap partition should be equal to twice your computer's RAM, or 32MB, whichever amount is larger.
For example, if you have 1GB of RAM or less, your swap partition should be at least equal to the amount of RAM on your system, up to two times the RAM. For more than 1GB of RAM, 2GB of swap is recommended. Creating a large swap space partition will be especially helpful if you plan to upgrade your RAM at a later time.
· A /boot partition (100MB) — the partition mounted on /boot contains the operating system kernel (which allows your system to boot Red Hat Linux), along with files used during the bootstrap process. Due to the limitations of most PC BIOSes, creating a small partition to hold these files is a good idea. For most users, a 100MB boot partition is sufficient.
Warning
Do not create your /boot partition as an LVM partition type. The boot loaders included with Red Hat Linux cannot read LVM partitions and you will not be able to boot your Red Hat Linux system.
Caution
While partitioning your hard drive, keep in mind that the BIOS in some older systems cannot access more than the first 1024 cylinders on a hard drive. If this is the case, leave enough room for the /boot Linux partition on the first 1024 cylinders of your hard drive to boot Linux. The other Linux partitions can be after cylinder 1024.
If your hard drive is more than 1024 cylinders, you may need to create a /boot partition if you want the / (root) partition to use all of the remaining space on your hard drive.
In the disk partitioning tool parted, 1024 cylinders equals 528MB (this exact number is dependent on your BIOS, however). Refer to http://www.pcguide.com/ref/hdd/bios/sizeMB504-c.html for more information.
· A root partition (1.7-5.0GB) — this is where "/" (the root directory) will be located. In this setup, all files (except those stored in /boot) are on the root partition. A 1.7GB root partition will permit the equivalent of a personal desktop installation (with very little free space), while a 5.0GB root partition will let you install every package.
3.19.5. Adding Partitions
To add a new partition, select the New button. A dialog box appears (see Figure 3-15).
Note
You must dedicate at least one partition for this installation, and optionally more. For more information
Figure 3-15. Creating a New Partition
· Mount Point: Enter the partition's mount point. For example, if this partition should be the root partition, enter /; enter /boot for the /boot partition, and so on. You can also use the pull-down menu to choose the correct mount point for your partition.
· File System Type: Using the pull-down menu, select the appropriate file system type for this partition. For more information on file system types, see Section 3.19.5.1 File System Types.
· Allowable Drives: This field contains a list of the hard disks installed on your system. If a hard disk's box is highlighted, then a desired partition can be created on that hard disk. If the box is not checked, then the partition will never be created on that hard disk. By using different checkbox settings, you can have Disk Druid place partitions as you see fit, or let Disk Druid decide where partitions should go.
· Size (Megs): Enter the size (in megabytes) of the partition. Note, this field starts with 100 MB; unless changed, only a 100 MB partition will be created.
· Additional Size Options: Choose whether to keep this partition at a fixed size, to allow it to "grow" (fill up the available hard drive space) to a certain point, or to allow it to grow to fill any remaining hard drive space available.
If you choose Fill all space up to (MB), you must give size constraints in the field to the right of this option. This allows you to keep a certain amount of space free on your hard drive for future use.
· Force to be a primary partition: Select whether the partition you are creating should be one of the first four partitions on the hard drive. If unselected, the partition created will be a logical partition. for more information.
· Check for bad blocks: Checking for bad blocks can help prevent data loss by locating the bad blocks on a drive and making a list of them to prevent using them in the future. If you wish to check for bad blocks while formatting each file system, please make sure to select this option.
Selecting Check for bad blocks may dramatically increase your total installation time. Since most newer hard drives are quite large in size, checking for bad blocks may take a long time; the length of time depends on the size of your hard drive. If you choose to check for bad blocks, you can monitor your progress on virtual console #5.
· Ok: Select Ok once you are satisfied with the settings and wish to create the partition.
· Cancel: Select Cancel if you do not want to create the partition.
3.19.5.1. File System Types
Red Hat Linux allows you to create different partition types, based on the file system they will use. The following is a brief description of the different file systems available, and how they can be utilized.
· ext2 — An ext2 file system supports standard Unix file types (regular files, directories, symbolic links, etc). It provides the ability to assign long file names, up to 255 characters. Versions prior to Red Hat Linux 7.2 used ext2 file systems by default.
· ext3 — The ext3 file system is based on the ext2 file system and has one main advantage — journaling. Using a journaling file system reduces time spent recovering a file system after a crash as there is no need to fsck the file system. The ext3 file system is selected by default and is highly recommended.
· physical volume (LVM) — Creating one or more physical volume (LVM) partitions allows you to create an LVM logical volume. For more information regarding LVM, refer to the Red Hat Linux Customization Guide.
· software RAID — Creating two or more software RAID partitions allows you to create a RAID device. For more information regarding RAID, refer to the chapter RAID (Redundant Array of Independent Disks) in the Red Hat Linux Customization Guide.
· swap — Swap partitions are used to support virtual memory. In other words, data is written to a swap partition when there is not enough RAM to store the data your system is processing.
· vfat — The VFAT file system is a Linux file system that is compatible with Microsoft Windows long filenames on the FAT file system.
3.19.6. Editing Partitions
To edit a partition, select the Edit button or double-click on the existing partition.
Note
If the partition already exists on your hard disk, you will only be able to change the partition's mount point. If you want to make any other changes, you will need to delete the partition and recreate it.
3.19.7. Deleting a Partition
To delete a partition, highlight it in the Partitions section and click the Delete button. You will be asked to confirm the deletion.
Skip to Boot Loader Configuration for further installation instructions.
Notes
The fsck application is used to check the file system for metadata consistency and optionally repair one or more Linux file systems.
Boot Loader Configuration
In order to boot the system without a boot diskette, you usually need to install a boot loader. A boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software. The kernel, in turn, initializes the rest of the operating system.
The installation program provides two boot loaders for you to choose from, GRUB and LILO.
GRUB (GRand Unified Bootloader), which is installed by default, is a very powerful boot loader. GRUB can load a variety of free operating systems, as well as proprietary operating systems with chain-loading (the mechanism for loading unsupported operating systems, such as DOS or Windows, by loading another boot loader).
LILO (LInux LOader) is a versatile boot loader for Linux. It does not depend on a specific file system, can boot Linux kernel images from floppy diskettes and hard disks, and can even boot other operating systems.
Figure 3-16. Boot Loader Configuration
If you do not want to install GRUB as your boot loader, click Change boot loader. You can then choose to install LILO or choose not to install a boot loader at all.
If you already have a boot loader that can boot Linux and do not want to overwrite your current boot loader, or if you plan to boot the system using boot diskettes, choose Do not install a boot loader by clicking on the Change boot loader button.
Caution
If you choose not to install GRUB or LILO for any reason, you will not be able to boot the system directly, and you will need to use another boot method (such as a boot diskette). Use this option only if you are sure you have another way of booting the system!
An opportunity to create a boot diskette is available toward the end of the installation process
Every bootable partition is listed, including partitions used by other operating systems. The partition holding the system's root file system will have a Label of Red Hat Linux (for GRUB) or linux (for LILO). Other partitions may also have boot labels. If you would like to add or change the boot label for other partitions that have been detected by the installation program, click once on the partition to select it. Once selected, you can change the boot label by clicking the Edit button.
Select Default beside the preferred boot partition to choose your default bootable OS. You will not be able to move forward in the installation unless you choose a default boot image.
Note
The Label column lists what you must enter at the boot prompt, in non-graphical boot loaders, in order to boot the desired operating system.
Once you have loaded the GRUB boot screen, use the arrow keys to choose a boot label or type [e] for edit. You will be presented with a list of items in the configuration file for the boot label you have selected.
At the graphical LILO screen, press [Ctrl]-[x] to exit to the boot: prompt. If you forget the boot labels defined on your system, you can always press [Tab] at the prompt to display a list of defined boot labels.
Boot loader passwords provide a security mechanism in an environment where physical access to your server is available.
If you are installing a boot loader, you should create a password to protect your system. Without a boot loader password, users with access to your system can pass options to the kernel which can compromise your system security. With a boot loader password in place, the password must first be entered in order to select any non-standard boot options.
If you choose to use a boot loader password to enhance your system security, be sure to select the checkbox labeled Use a boot loader password.
Once selected, enter a password and confirm it.
To configure more advance boot loader options, such as changing the drive order or passing options to the kernel, be sure Configure advanced boot loader options is selected before clicking Next.
3.20.1. Advanced Boot Loader Configuration
Now that you have chosen which boot loader to install, you can also determine where you want the boot loader to be installed. You may install the boot loader in one of two places:
The master boot record (MBR)
This is the recommended place to install a boot loader, unless the MBR already starts another operating system loader, such as System Commander. The MBR is a special area on your hard drive that is automatically loaded by your computer's BIOS, and is the earliest point at which the boot loader can take control of the boot process. If you install it in the MBR, when your machine boots, GRUB (or LILO) will present a boot prompt. You can then boot Red Hat Linux or any other operating system that you have configured the boot loader to boot.
The first sector of your boot partition
This is recommended if you are already using another boot loader on your system. In this case, your other boot loader will take control first. You can then configure that boot loader to start GRUB (or LILO), which will then boot Red Hat Linux.
Figure 3-17. Boot Loader Installation
If your system will use only Red Hat Linux, you should choose the MBR. For systems with Windows 95/98, you should also install the boot loader to the MBR so that it can boot both operating systems.
Click the Change Drive Order button if you would like to rearrange the drive order or if your BIOS does not return the correct drive order. Changing the drive order may be useful if you have multiple SCSI adapters, or both SCSI and IDE adapters, and you want to boot from the SCSI device.
The Force LBA32 (not normally required) option allows you to exceed the 1024 cylinder limit for the /boot partition. If you have a system which supports the LBA32 extension for booting operating systems above the 1024 cylinder limit, and you want to place your /boot partition above cylinder 1024, you should select this option.
Tip
While partitioning your hard drive, keep in mind that the BIOS in some older systems cannot access more than the first 1024 cylinders on a hard drive. If this is the case, leave enough room for the /boot Linux partition on the first 1024 cylinders of your hard drive to boot Linux. The other Linux partitions can be after cylinder 1024.
In parted, 1024 cylinders equals 528MB. Refer to http://www.pcguide.com/ref/hdd/bios/sizeMB504-c.html for more information.
If you wish to add default options to the boot command, enter them into the Kernel parameters field. Any options you enter will be passed to the Linux kernel every time it boots.
3.20.2. Rescue Mode
If you need to use rescue mode, there are several options available to you.
· Using the CD-ROM to boot, type linux rescue at the boot: prompt.
· By booting your system from an installation boot diskette made from the boot.img image. This method requires that the Red Hat Linux CD-ROM #1 be inserted as the rescue image or that the rescue image be on the hard drive as an ISO image. Once you have booted using this diskette, type linux rescue at the boot: prompt.
· By booting from a network diskette made from the bootnet.img or PCMCIA boot diskettes made from pcmcia.img. Once you have booted using this diskette, type linux rescue at the boot: prompt. You can only do this if your network connection is working. You will need to identify the network host and transfer type.
For more information, refer to the Red Hat Linux Customization Guide.
3.20.3. Alternative Boot Loaders
If you do not wish to use a boot loader, you have several alternatives:
Boot diskette
You can use the boot diskette created by the installation program (if you create one).
LOADLIN
You can load Linux from MS-DOS. Unfortunately, this requires a copy of the Linux kernel (and an initial RAM disk, if you have a SCSI adapter) to be available on an MS-DOS partition. The only way to accomplish this is to boot your Red Hat Linux system using some other method (for example, from a boot diskette) and then copy the kernel to an MS-DOS partition. LOADLIN is available from
ftp://metalab.unc.edu/pub/Linux/system/boot/dualboot/
and associated mirror sites.
SYSLINUX
SYSLINUX is an MS-DOS program very similar to LOADLIN. It is also available from
ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/
and associated mirror sites.
Commercial boot loaders
You can load Linux using commercial boot loaders. For example, System Commander and Partition Magic are able to boot Linux (but still require GRUB or LILO to be installed in your Linux root partition).
Note
Boot loaders such as LOADLIN and System Commander are considered to be third-party boot loaders and are not supported by Red Hat.
3.20.4. SMP Motherboards, GRUB, and LILO
This section is specific to SMP motherboards only. SMP, short for Symmetric Multiprocessing, is a computer architecture providing fast performance by making multiple CPUs available to complete individual processes simultaneously (multiprocessing).
If the installation program detects an SMP motherboard on your system, it will automatically create two boot loader entries.
Note
Intel® Pentium® 4 systems with hyperthreading will have an SMP kernel installed by default.
The two GRUB entries will be Red Hat Linux (kernel version) and Red Hat Linux (kernel version-smp). The Red Hat Linux (kernel version-smp) will boot by default. However, if you have trouble with the SMP kernel, you can elect to boot the Red Hat Linux (kernel version) entry instead. You will retain all the functionality as before, but you will only be operating with a single processor.
The two LILO entries will be linux and linux-up. The linux entry will boot by default. However, if you have trouble with the SMP kernel, you can elect to boot the linux-up entry instead. You will retain all the functionality as before, but you will only be operating with a single processor.
Network Configuration
If you do not have a network device, you will not see this screen. Skip ahead toFirewall Configuration.
If you have a network device and you have not already configured your networking (such as supplying a network driver diskette you created and entering in your network information as prompted), you now have the opportunity (as shown in Figure 3-18) to do so.
Firewall Configuration
Red Hat Linux offers firewall protection for enhanced system security. A firewall exists between your computer and the network, and determines which resources on your computer remote users on the network can access. A properly configured firewall can greatly increase the security of your system.
Figure 3-20. Firewall Configuration
Choose the appropriate security level for your system.
High
If you choose High, your system will not accept connections (other than the default settings) that are not explicitly defined by you. By default, only the following connections are allowed:
· DNS replies
· DHCP — so any network interfaces that use DHCP can be properly configured
If you choose High, your firewall will not allow the following:
· Active mode FTP (passive mode FTP, used by default in most clients, should still work)
· IRC DCC file transfers
· RealAudio™
· Remote X Window System clients
If you are connecting your system to the Internet, but do not plan to run a server, this is the safest choice. If additional services are needed, you can choose Customize to allow specific services through the firewall.
Note
If you select a medium or high firewall to be setup during this installation, network authentication methods (NIS and LDAP) will not work.
Medium
If you choose Medium, your firewall will not allow remote machines to have access to certain resources on your system. By default, accesses to the following resources are not allowed:
· Ports lower than 1023 — the standard reserved ports, used by most system services, such as FTP, SSH, telnet, HTTP, and NIS.
· The NFS server port (2049) — NFS is disabled for both remote severs and local clients.
· The local X Window System display for remote X clients.
· The X Font server port (by default, xfs does not listen on the network; it is disabled in the font server).
If you want to allow resources such as RealAudio™ while still blocking access to normal system services, choose Medium. Select Customize to allow specific services through the firewall.
Note
If you select a medium or high firewall to be setup during this installation, network authentication methods (NIS and LDAP) will not work.
No Firewall
No firewall provides complete access to your system and does no security checking. Security checking is the disabling of access to certain services. This should only be selected if you are running on a trusted network (not the Internet) or plan to do more firewall configuration later.
Choose Customize to add trusted devices or to allow additional incoming services.
Trusted Devices
Selecting any of the Trusted Devices allows access to your system for all traffic from that device; it is excluded from the firewall rules. For example, if you are running a local network, but are connected to the Internet via a PPP dialup, you can check eth0 and any traffic coming from your local network will be allowed. Selecting eth0 as trusted means all traffic over the Ethernet is allowed, put the ppp0 interface is still firewalled. If you want to restrict traffic on an interface, leave it unchecked.
It is not recommended that you make any device that is connected to public networks, such as the Internet, a Trusted Device.
Allow Incoming
Enabling these options allow the specified services to pass through the firewall. Note, during a workstation installation, the majority of these services are not installed on the system.
DHCP
If you allow incoming DHCP queries and replies, you allow any network interface that uses DHCP to determine its IP address. DHCP is normally enabled. If DHCP is not enabled, your computer can no longer get an IP address.
SSH
Secure SHell (SSH) is a suite of tools for logging into and executing commands on a remote machine. If you plan to use SSH tools to access your machine through a firewall, enable this option. You need to have the openssh-server package installed in order to access your machine remotely, using SSH tools.
Telnet
Telnet is a protocol for logging into remote machines. Telnet communications are unencrypted and provide no security from network snooping. Allowing incoming Telnet access is not recommended. If you do want to allow inbound Telnet access, you will need to install the telnet-server package.
WWW (HTTP)
The HTTP protocol is used by Apache (and by other Web servers) to serve webpages. If you plan on making your Web server publicly available, enable this option. This option is not required for viewing pages locally or for developing webpages. You will need to install the httpd package if you want to serve webpages.
Enabling WWW (HTTP) will not open a port for HTTPS. To enable HTTPS, specify it in the Other ports field.
Mail (SMTP)
If you want to allow incoming mail delivery through your firewall, so that remote hosts can connect directly to your machine to deliver mail, enable this option. You do not need to enable this if you collect your mail from your ISP's server using POP3 or IMAP, or if you use a tool such as fetchmail. Note that an improperly configured SMTP server can allow remote machines to use your server to send spam.
FTP
The FTP protocol is used to transfer files between machines on a network. If you plan on making your FTP server publicly available, enable this option. You must install the vsftpd package for this option to be useful.
Other ports
You can allow access to ports which are not listed here, by listing them in the other ports field. Use the following format: port:protocol. For example, if you want to allow IMAP access through your firewall, you can specify imap:tcp. You can also explicitly specify numeric ports; to allow UDP packets on port 1234 through the firewall, enter 1234:udp. To specify multiple ports, separate them with commas.
Tip
To change your security level configuration after you have completed the installation, use the Security Level Configuration Tool.
Type the redhat-config-securitylevel command in a shell prompt to launch the Security Level Configuration Tool. If you are not root, it will prompt you for the root password to continue.
Figure 3-18. Network Configuration
The installation program will automatically detect any network devices you have and display them in the Network Devices list.
Once you have selected a network device, click Edit. From the Edit Interface pop-up screen, you can choose to configure the IP address and Netmask of the device via DHCP (or manually if DHCP is not selected) and you can choose to activate the device at boot time. If you select Activate on boot, your network interface will be started when you boot. If you do not have DHCP client access or you are unsure what to provide here, please contact your network administrator.
Figure 3-19. Editing a Network Device
Note
Do not use the numbers as seen in this sample configuration. These values will not work for your own network configuration. If you are not sure what values to enter, contact your network administrator for assistance.
If you have a hostname (fully qualified domain name) for the network device, you can choose to have DHCP (Dynamic Host Configuration Protocol) automatically detect it or you can manually enter the hostname in the field provided.
Finally, if you entered the IP and Netmask information manually, you may also enter the Gateway address and the Primary, Secondary, and Tertiary DNS addresses.
Tip
Even if your computer is not part of a network, you can enter a hostname for your system. If you do not take this opportunity to enter a name, your system will be known as local host.
Tip
To change your network configuration after you have completed the installation, use the Network Administration Tool.
Type the redhat-config-network command in a shell prompt to launch the Network Administration Tool. If you are not root, it will prompt you for the root password to continue.
Language Support Selection
You can install and support multiple languages for use on your system.
You must select a language to use as the default language. The default language will be used on the system once the installation is complete. If you choose to install other languages during this installation, you can change your default language after the installation.
If you are only going to use one language on your system, selecting only that language will save significant disk space. The default language is the language you selected to use during the installation.
Caution
If you select only one language, you will only be able to use that specified language after the installation is complete.
Figure 3-21. Language Support Selection
To use more than one language on your system, choose specific languages to be installed or select all languages to have all available languages installed on your Red Hat Linux system.
Use the Reset button to cancel your selections. Resetting will revert to the default; only the language you selected for use during the installation will be installed.
Tip
To change the language configuration after you have completed the installation, use the Language Configuration Tool.
Type the redhat-config-language command in a shell prompt to launch the Language Configuration Tool. If you are not root, it will prompt you for the root password to continue.
Time Zone Configuration
You can set your time zone by selecting your computer's physical location or by specifying your time zone's offset from Universal Time, Coordinated (UTC).
Notice the two tabs at the top of the screen (see Figure 3-22). The first tab allows you to configure your time zone by your location.
On the interactive map, you can also click on a specific city, which is marked by a yellow dot; a red X will appear indicating your selection. You can also scroll through a list and choose a time zone.
The second tab allows you to specify a UTC offset. The tab displays a list of offsets to choose from, as well as an option to set daylight saving time.
Figure 3-22. Configuring the Time Zone
On both tabs, you can select System Clock uses UTC. Please select this if you know that your system is set to UTC.
Tip
To change your time zone configuration after you have completed the installation, use the Time and Date Properties Tool.
Type the redhat-config-date command in a shell prompt to launch the Time and Date Properties Tool. If you are not root, it will prompt you for the root password to continue.
To run the Time and Date Properties Tool as a text-based application, use the command timeconfig.
Set Root Password
Setting up a root account and password is one of the most important steps during your installation. Your root account is similar to the administrator account used on Windows NT machines. The root account is used to install packages, upgrade RPMs, and perform most system maintenance. Logging in as root gives you complete control over your system.
Note
The root user (also known as the superuser) has complete access to the entire system; for this reason, logging in as the root user is best done only to perform system maintenance or administration.
Figure 3-23. Root Password
Use the root account only for system administration. Create a non-root account for your general use and su - to root when you need to fix something quickly. These basic rules will minimize the chances of a typo or an incorrect command doing damage to your system.
Tip
To become root, type su - at the shell prompt in a terminal window and then press [Enter]. Then, enter the root password and press [Enter].
The installation program will prompt you to set a root password for your system. You must enter a root password. The installation program will not let you proceed to the next section without entering a root password.
The root password must be at least six characters long; the password you type is not echoed to the screen. You must enter the password twice; if the two passwords do not match, the installation program will ask you to enter them again.
You should make the root password something you can remember, but not something that is easy for someone else to guess. Your name, your phone number, qwerty, password, root, 123456, and anteater are all examples of bad passwords. Good passwords mix numerals with upper and lower case letters and do not contain dictionary words: Aard387vark or 420BMttNT, for example. Remember that the password is case-sensitive. If you write down your password, keep it in a secure place. However, it is recommended that you do not write down this or any password you create.
Note
Do not use one of the example passwords offered in this manual. Using one of these passwords could be considered a security risk.
Tip
To change your root password after you have completed the installation, use the Root Password Tool.
Type the redhat-config-rootpassword command in a shell prompt to launch the Root Password Tool. If you are not root, it will prompt you for the root password to continue.
Notes
A root password is the administrative password for your Red Hat Linux system. You should only log in as root when needed for system maintenance. The root account does not operate within the restrictions placed on normal user accounts, so changes made as root can have implications for your entire system.
Authentication Configuration
If you are performing a personal desktop, workstation or server installation, please skip ahead to Section 3.27 Package Group Selection.
You may skip this section if you will not be setting up network passwords. If you do not know whether you should do this, please ask your system administrator for assistance.
Unless you are setting up NIS authentication, you will notice that only MD5 and shadow passwords are selected (see Figure 3-24). We recommend you use both to make your machine as secure as possible.
To configure the NIS option, you must be connected to an NIS network. If you are not sure whether you are connected to an NIS network, please ask your system administrator.
Figure 3-24. Authentication Configuration
· Enable MD5 passwords — allows a long password to be used (up to 256 characters), instead of the standard eight characters or less.
· Enable shadow passwords — provides a secure method for retaining passwords. The passwords are stored in /etc/shadow, which can only be read by root.
· Enable NIS — allows you to run a group of computers in the same Network Information Service domain with a common password and group file. You can choose from the following options:
o NIS Domain — allows you to specify the domain or group of computers your system belongs to.
o Use broadcast to find NIS server — allows you to broadcast a message to your local area network to find an available NIS server.
o NIS Server — causes your computer to use a specific NIS server, rather than broadcasting a message to the local area network asking for any available server to host your system.
Note
If you have selected a medium or high firewall to be setup during this installation, network authentication methods (NIS and LDAP) will not work.
· Enable LDAP — tells your computer to use LDAP for some or all authentication. LDAP consolidates certain types of information within your organization. For example, all of the different lists of users within your organization can be merged into one LDAP directory. For more information about LDAP, refer to the Red Hat Linux Reference Guide, Lightweight Directory Access Protocol (LDAP). You can choose from the following options:
o LDAP Server — allows you to access a specified server (by providing an IP address) running the LDAP protocol.
o LDAP Base DN — allows you to look up user information by its Distinguished Name (DN).
o Use TLS (Transport Layer Security) lookups — this option allows LDAP to send encrypted user names and passwords to an LDAP server before authentication.
· Enable Kerberos — Kerberos is a secure system for providing network authentication services. For more information about Kerberos, see the chapter titled Kerberos in the Red Hat Linux Reference Guide. There are three options to choose from here:
o Realm — this option allows you to access a network that uses Kerberos, composed of one or a few servers (also known as KDCs) and a potentially large number of clients.
o KDC — this option allows you access to the Key Distribution Center (KDC), a machine that issues Kerberos tickets (sometimes called a Ticket Granting Server or TGS).
o Admin Server — this option allows you to access a server running kadmind.
· Enable SMB Authentication — Sets up PAM to use an SMB server to authenticate users. You must supply two pieces of information here:
o SMB Server — Indicates which SMB server your workstation will connect to for authentication.
o SMB Workgroup — Indicates which workgroup the configured SMB servers are in.
Tip
To change your authentication configuration after you have completed the installation, use the authconfig command.
Type the authconfig command in a shell prompt. If you are not root, it will prompt you for the root password to continue.
Package Group Selection
After your partitions have been selected and configured for formatting, you are ready to select packages for installation.
Unless you choose a custom installation, the installation program will automatically choose most packages for you.
For example, if you were to perform a Personal Desktop installation, you may see a screen such as this:
Figure 3-25. Personal Desktop Default Installation
To select packages individually, check the Customize the set of packages to be installed checkbox. Refer to Section 3.27.1 Selecting Individual Packages for further instructions.
You can select package groups, which group components together according to function (for example, X Window System and Editors), individual packages, or a combination of the two.
To select a component, click on the checkbox beside it (see Figure 3-26).
Figure 3-26. Package Group Selection
Select each component you wish to install. Selecting Everything (at the end of the component list) during a custom installation installs all packages included with Red Hat Linux.
Once a package group has been selected, click on Details to view which packages will be installed by default and to add or remove optional packages from that group.
Figure 3-27. Package Group Details
To select packages individually, check the Select Individual Packages box at the bottom of the screen.
3.27.1. Selecting Individual Packages
After selecting the components you wish to install, you can select or deselect individual packages using your mouse (see Figure 3-28).
You can choose to view the individual packages in Tree View or Flat View.
Tree View allows you to see the packages grouped by application type.
Flat View allows you to see all of the packages in an alphabetical listing on the right of the screen.
Figure 3-28. Selecting Individual Packages
Using Tree View, you see a listing of package groups. When you expand this list (by double-clicking on the folder arrow beside a package group name) and pick one group, the list of packages in that group appears in the panel on the right. Flat View allows you to see all of the packages in an alphabetical listing on the right of the screen.
To sort packages alphabetically, click on the Package tab. To sort packages by size, click on the Size (MB) tab.
To select an individual package, double-click the checkbox beside the package name. A check mark in the box means that a package has been selected.
For more information about a specific package, click on the individual package name. The package information will appear at the bottom of the screen.
You can also select or deselect all packages listed within a particular group, by clicking on the Select all in group or Unselect all in group buttons.
Note
Some packages (such as the kernel and certain libraries) are required for every system and are not available to select or deselect. These base packages are selected by default.
3.27.2. Unresolved Dependencies
Many software packages, in order to work correctly, depend on other software packages that must be installed on your system. For example, many of the graphical Red Hat system administration tools require the python and pythonlib packages. To make sure your system has all the packages it needs in order to be fully functional, the installation program checks these package dependencies each time you install or remove software packages.
If any package requires another package which you have not selected to install, the program presents a list of these unresolved dependencies and gives you the opportunity to resolve them (see Figure 3-29).
The Unresolved Dependencies screen appears only if you are missing packages that are needed by the packages you have selected. At the bottom of the screen, under the list of missing packages, an Install packages to satisfy dependencies checkbox is selected by default. If you leave this checked, the installation program will resolve dependencies automatically by adding all required packages to the list of selected packages.
Figure 3-29. Unresolved Dependencies
If you do not wish to install packages that require other packages, select Do not install packages that have dependencies.
To install only the packages you have selected and leave the dependencies unresolved, select Ignore package dependencies.
Tip
To install or remove packages after you have completed the installation, use the Package Management Tool.
Type the redhat-config-packages command in a shell prompt to launch the Package Management Tool. If you are not root, it will prompt you for the root password to continue.
Preparing to Install
You should now see a screen preparing you for the installation of Red Hat Linux.
For your reference, a complete log of your installation can be found in /root/install.log once you reboot your system.
Warning
If, for some reason, you would rather not continue with the installation process, this is your last opportunity to safely cancel the process and reboot your machine. Once you press the Next button, partitions will be written and packages will be installed. If you wish to abort the installation, you should reboot now before any existing information on any hard drive is rewritten.
To cancel this installation process, press your computer's Reset button or use the [Control]-[Alt]-[Delete] key combination to restart your machine.
Boot Diskette Creation
To create a boot diskette, insert a blank, formatted diskette into your diskette drive (see Figure 3-31) and click Next.
It is highly recommended that you create a boot diskette. If, for some reason, your system were not able to boot properly using GRUB, LILO, or a third-party boot loader, a boot diskette would enable you to properly boot your Red Hat Linux system.
After a short delay, your boot diskette will be created; remove it from your diskette drive and label it clearly. Note that if you would like to create a boot diskette after the installation, you will be able to do so. For more information, please see the mkbootdisk man page, by typing man mkbootdisk at the shell prompt.
If you do not want to create a boot diskette, make sure to select the appropriate option before you click Next.
If you boot your system with the boot diskette (instead of GRUB or LILO), make sure you create a new boot diskette whenever you make any changes to your kernel (including the installation of a new kernel).
Figure 3-31. Creating Your Boot Diskette
Video Card Configuration
The installation program will now present a list of video cards for you to choose from.
If you decided to install the X Window System packages, you now have the opportunity to configure an X server for your system. If you did not choose to install the X Window System packages, skip ahead to Section 3.28 Preparing to Install.
If your video card does not appear on the list (see Figure 3-32), X may not support it. However, if you have technical knowledge about your card, you may choose Unlisted Card and attempt to configure it by matching your card's video chipset with one of the available X servers.
Figure 3-32. Video Card Setup
Next, enter the amount of video memory installed on your video card. If you are not sure, please consult the documentation accompanying your video card. You will not damage your video card by choosing more memory than is available, but the X server may not start correctly if you do.
If you decide that the values you have selected are incorrect, you can click the Restore original values button to return to the suggested settings.
You can also select Skip X Configuration if you would rather configure X after the installation or not at all.
Tip
To change your X configuration after you have completed the installation, use the X Configuration Tool.
Type the redhat-config-xfree86 command in a shell prompt to launch the X Configuration Tool. If you are not root, it will prompt you for the root password to continue.
X Configuration — Monitor and Customization
In order to complete X configuration, you must configure your monitor and customize your X settings.
If you chose to skip X configuration, go to Section 3.33 Installation Complete.
3.32.1. Configuring Your Monitor
The installation program will present you with a list of monitors to select from. From this list, you can either use the monitor that is automatically detected for you, or choose another monitor.
Note
If you are installing Red Hat Linux on a laptop with an LCD screen, you should select the most appropriate Generic model available.
If your monitor does not appear on the list, select the most appropriate Generic model available. If you select a Generic monitor, the installation program will suggest horizontal and vertical sync ranges. These values are generally available in the documentation which accompanies your monitor, or from your monitor's vendor or manufacturer; please check your documentation to make sure these values are set correctly.
Caution
Do not select a monitor similar to your monitor unless you are certain that the monitor you are selecting does not exceed the capabilities of your monitor. Doing so may overclock your monitor and damage or destroy it.
Figure 3-33. Monitor Selection
The horizontal and vertical ranges that the installation program suggests for the selected monitor are also displayed below the list of monitors.
If you decide that your monitor selection or the horizontal and vertical ranges are incorrect, you can click the Restore original values button to return to the original suggested settings.
Click Next when you have finished configuring your monitor.
3.32.2. Custom Configuration
Choose the correct color depth and resolution for your X configuration.
If you are performing a custom or server installation, you can also choose whether you want to boot your system into a graphical or text environment once the installation is complete. Unless you have special needs, booting into a graphical environment (similar to a Windows environment) is recommended. If you choose to boot into a text environment, you will be presented with a command prompt (similar to a DOS environment).
Personal desktop and workstation installations will automatically boot into a graphical environment.
Figure 3-34. X Customization
Tip
To change your X configuration after you have completed the installation, use the X Configuration Tool.
Type the redhat-config-xfree86 command in a shell prompt to launch the X Configuration Tool. If you are not root, it will prompt you for the root password to continue.
Installation Complete
Congratulations! Your Red Hat Linux 9 installation is now complete!
The installation program will prompt you to prepare your system for reboot. Remember to remove any installation media (diskette in the diskette drive or CD in the CD-ROM drive) if they are not ejected automatically upon reboot.
If you do not have a boot loader installed and configured, you will need to use the boot diskette you created during the installation now.
After your computer's normal power-up sequence has completed, you should see the graphical boot loader prompt, at which you can do any of the following things:
· Press [Enter] — causes the default boot entry to be booted.
· Select a boot label, followed by [Enter] — causes the boot loader to boot the operating system corresponding to the boot label. (Press [?] or [Tab] at LILO's text mode boot loader prompt for a list of valid boot labels.)
· Do nothing — after the boot loader's timeout period, (by default, five seconds) the boot loader will automatically boot the default boot entry.
Do whatever is appropriate to boot Red Hat Linux. You should see one or more screens of messages scroll by. Eventually, you should see a login: prompt or a GUI login screen (if you installed the X Window System and chose to start X automatically).
Tip
If you are not sure what to do next, we suggest you begin with the Red Hat Linux Getting Started Guide (available online at http://www.redhat.com/docs/ if not included as part of your boxed set), which covers topics relating to the basics of your system and is an introduction to using Red Hat Linux.
If you are a more experienced user looking for information on administration topics, you may find the Red Hat Linux Reference Guide to be more helpful.
If you are looking for information on system configuration, you may find the Red Hat Linux Customization Guide to be helpful.
The first time you start your Red Hat Linux machine, you will be presented with the Setup Agent, which guides you through the Red Hat Linux configuration. Using this tool, you can set your system time and date, install software, register your machine with Red Hat Network, and more. The Setup Agent lets you configure your environment at the beginning, so that you can get started using your Red Hat Linux system quickly. For more information on using the Setup Agent, refer to the chapter titled Getting Started in the Red Hat Linux Getting Started Guide.
Hardware Troubleshooting
Aim : To detect any hardware problems in the system
Objective : To make student capable of maintaining his own system
Monitor display doesn't work even when the power is on then follow the steps until the monitor works
Step 1: Check if CPU is switched on and power is coming to keyboard, mouse
Step 2: Check if the monitor cable is properly connected to the CPU or not.
Step 3: Open the cabinate of CPU and properly insert the RAM
Step 4: Ask the mechanic to check the picture tube and soldering connections
General printer troubleshooting.
Issue:
General printer troubleshooting.
Cause:
These steps should be taken when you're unable to get the printer to turn on and/or print properly.
Solution:
Printer does not have power indicator
First, make sure that the printer is on. When a printer is on it should have some type of light (usually green) that indicates that the printer is receiving power and is on.
If you do not have any indicator light make sure the printer is connected to a working power outlet by verifying each end of the power cable. Next, press the printer power button.
If after following the above steps your printer still cannot get a power status indicator it's likely you're encountering a serious printer issue and we suggest contacting the printer manufacturer for additional steps and/or instructions on repair or replacement.
Cables not connected properly
Your printer should have two cables connected to it. The power cable and the data cable, the power cable should have already been verified as being connected if your printer has a power indicator light as mentioned above. Make sure the data cable (parallel cable or USB cable) is also connected from the printer to the computer.
Printer error (orange or blinking light)
After your printer has completed its initial startup you should have a solid green light. If the light indicator is blinking or orange often this is an indication of a printer error. For example, this could indicate a paper jam, issue with the ink or toner cartridge, or other serious error.
Because there is no standard to what a blinking light or orange light means if you're getting either of these we suggest referring to the printer documentation for troubleshooting steps or methods of determining what the status indicator is reporting.
No paper or paper jam
Without paper your printer will not be able to print. Make sure you have paper in the paper loaded into the printer paper cartridge or tray. Next, verify that no printer paper is jammed or partially fed into the printer. If you have one or more pieces of paper stuck in the printer these will need to be manually removed before the printer will print again.
Lost BIOS password
Most newer motherboards have a jumper that can be used to clear the CMOS memory. Typically this involves opening the PC, changing the jumper to a special setting, and then booting the PC. If the memory has been cleared, you power the PC down and put the jumper back to its previous position
System clock is not keeping correct time
This is typically caused by the CMOS battery failing or running low voltage. Usually, replacing the CMOS battery will fix this.
System locks up consistently a few minutes after power up
This is usually associated with a failed processor fan or general overheating. Boot the system with the case off and see if the fan is running. If not, the fan and likely the processor will need to be replaced.
System appears completely dead(no visible activity during powerup)
Check the external power cable and make sure that it is plugged into a working outlet and securely plugged into the unit. Next, make sure that the on/off switch is set to "On" and that the 115/230 switch is set to the appropriate setting for your location. Verify that the internal power connection from the power supply to the motherboard is firmly connected. A multimeter can be used to narrow determine how far the power is getting. Start at the outlet and work your way inside. Finally, remove all unnecessary components from the motherboard to see if one of them is overloading the power supply.
Front panel lights come on and the power supply fan runs, but no other activity is present
Front panel lights come on and the power supply fan runs, but no other activity is present
Memory errors
Soft-memory errors - These are occasional strange behaviors that can usually be cleared by rebooting.
Hard-memory errors - Caused by a hardware failure related to the RAM and will usually display a message on the screen or create a beep code. Can be isolated by removing memory chips 1 at a time.
Keyboards
No characters appearing on the screen6 beeps on bootA 301 error codeKeyboard is locked - Unlock It error messageKeyboard Error - Keyboard Test FailureKB/Interface Error - Keyboard Test Failure The most common causes for these problems is:Incorrect keyboard type in BIOS or WindowsKeyboard not properly connectedBlown fuse in back of keyboard
Software Troubleshooting
Aim : To detect any software problems in the system
Objective : To make the student to identify the software problems in CPU and fixing it to get the
computer back to working condition.
Unable to install a software program
1. Verify the diskettes or CD are readable by reading the files on the drive. For example, Microsoft Windows users can explore the drive in Windows explorer. If the CD attempts to AutoPlay, you may need to right-click the drive and click Explore to browse the drive.
2. If the CD reads fine with no errors verify your computer meets the minimum requirements of the software program. If your computer does not have enough disk drive space or does not meet the requirements, the program will not install.
3. Make sure the program or utility you are installing is compatible with the version of operating system you have on your computer. For example, many older utilities such as a virus protection program may only work with a specific version of Microsoft Windows.
4. If you are getting stopped at the CD-KEY or Serial Number verification, verify you are entering your correct number. If you lost your number or key or it does not work, you will need to contact the developer of the program. Computer Hope will not provide any users with an alternate identification number.
Error during installation
1. Verify your computer meets the requirements of the program or utility. For example, if your computer runs out of disk space during the installation, this would cause an error during the installation.
2. If you are running Microsoft Windows 95 or higher try installing the program from Safe Mode.
3. Verify the CD is clean and contains no significant scratches. Information about how to clean a CD and a CD-ROM can be found on our cleaning page.
Program or utility does not load or has an error when it attempts to load
1. Verify the program or utility documentation makes no mention of the error you are experiencing. Many times the error and explanation to how to resolve the error are already documented.
2. Verify no patches or updates are available from the developer of the program or utility. In some cases the software program may require an update before it can be successfully run on your computer.
3. Make sure all other programs are closed when you attempt to run the program or utility. If the program successfully runs after closing all other
4. programs, it's possible that the program may have issues with other programs.
5. Make sure the computer has been rebooted at least once after the program has been installed. In some cases it may be required.
6. Verify your computer has the correct date. In some cases a program may rely on the date and if that date is incorrectly set it may cause issues.
7. If following the above recommendations does not resolve your issues, attempt to reinstall the program or utility
Connectivity Boot Camp
Aim : Connectivity to the Local Area Network and accessibility to the
Internet, TCP / IP setting
Objective : To make the student to configure the LAN and TCP / IP settings
Connectivity to LAN
To make a local area connection
1. If you have a network adapter installed, and have set up a home or small office network, you are connected to a local area network (LAN). You are also connected to a LAN if your WindowsXP Professional computer is part of a corporate network. When you start your computer, your network adapter is detected and the local area connection automatically starts. Unlike other types of connections, the local area connection is created automatically, and you do not have to click the local area connection in order to start it.
Notes
1. A local area connection is automatically created for each network adapter that is detected.
2. If more than one network adapter is installed, you can eliminate possible confusion by immediately renaming each local area connection to reflect the network that it connects to.
3. If your computer has one network adapter, but you need to connect to multiple LANs (for example, when traveling to a regional office), the network components for your local area connection need to be enabled or disabled each time you connect to a different LAN.
4. If more than one network adapter is installed, you need to add or enable the network clients, services, and protocols that are required for each local area connection. When you do so, the client, service, or protocol is added or enabled for all other network and dial-up connections.
To make an Internet connection
1. Open Network Connections.
2. Under Network Tasks, click Create a new connection, and then click Next.
3. Click Connect to the Internet, and then click Next.
4. Choose one of the following:
1. If you already have an account with an Internet service provider (ISP), click Set up my connection manually and then click Next.
2. If you have a CD from an ISP, click Use the CD I got from an ISP and then click Next.
3. If you do not have an Internet account, click Choose from a list of Internet service providers (ISPs) and then click Next.
5. From your choice above, click one of the following:
Set up my connection manually
1. If you are connecting to your ISP using a standard 28.8 Kbps, 56 Kbps, or ISDN modem, click Connect using a dial-up modem, click Next, and follow the instructions in the wizard.
2. If your DSL or cable modem ISP connection requires a user name and password, click Connect using a broadband connection that requires a user name and password, click Next, and then follow the instructions in the wizard.
3. If your DSL or cable modem ISP connection is always on and does not require you to type a user name and password, click Connect using a broadband connection that is always on, click Next, and then click Finish.
Use the CD I got from an ISP
4. Click Next, and then click Finish. Insert the CD provided by your ISP and follow the instructions.
Choose from a list of Internet service providers (ISPs)
5. To create an Internet account using MSN Explorer, click Get online with MSN, and then click Finish. Follow the instructions in MSN Explorer.
6. To choose an ISP, click Select from a list of ISPs, click Finish, and then double-click Refer me to more Internet service providers. Follow the instructions in the wizard.
Notes
1. To open Network Connections, click Start, point to Settings, click Control Panel, and then double-click Network Connections.
2. If your DSL or cable modem is always connected and your ISP does not require a user name and password, you do not need to run the New Connection Wizard. No additional configuration is required for your broadband connection.
3. Before you create an Internet connection, check with your Internet service provider (ISP) to verify the required connection settings. A connection to your ISP may require one or more of the following settings:
1. A specific IP address.
2. DNS addresses and domain names.
3. POP3 settings for incoming e-mail.
4. SMTP settings for outgoing e-mail.
To configure TCP/IP settings
1. Open Network Connections.
2. Click the connection you want to configure, and then, under Network Tasks, click Change settings of this connection.
3. Do one of the following:
1. If the connection is a local area connection, on the General tab, under This connection uses the following items, click Internet Protocol (TCP/IP), and then click Properties.
2. If this is a dial-up, VPN, or incoming connection, click the Networking tab. In This connection uses the following items, click Internet Protocol (TCP/IP), and then click Properties.
4. Do one of the following:
1. If you want IP settings to be assigned automatically, click Obtain an IP address automatically, and then click OK.
2. If you want to specify an IP address or a DNS server address, do the following:
1. Click Use the following IP address, and in IP address, type the IP address.
2. Click Use the following DNS server addresses, and in Preferred DNS server and Alternate DNS server, type the addresses of the primary and secondary DNS servers.
5. To configure DNS, WINS, and IP Settings, click Advanced.
Notes
1. To open Network Connections, click Start, point to Settings, click Control Panel, and then double-click Network Connections.
6. You should use automated IP settings (DHCP) whenever possible, for the following reasons:
1. DHCP is enabled by default.
2. If your location changes, you do not have to modify your IP settings.
3. Automated IP settings are used for all connections, and they eliminate the need to configure settings such as DNS, WINS, and so on.
Exposure on Internet and usage of Internet
Aim : mail account creation and use, using search engines, interaction
with people using forums
Objective : To make the student learn how to create mail accounts and
using them
About e-mail accounts in Outlook
You can get the e-mail service you need by adding an e-mail account to Microsoft Outlook using the information provided to you by your administrator or Internet service provider (ISP)(ISP: A business that provides access to the Internet for such things as electronic mail, chat rooms, or use of the World Wide Web. Some ISPs are multinational, offering access in many locations, while others are limited to a specific region.). Depending on your needs, you can add several e-mail accounts to a single Outlook user profile(Outlook e-mail profile: A profile is what Outlook uses to remember the e-mail accounts and the settings that tell Outlook where your e-mail is stored.). For example, you can add a Microsoft Exchange Server account to handle your business e-mail and then add an Internet e-mail account, such as a POP3 account from your ISP, to handle your personal e-mail.
Outlook supports the following types of e-mail servers:
· Microsoft Exchange Server
· Internet E-mail: POP3(POP3: A common protocol that is used to retrieve e-mail messages from an Internet e-mail server.), IMAP(IMAP (Internet Message Access Protocol): Unlike Internet e-mail protocols such as POP3, IMAP creates folders on a server to store/organize messages for retrieval by other computers. You can read message headers only and select which messages to download.), HTTP(HTTP (Hypertext Transfer Protocol): Protocol that is used when you access Web pages from the Internet. Outlook uses HTTP as an e-mail protocol.)
· Additional Server Types
Note Outlook supports the IMAP4 protocol. Some servers may use an updated standard called IMAP4rev1, which may prevent authentication of your credentials and access to your account. To verify which IMAP protocol your server is using, contact your system administrator or ISP.
To get started with an e-mail account, you need to tell Outlook:
Your account name, password, and e-mail server (adding an account)
The information usually supplied to you by your ISP or system administrator is:
7. Type of account (Exchange Server, POP3, IMAP, HTTP, or other)
8. Name of your incoming server and outgoing server
9. Your user name
10. Your e-mail address (for example: someone@example.com)
11. Your password
Note Sometimes the same server is used for both incoming and outgoing messages, as with Microsoft Exchange Server. For POP3 and IMAP accounts, messages you send are submitted to an outgoing server that supports the SMTP (Simple Mail Transfer Protocol (SMTP): A common protocol that is used to send e-mail messages across the Internet.) Internet standard and then are delivered to the recipient. Messages you receive are stored in your account on a server that supports the POP3 or IMAP Internet standard.
How to connect to your e-mail server (connecting/dialing)
You can connect in two ways:
· Over phone lines, by using a modem. You can manually establish a connection or you can use dial-up networking to automatically connect when you start Outlook. If you are connecting to a POP3 or IMAP server, your ISP can supply you with the phone number, modem settings, and network protocols required.
· Through a local area network (LAN). Your organization might provide external access to the Internet from your computer through a LAN. Your administrator can provide you with account information and network protocols to gain access to the e-mail servers.
When and how to get your e-mail messages from the server (sending/receiving)
· If you are using Microsoft Exchange Server, you can specify to work online or offline. Online (connected to the server) is the Outlook default. Messages you send or receive are delivered immediately. If you specify to work offline, you can choose how often Outlook connects to the server to send and receive messages.
· If you are using an Internet e-mail account, you can choose how often Outlook communicates with your Internet e-mail server to send and receive messages.
· You can create a Send/Receive group that contains one or more of the e-mail accounts you have set up in Outlook. You can then specify behavior for the group, such as time intervals for sending or receiving messages, or how mail is processed when Outlook is online or offline. With Send/Receive groups you can:
· Specify whether an account is included when sending/receiving mail.
· Specify whether mail should be sent, received, or both, from an account.
· Specify whether attachments should be downloaded.
· Specify size limits on messages to be downloaded.
· Specify folders to include when sending or receiving.
· Specify downloading only headers for new messages.
· Specify different settings for when Outlook is online or offline.
Where to keep your e-mail messages (data file)
6. When you use an e-mail account with an Exchange server, by default, your e-mail messages are saved on the Exchange server. For other accounts, Outlook automatically creates a default data file to store your messages and other items (item: An item is the basic element that holds information in Outlook (similar to a file in other programs). Items include e-mail messages, appointments, contacts, tasks, journal entries, notes, posted items, and documents.). The data file is a Personal Folders file (.pst).
Hands on Exposure on DOS commands -1
Aim : Using help command for finding information about commands.
Using file processing commands (move, copy, dir, mkdir, rmdir, attrib)
Objective : To make the students aware of help command and file processing commands
Help
Help is used to access the information and help file from a MS-DOS prompt.
MS-DOS 5.x uses help.exe.MS-DOS 6.x uses help.com.Microsoft Windows 2000 uses help.exeMicrosoft Windows XP uses help.exe
For quick reference help with MS-DOS commands in any of the versions of MS-DOS or Windows, you can also use the -help or /? after a command; for example:
dir -helpordir /?
Microsoft Windows 95, 98, ME syntax
Starts MS-DOS Help on MS-DOS commands.
HELP [/B] [/G] [/H] [/NOHI] [topic]
/B
Allows use of a monochrome monitor with a color graphics card.
/G
Provides the fastest update of a CGA screen.
/H
Displays the maximum number of lines possible for your hardware.
/NOHI
Allows the use of a monitor without high-intensity support.
[topic]
Specifies the help topic to view.
Microsoft Windows 2000 and Windows XP syntax
Provides help information for Windows 2000 commands.
HELP [command]
command - displays help information on that command.
Microsoft Windows 2000 and Windows XP recovery console syntax
Displays information about commands supported by the Recovery Console.
help [command]
command Any Recovery Console command.
If command is not specified, all of the commands supported by the Recovery Console are listed. The command parameter is used to see the help for a specific command.
Examples
help
Displays the available commands that help is capable of displaying help for. Typing help command, where command is the command you want help for, is the same as typing command /?.
Move command
Moves files and renames files and directories.
To move one or more files:MOVE [/Y /-Y] [drive:][path]filename1[,...] destination
To rename a directory:MOVE [/Y /-Y] [drive:][path]dirname1 dirname2
[drive:][path]filename1
Specifies the location and name of the file or files you want to move.
destination
Specifies the new location of the file. Destination can consist of a drive letter and colon, a directory name, or a combination. If you are moving only one file, you can also include a filename if you want to rename the file when you move it.
[drive:][path]dirname1
Specifies the directory you want to rename.
dirname2
Specifies the new name of the directory.
/Y
Suppresses prompting to confirm you want to overwrite an existing destination file.
/-Y
Causes prompting to confirm you want to overwrite an existing destination file.
The switch /Y may be present in the COPYCMD environment variable. This may be overridden with /-Y on the command line. Default is to prompt on overwrites unless MOVE command is being executed from within a batch script.
Examples
move c:\windows\temp\*.* c:\temp
Move the files of c:\windows\temp to the temp directory in root, this is of course assuming you have the windows\temp directory.
Mkdir
Creates a directory.
MKDIR [drive:]path
example
mkdir d:\test
creates a test directory in “d” drive
Copy command
Copies one or more files to another location.
COPY [/A /B] source [/A /B] [+ source [/A /B] [+ ...]] [destination] [/A /B]] [/V] [/Y /-Y]
Source
Specifies the file or files to be copied.
/A
Indicates an ASCII text file.
/B
Indicates a binary file.
destination
Specifies the directory and/or filename for the new file(s).
/V
Verifies that new files are written correctly.
/Y
Suppresses prompting to confirm you want to overwrite an existing destination file.
/-Y
Causes prompting to confirm you want to overwrite an existing destination file.
The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line.
To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).
Examples
copy *.* a:
Copy all files in the current directory to the floppy disk drive.
copy autoexec.bat c:\windows
Copy the autoexec.bat, usually found at root, and copy it into the windows directory; the autoexec.bat can be substituted for any file(s).
copy win.ini c:\windows /y
Copy the win.ini file in the current directory to the windows directory. Because this file already exists in the windows directory it normally would prompt if you wish to overwrite the file. However, with the /y switch you will not receive any prompt.
copy myfile1.txt+myfile2.txt
Copy the contents in myfile2.txt and combines it with the contents in myfile1.txt.
copy con test.txt
Finally, a user can create a file using the copy con command as shown above, which creates the test.txt file. Once the above command has been typed in, a user could type in whatever he or she wishes. When you have completed creating the file, you can save and exit the file by pressing CTRL+Z, which would create ^Z, and then press enter. An easier way to view and edit files in MS-DOS would be to use the edit command.
DIR command
Displays a list of files and subdirectories in a directory.
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
Attributes
D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/B
Uses bare format (no heading information or summary).
/C
Display the thousand separator in file sizes. This is the default. Use /-C to disable display of separator.
/D
Same as wide but files are list sorted by column.
/L
Uses lowercase.
/N
New long list format where filenames are on the far right.
/O
List by files in sorted order.
sortorder
N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date/time (oldest first)
G Group directories first - Prefix to reverse order
/P
Pauses after each screenful of information.
/Q
Display the owner of the file.
/S
Displays files in specified directory and all subdirectories.
/T
Controls which time field displayed or used for sorting
timefield
C CreationA Last AccessW Last Written
/W
Uses wide list format.
/X
This displays the short names generated for non-8dot3 file names. The format is that of /N with the short name inserted before the long name. If no short name is present, blanks are displayed in its place.
/4
Displays four-digit years
Examples
dir
Lists all files and directories in the directory that you are currently in.
dir /ad
List only the directories in the current directory. If you need to move into one of the directories listed use the cd command.
dir /s
Lists the files in the directory that you are in and all sub directories after that directory, if you are at root "C:\>" and type this command this will list to you every file and directory on the C: drive of the computer.
dir /p
If the directory has a lot of files and you cannot read all the files as they scroll by, you can use this command and it will display all files one page at a time.
dir /w
If you don't need the info on the date / time and other information on the files, you can use this command to list just the files and directories going horizontally, taking as little as space needed.
dir /s /w /p
This would list all the files and directories in the current directory and the sub directories after that, in wide format and one page at a time.
dir /on
List the files in alphabetical order by the names of the files.
dir /o-n
List the files in reverse alphabetical order by the names of the files.
dir \ /s find "i" more
A nice command to list all directories on the hard drive, one screen page at a time, and see the number of files in each directory and the amount of space each occupies.
dir > myfile.txt
Takes the output of dir and re-routes it to the file myfile.txt instead of outputting it to the screen.
Rmdir
Removes (deletes) a directory.
RMDIR [drive:]pathRD [drive:]path
Windows 2000 and Windows XP Syntax.
RMDIR [/S] [/Q] [drive:]pathRD [/S] [/Q] [drive:]path
/S
Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree.
/Q
Quiet mode, do not ask if ok to remove a directory tree with /S.
Examples
rmdir c:\test
Remove the test directory, if empty. If you want to delete directories that are full, use the deltree command or if you're using Windows 2000 or later use the below example.
Attrib
Attrib allows a user to change the properties of a specified file. Using attrib, the user has the capability of changing the file to have any of the below attributes.
Read-only - allowing the file to be only viewed and not written to.
Archived - allowing Microsoft backup and other backup programs to know what files to backup.
Hidden - making the file invisible to standard users.
System - making the file an important system file.
Syntax
Microsoft Windows 95, 98, and ME syntax
Displays or changes file attributes.
ATTRIB [+R -R] [+A -A] [+S -S] [+H -H] [[drive:][path]filename] [/S]
+
Sets an attribute.
-
Clears an attribute.
R
Read-only file attribute.
A
Archive file attribute.
S
System file attribute.
H
Hidden file attribute.
/S
Processes files in all directories in the specified path.
Microsoft Windows 2000 and Windows XP syntax
Displays or changes file attributes.
ATTRIB [+R -R] [+A -A ] [+S -S] [+H -H] [[drive:] [path] filename] [/S [/D]]
+
Sets an attribute.
-
Clears an attribute.
R
Read-only file attribute.
A
Archive file attribute.
S
System file attribute.
H
Hidden file attribute.
/S
Processes files in all directories in the specified path.
/D
Process folders as well.
Microsoft Windows 2000 and Windows XP recovery console syntax
Note: The below options are the available options in the Windows recovery console.
Changes attributes on one file or directory.
ATTRIB -R +R -S +S -H +H -C +C filename
+
Sets an attribute.
-
Clears an attribute.
R
Read-only file attribute.
S
System file attribute.
H
Hidden file attribute.
C
Compressed file attribute.
Examples
attrib
Typing attrib by itself will display all files in the current directory and each of their attributes. If any file is hidden it will also display those files.
attrib +r autoexec.bat
Add the read-only attribute to the autoexec.bat file so it cannot be modified until the read only attribute is taken off. This is helpful for important system files or any other file that you do not want to have mistakenly edited or changed by another program.
attrib +h config.sys
Add the hidden attribute to the config.sys file causing it to be not be seen by the average user.
attrib -h config.sys
This command will do the opposite of the above command. Instead of hiding the file it will unhide the file if hidden.
Hands on Exposure on DOS commands -2
Aim : Using text processing commands (find ,findstr, etc..)
Using disk utility commands (format, chkdsk, chkntfs, disk comp disk copy etc..)
Objective : To make the students aware of text processing and disk utility commands
find
Allows you to search for text within a file. Although MS-DOS itself is not case sensitive, when typing in the string that you are looking for with the find command, it is case sensitive.
Additionally, this command is used to find text within a file, not the actual file itself. If you are wanting to search or find a file with a particular name, use the dir command.
Users who are running Microsoft Windows 2000 or Windows XP should also consider using the improved findstr command.
Syntax
Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]
/V
Displays all lines NOT containing the specified string.
/C
Displays only the count of lines containing the string.
/N
Displays line numbers with the displayed lines.
/I
Ignores the case of characters when searching for the string.
"string"
Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.
If a pathname is not specified, FIND searches the text typed at the prompt or piped from another command.
Examples
find /c "REM" c:\autoexec.bat
The above example would find any "REM" statement in the autoexec.bat.
find /v /c "&*fake&*" programs.txt
List each line not containing "&*fake&*", because it's very unlikely any file would contain this string of text this would give you an accurate line count of the file.
find "hope" *.txt
Next this example searches for any text file (.txt) that contains the text hope in the current directory. Below is an example of the output you may see. As can be seen from the below example the only file that contains hope is the CH.TXT file.
---------- ACTIVE SETUP LOG.TXT---------- CH.TXTcomputer hope---------- MODEMDET.TXT---------- OEWABLOG.TXT---------- SCHEDLGU.TXT---------- SETUPLOG.TXT
Findstr
The findstr command is short for find string and is a command used in MS-DOS to locate files containing a specific string of plain text.
Microsoft Windows / MS-DOS users who do not have the operating systems listed on the right column will need to use the find command.
Syntax
Searches for strings in files.
FINDSTR
[/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file][/C:string] [/G:file] [/D:dir list] [/A:color attributes][strings] [[drive:][path]filename[ ...]]
/B
Matches pattern if at the beginning of a line.
/E
Matches pattern if at the end of a line.
/L
Uses search strings literally.
/R
Uses search strings as regular expressions.
/S
Searches for matching files in the current directory and all subdirectories.
/I
Specifies that the search is not to be case-sensitive.
/X
Prints lines that match exactly.
/V
Prints only lines that do not contain a match.
/N
Prints the line number before each line that matches.
/M
Prints only the filename if a file contains a match.
/O
Prints character offset before each matching line.
/P
Skip files with non-printable characters.
/A:attr
Specifies color attribute with two hex digits. See "color /?"
/F:file
Reads file list from the specified file(/ stands for console).
/C:string
Uses specified string as a literal search string.
/G:file
Gets search strings from the specified file(/ stands for console).
/D:dir
Search a semicolon delimited list of directories
strings
Text to be searched for.
[drive:][path:]filename
Specifies a file or files to search.
Use spaces to separate multiple search strings unless the argument is prefixed with /C. For example, 'FINDSTR "hello there" x.y' searches for "hello" or "there" in file x.y. 'FINDSTR /C:"hello there" x.y' searches for "hello there" in file x.y.
Regular expression quick reference:
.
Wildcard: any character
*
Repeat: zero or more occurrences of previous character or class
^
Line position: beginning of line
$
Line position: end of line
[class]
Character class: any one character in set
[^class]
Inverse class: any one character not in set
[x-z]
Range: any characters within the specified range
\x
Escape: literal use of metacharacter x
\
xyz\>
Word position: end of word
Examples
findstr "computer help" myfile.txt
In the above example, any lines containing "computer help" would be printed to the screen.
findstr /s "computer help" *.txt
Similar to the first example, the above example would find any lines containing "computer help" in any txt file in the current directory and all sub directories
findstr /x /c:"computer help" *.txt
Match .txt files that contain an exact match on "computer help"; therefore, files that contain "computer helps" or other non-exact matches will not be displayed. It is important to realize that using /x must be a line that exactly matches "computer help"; in other words, if anything else is on the same line, it's not an exact match.
findstr /n /i /c:"computer help" *
Search for any file containing "computer help" regardless of its case and display the line where the text is found.
Format
Format is used to erase all of the information off of a computer diskette or fixed drive.
Syntax
Microsoft Windows 95, 98, ME syntax
Formats a disk for use with MS-DOS.
FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B /S] [/C]FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B /S] [/C]FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B /S] [/C]FORMAT drive: [/Q] [/1] [/4] [/8] [/B /S] [/C]
/V[:label]
Specifies the volume label.
/Q
Performs a quick format.
/F:size
Specifies the size of the floppy disk to format (such as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88).
/B
Allocates space on the formatted disk for system files.
/S
Copies system files to the formatted disk.
/T:tracks
Specifies the number of tracks per disk side.
/N:sectors
Specifies the number of sectors per track.
/1
Formats a single side of a floppy disk.
/4
Formats a 5.25-inch 360K floppy disk in a high-density drive.
/8
Formats eight sectors per track.
/C
Tests clusters that are currently marked "bad."
Microsoft Windows 2000 and Windows XP syntax
Formats a disk for use with Windows 2000.
FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X]FORMAT volume [/V:label] [/Q] [/F:size]FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors]FORMAT volume [/V:label] [/Q] [/1] [/4]FORMAT volume [/Q] [/1] [/4] [/8]
volume
Specifies the drive letter (followed by a colon), mount point, or volume name.
/FS:filesystem
Specifies the type of the file system (FAT, FAT32, or NTFS).
/V:label
Specifies the volume label.
/Q
Performs a quick format.
/C
Files created on the new volume will be compressed by default.
/X
Forces the volume to dismount first if necessary. All opened handles to the volume would no longer be valid.
/A:size
Overrides the default allocation unit size. Default settings are strongly recommended for general use.NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, (128K, 256K for sector size > 512 bytes).FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, (128K, 256K for sector size > 512 bytes).
Note that the FAT and FAT32 files systems impose the below restrictions on the number of clusters on a volume:
FAT: Number of clusters <= 65526 FAT32: 65526 < Number of clusters < 268435446
Format will immediately stop processing if it decides that the above requirements cannot be met using the specified cluster size.
NTFS compression is not supported for allocation unit sizes above 4096.
/F:size
Specifies the size of the floppy disk to format (160,180, 320, 360, 640, 720, 1.2, 1.23, 1.44, 2.88, or 20.8).
/T:tracks
Specifies the number of tracks per disk side.
/N:sectors
Specifies the number of sectors per track.
/1
Formats a single side of a floppy disk.
/4
Formats a 5.25-inch 360K floppy disk in a high-density drive.
/8
Formats eight sectors per track.
Microsoft Windows 2000 and Windows XP recovery console syntax
Formats a disk for use with Windows 2000.
format [drive:] [/q] [/fs:file-system]
drive:
Specifies the drive to format.
/q
Performs a quick format.
/fs:file-system
Specifies the file system to use (FAT, FAT32, or NTFS)
Examples
When using the format command, remember all information on the drive you wish to format will be completely erased.
format a:
Would erase all the contents off a disk. Commonly used on a diskette that has not been formatted or on a diskette you wish to erase.
format a: /q
Quickly erases all the contents of a floppy diskette. Commonly used to quickly erase all information on the diskette.
format c:
This would erase all the contents of your C: hard disk drive. In other words, unless you wish to erase all your computer's information, this command should not be done unless you're planning to start over.
Chkdsk
Chkdsk is a utility that checks the computer's hard disk drives' status for any cross-linked or any additional errors with the hard disk drive.
MS-DOS versions 2.x - 4.x used chkdsk.com,MS-DOS versions 5.x and beyond used chkdsk.exe
Syntax
MS-DOS, Windows 95, Windows 98, Windows ME chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [drive:][[path]filename] [/F] [/V]
[drive:][path]
Specifies the drive and directory to check.
filename
Specifies the file(s) to check for fragmentation.
/F
Fixes errors on the disk.
/V
Displays the full path and name of every file on the disk.
Type CHKDSK without parameters to check the current disk.
Windows 2000 and Windows XP chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
volume
Specifies the drive letter (followed by a colon), mount point, or volume name.
filename
FAT only: Specifies the files to check for fragmentation.
/F
Fixes errors on the disk.
/V
On FAT/FAT32: Displays the full path and name of every file on the disk.
/R
Locates bad sectors and recovers readable information (implies /F).
/L:size
NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.
/X
Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I
NTFS only: Performs a less vigorous check of index entries.
/C
NTFS only: Skips checking of cycles within the folder structure.
The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.
Microsoft Windows 2000 and Windows XP users who have NTFS should also consider using the CHKNTFS command.
Windows 2000 and Windows XP recovery console chkdsk syntax
Note: The below options are only available in the recovery console.
Checks a disk and displays a status report.
chkdsk [drive:] [/p] [/r]
[drive:]
Specifies the drive to check.
/p
Check even if the drive is not flagged dirty, bad.
/r
Locates bad sectors and recovers readable information (implies /p).
Chkdsk may be used without any parameters, in which case the current drive is checked with no switches. You can specify the listed switches.
Chkdsk requires the Autochk.exe file. Chkdsk automatically locates Autochk.exe in the startup (boot) directory. If it cannot be found in the startup directory, chkdsk attempts to locate the Windows 2000 Setup CD. If the installation CD cannot be found, chkdsk prompts for the location of Autochk.exe.
Examples
chkdsk
Will display all information described above and also report any crossed linked files.
chkdsk /f
Will fix any crossed linked files; however, do not run this command while you are in Windows95 or Windows 3.x
chkntfs
The chkntfs command is used to display or modify the checking of the disk drive using NTFS at boot time.
Syntax
Displays or modifies the checking of disk at boot time.
CHKNTFS volume [...]CHKNTFS /DCHKNTFS /T[:time]CHKNTFS /X volume [...]CHKNTFS /C volume [...]
volume
Specifies the drive letter (followed by a colon), mount point, or volume name.
/D
Restores the machine to the default behavior; all drives are checked at boot time and chkdsk is run on those that are dirty.
/T:time
Changes the AUTOCHK initiation count down time to the specified amount of time in seconds. If time is not specified, displays the current setting.
/X
Excludes a drive from the default boot-time check. Excluded drives are not accumulated between command invocations.
/C
Schedules a drive to be checked at boot time; chkdsk will run if the drive is dirty.
If no switches are specified, CHKNTFS will display if the specified drive is dirty or scheduled to be checked on next reboot.
Examples
chkntfs /d
Restores the computer back to the default settings and all drives are checked at boot if they are dirty.
diskcomp
Compares the contents of a floppy disk in the source drive to the contents of a floppy disk in the target drive.
This command was not included with Microsoft Windows 95, Windows 98, or Windows ME. However, if you upgraded Windows 95 from Windows 3.x, this file would still be available.
Syntax
Early versions of MS-DOS Syntax
DISKCOMP Source: Target: /1 /8
Source:
Source drive containing one of the floppy disks to be compared.
Target:
Target drive containing the other disk to be compared.
/1
Compares only the first side of the disks
/8
Compares the first 8 sectors per track.
Windows 2000 and Windows XP syntax
Compares the contents of two floppy disks.
DISKCOMP [drive1: [drive2:]]
Examples
DISKCOMP A: B: /1
Compares the first side of A: with B:
disk copy
The diskcopy utility allows a user to copy the complete contents of a diskette to another diskette.
It is not recommended that the diskcopy command be used for anything but a floppy diskette.
Syntax
Copies the contents of one floppy disk to another.
DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]
/1
Copies only the first side of the disk.
/V
Verifies that the information is copied correctly.
/M
Force multi-pass copy using memory only.
The two floppy disks must be the same type.You may specify the same drive for drive1 and drive2.
Examples
diskcopy a:
This would make a copy of the disk that is currently in your drive
Hands on Exposure on Unix shell commands -1
Aim :Using man, info commands for finding information about commands.
Using file processing commands (ls, cp, mv, ln, mkdir, rmdir, chmod etc..)
Objective : To make the students aware of man, info and file processing commands
LS command
Lists the contents of a directory.
Syntax
ls [-a] [-A] [-b] [-c] [-C] [-d] [-f] [-F] [-g] [-i] [-l] [-L] [-m] [-o] [-p] [-q] [-r] [-R] [-s] [-t] [-u] [-x] [pathnames]
-a
Shows you all files, even files that are hidden (these files begin with a dot.)
-A
List all files including the hidden files. However, does not display the working directory (.) or the parent directory (..).
-b
Force printing of non-printable characters to be in octal \ddd notation.
-c
Use time of last modification of the i-node (file created, mode changed, and so forth) for sorting (-t) or printing (-l or -n).
-C
Multi-column output with entries sorted down the columns. Generally this is the default option.
-d
If an argument is a directory it only lists its name not its contents.
-f
Force each argument to be interpreted as a directory and list the name found in each slot. This option turns off -l, -t, -s, and -r, and turns on -a; the order is the order in which entries appear in the directory.
-F
Mark directories with a trailing slash (/), doors with a trailing greater-than sign (>), executable files with a trailing asterisk (*), FIFOs with a trailing vertical bar (), symbolic links with a trailing at-sign (@), and AF_Unix address family sockets with a trailing equals sign (=).
-g
Same as -l except the owner is not printed.
-i
For each file, print the i-node number in the first column of the report.
-l
Shows you huge amounts of information (permissions, owners, size, and when last modified.)
-L
If an argument is a symbolic link, list the file or directory the link references rather than the link itself.
-m
Stream output format; files are listed across the page, separated by commas.
-n
The same as -l, except that the owner's UID and group's GID numbers are printed, rather than the associated character strings.
-o
The same as -l, except that the group is not printed.
-p
Displays a slash ( / ) in front of all directories.
-q
Force printing of non-printable characters in file names as the character question mark (?).
-r
Reverses the order of how the files are displayed.
-R
Includes the contents of subdirectories.
-s
Give size in blocks, including indirect blocks, for each entry.
-t
Shows you the files in modification time.
-u
Use time of last access instead of last modification for sorting (with the -t option) or printing (with the -l option).
-x
Displays files in columns.
-1
Print one entry per line of output.
pathnames
File or directory to list.
Examples
ls -l
In the above example this command would list each of the files in the current directory and the files permissions, the size of the file, date of the last modification, and the file name or directory. Below is additional information about each of the fields this command lists.
Permissions
Directories
Group
Size
Date
Directory or file
drwx------
2
users
4096
Nov 2 19:51
mail/
drwxr-s---
35
www
32768
Jan 20 22:39
public_html/
-rw-------
1
users
3
Nov 25 02:58
test.txt
Below is a brief description of each of the above categories shown when using the ls -l command.
Permissions - The permissions of the directory or file.
Directories - The amount of links or directories within the directory. The default amount of directories is going to always be 2 because of the . and .. directories.
Group - The group assigned to the file or directory
Size - Size of the file or directory.
Date - Date of last modification.
Directory of file - The name of the file or file.
ls ~
List the contents of your home directory by adding a tilde after the ls command.
ls /
List the contents of your root directory.
ls ../
List the contents of the parent directory.
ls */
List the contents of all sub directories.
ls -d */
Only list the directories in the current directory.
Cp
Copies files from one location to another.
Syntax
cp [OPTION]... SOURCE DESTcp [OPTION]... SOURCE... DIRECTORYcp [OPTION]... --target-directory=DIRECTORY SOURCE...
-a, --archive
Same as -dpR
--backup[=CONTROL]
make a backup of each existing destination file
-b
like --backup but does not accept an argument
--copy-contents
Copy contents of special files when recursive
-d
Same as --no-dereference --preserve=link
--no-dereference
never follow symbolic links
-f, --force
if an existing destination file cannot be opened, remove it and try again
-i, --interactive
prompt before overwrite
-H
Follow command-line symbolic links
-l, --link
link files instead of copying
-L, --dereference
Always follow symbolic links
-p
same as --preserve=mode,ownership,timestamps
--preserve[=ATTR_LIST]
preserve the specified attributes (default: mode,ownership,timestamps), if possible additional attributes: links,all
--no-preserve=ATTR_LIST
don't preserve the specified attributes
--parents
Append source path to DIRECTORY
-P
same as '--no-dereference'
-R, -r, --recursive
copy directories recursively
--remove-destination
remove each existing destination file before attempting to open it (contrast with --force)
--reply={yes,no,query}
Specify how to handle the prompt about an existing destination file
--sparse=WHEN
control creation of sparse files
--strip-trailing-slashes
remove any trailing slashes from each SOURCE argument
-s, --symbolic-link
make symbolic links instead of copying
-S, --suffix=SUFFIX
override the usual backup suffix
--target-directory=DIRECTORY
move all SOURCE arguments into DIRECTORY
-u, --update
copy only when the SOURCE file is newer than the destination file or when the destination file is missing
-v, --verbose
Explain what is being done
-x, --one-file-system
stay on this file system
Examples
cp file1.txt newdir
Copies the file1.txt in the current directory to the newdir directory.
cp /home/public_html/mylog.txt /home/public_html/backup/mylog.bak
Copies the mylog.txt file in the public_html directory into the public_html/backup directory as mylog.bak. The files are identical however have different names.
cp *.txt newdir
Copy all files ending in .txt into the newdir directory.
cp -r /home/hope/files/* /home/hope/backup
Copies all the files, directories, and subdirectories in the files directory into the backup directory.
Mv
Renames a file or moves it from one directory to another directory.
Syntax
mv [-f] [-i] oldname newname
-f
mv will move the file(s) without prompting even if it is writing over an existing target. Note that this is the default if the standard input is not a terminal.
-i
Prompts before overwriting another file.
oldname
The oldname of the file renaming.
newname
The newname of the file renaming.
filename
The name of the file you want to move directory - The directory of were you want the file to go.
Examples
mv myfile.txt newdirectory/ - moves the file myfile.txt to the directory newdirectory.
mv myfile.txt ../ - moves the file myfile.txt back one directory (if available).
Ln
Creates a link to a file.
Syntax
ln [-f] [-n] [-s] existingfile newname
-f
Link files without questioning the user, even if the mode of target forbids writing. This is the default if the standard input is not a terminal.
-n
Does not overwrite existing files.
-s
Makes it so that it does not create a symbolic link (not on System V.) existingfile - The file that you want to create a new link.
existingfile
Specifies file(s) that you want to create a link to.
newname
The new name of the file.
directory
The directory were you want the new link.
Examples
ln public_html/myfile.txt
Would create a hard link to myfile.txt in the current directory assuming that it is not public_html. Note: A link cannot be created to a file if currently in the directory where the file exists.
ln -s file1 file2
Creates a symbolic link to file1 with the name of the file2.
Mkdir
Short for make directory this command is used to create a new directory.
Syntax
mkdir dirname
dirname
The name of the directory that you wish to create.
Examples
mkdir mydir - This would create a new directory called mydir.
rmdir
Deletes a directory.
Syntax
rmdir [OPTION]... DIRECTORY...
--ignore-fail-on-non-empty
ignore each failure that is solely because a directory is non-empty.
-p, --parents
Remove DIRECTORY and its ancestors. E.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'.
-v, --verbose
output a diagnostic for every directory processed.
--version
output version information and exit.
Examples
rmdir mydir - removes the directory mydir
rm -r directory - would remove a directory, even if files existed in that directory.
chmod
Changes the permission of a file.
Syntax
chmod [OPTION]... MODE[,MODE]... FILE...chmod [OPTION]... OCTAL-MODE FILE...chmod [OPTION]... --reference=RFILE FILE...
-c, --changes
like verbose but report only when a change is made
--no-preserve-root
do not treat `/' specially (the default)
--preserve-root
fail to operate recursively on `/'
-f, --silent, --quiet
suppress most error messages
-v, verbose
output a diagnostic for every file processed
--reference=RFILE
use RFILE's mode instead of MODE values
-R, --recursive
change files and directories recursively
--help
display this help and exit
--version
output version information and exit
Permissionsu - User who owns the file.g - Group that owns the file.o - Other.a - All.r - Read the file.w - Write or edit the file.x - Execute or run the file as a program.
Numeric Permissions:CHMOD can also to attributed by using Numeric Permissions:
400 read by owner040 read by group004 read by anybody (other)200 write by owner020 write by group002 write by anybody100 execute by owner010 execute by group001 execute by anybody
Examples
The above numeric permissions can be added to set a certain permission, for example, a common HTML file on a Unix server to be only viewed over the Internet would be:
chmod 644 file.htm
This gives the file read/write by the owner and only read by everyone else (-rw-r--r--).
Files such as scripts that need to be executed need more permissions. Below is another example of a common permission given to scripts.
chmod 755 file.cgi
This would be the following 400+040+004+200+100+010+001 = 755 where you are giving all the rights except the capability for anyone to write to the file.cgi file(-rwxr-xr-x).
Finally, another common CHMOD permission is 666, as shown below, which is read and write by everyone.
chmod 666 file.txt
man, info
The man, info command which is short for manual provides in depth information about the requested command or allows users to search for commands related to a particular keyword.
Syntax
Shows you online manuals on Unix commands.
man [-] [-k keywords] topic
-
Displays the manual without stopping.
-k keywords
Searches for keywords in all of the manuals available.
topic
Displays the manual for the topic or command typed in.
Examples
man mkdir - Lists help information on the mkdir command.
Hands on Exposure on Unix shell commands -2
Aim :Using text processing commands ( grep, egrep, sed etc…)
Using disk utility commands, mount commands( du,df,mount etc..)
Objective : To make the students learn who to use text processing and disk utility commands, mount
commands
grep
Finds text within a file.
Syntax
grep [options] PATTERN [FILE...]grep [options] [-e PATTERN -f FILE] [FILE...]
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines. Places a line containing -- between contiguous groups of matches.
-a, --text
Process a binary file as if it were text; this is equivalent to the --binary-files=text option.
-B NUM, --before-context=NUM
Print NUM lines of leading context before matching lines. Places a line containing -- between contiguous groups of matches.
-b, --byte-offset
Print the byte offset within the input file before each line of output.
--binary-files=TYPE
If the first few bytes of a file indicate that the file contains binary data, assume that the file is of type TYPE. By default, TYPE is binary, and grep normally outputs either a one-line message saying that a binary file matches, or no message if there is no match. If TYPE is without-match, grep assumes that a binary file does not match; this is equivalent to the -I option. If TYPE is text, grep processes a binary file as if it were text; this is equivalent to the -a option. Warning: grep --binary-files=text might output binary garbage, which can have nasty side effects if the output is a terminal and if the terminal driver interprets some of it as commands.
-C NUM, --context=NUM
Print NUM lines of output context. Places a line containing -- between contiguous groups of matches.
-c, --count
Suppress normal output; instead print a count of matching lines for each input file. With the -v, --invert-match option (see below), count non-matching lines.
--colour[=WHEN], --color[=WHEN]
Surround the matching string with the marker find in GREP_COLOR environment variable. WHEN may be `never', `always', or `auto'
-D ACTION, --devices=ACTION
If an input file is a device, FIFO or socket, use ACTION to process it. By default, ACTION is read, which means that devices are read just as if they were ordinary files. If ACTION is skip, devices are silently skipped.
-d ACTION, --directories=ACTION
If an input file is a directory, use ACTION to process it. By default, ACTION is read, which means that directories are read just as if they were ordinary files. If ACTION is skip, directories are silently skipped. If ACTION is recurse, grep reads all files under each directory, recursively; this is equivalent to the -r option.
-E, --extended-regexp
Interpret PATTERN as an extended regular expression (see below).
-e PATTERN, --regexp=PATTERN
Use PATTERN as the pattern; useful to protect patterns beginning with -.
-F, --fixed-strings
Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched.
-f FILE, --file=FILE
Obtain patterns from FILE, one per line. The empty file contains zero patterns, and therefore matches nothing.
-G, --basic-regexp
Interpret PATTERN as a basic regular expression (see below). This is the default.
-H, --with-filename
Print the filename for each match.
-h, --no-filename
Suppress the prefixing of filenames on output when multiple files are searched.
--help
Output a brief help message.
-I
Process a binary file as if it did not contain matching data; this is equivalent to the --binary-files=without match option.
-i, --ignore-case
Ignore case distinctions in both the PATTERN and the input files.
-L, --files-without-match
Suppress normal output; instead print the name of each input file from which no output would normally have been printed. The scanning will stop on the first match.
-l, --files-with-matches
Suppress normal output; instead print the name of each input file from which output would normally have been printed. The scanning will stop on the first match.
--label=LABEL
Displays input actually coming from standard input as input coming from file LABEL. This is especially useful for tools like zgrep, e.g. gzip -cd foo.gz grep --label=foo something
--line-buffered
Use line buffering, it can be a performance penalty.
-m NUM, --max-count=NUM
Stop reading a file after NUM matching lines. If the input is standard input from a regular file, and NUM matching lines are output, grep ensures that the standard input is positioned to just after the last matching line before exiting, regardless of the presence of trailing context lines. This enables a calling process to resume a search. When grep stops after NUM matching lines, it outputs any trailing context lines. When the -c or --count option is also used, grep does not output a count greater than NUM. When the -v or --invert-match option is also used, grep stops after outputting NUM non-matching lines.
--mmap
ations, --mmap yields better performance. However, --mmap can cause undefined behavior (including core dumps) if an input file shrinks while grep is operating, or if an I/O error occurs.
-n, --line-number
Prefix each line of output with the line number within its input file.
-o, --only-matching
Show only the part of a matching line that matches PATTERN.
-P, --perl-regexp
Interpret PATTERN as a Perl regular expression.
-q, --quiet, --silent
Quiet; do not write anything to standard output. Exit immediately with zero status if any match is found, even if an error was detected. Also see the -s or --no-messages option.
-R, -r, --recursive
Read all files under each directory, recursively; this is equivalent to the -d recurse option.
--include=PATTERN
Recurse in directories only searching file matching PATTERN.
--exclude=PATTERN
Recurse in directories skip file matching PATTERN.
-s, --no-messages
Suppress error messages about nonexistent or unreadable files. Portability note: unlike GNU grep, traditional grep did not conform to POSIX.2, because traditional grep lacked a -q option and its -s option behaved like GNU grep's -q option. Shell scripts intended to be portable to traditional grep should avoid both -q and -s and should redirect output to /dev/null instead.
-U, --binary
Treat the file(s) as binary. By default, under MS-DOS and MS-Windows, grep guesses the file type by looking atthe contents of the first 32KB read from the file. If grep decides the file is a text file, it strips the CR characters from the original file contents (to make regular expressions with ^ and $ work correctly). Specifying -U overrules this guesswork, causing all files to be read and passed to the matching mechanism verbatim; if the file is a text file with CR/LF pairs at the end of each line, this will cause some regular expressions to fail. This option has no effect on platforms other than MS-DOS and MS-Windows.
-u, --unix-byte-offsets
Report Unix-style byte offsets. This switch causes grep to report byte offsets as if the file were Unix-style text file, i.e. with CR characters stripped off. This will produce results identical to running grep on a Unix machine. This option has no effect unless -b option is also used; it has no effect on platforms other than MS-DOS and MS-Windows.
-V, --version
Print the version number of grep to standard error. This version number should be included in all bug reports (see below).
-v, --invert-match
Invert the sense of matching, to select non-matching lines.
-w, --word-regexp
Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore.
-x, --line-regexp
Select only those matches that exactly match the whole line.
-y
Obsolete synonym for -i.
-Z, --null
Output a zero byte (the ASCII NUL character) instead of the character that normally follows a file name. For example, grep -lZ outputs a zero byte after each file name instead of the usual newline. This option makes the output unambiguous, even in the presence of file names containing unusual characters like newlines. This option can be used with commands like find -print0, perl -0, sort -z, and xargs -0 to process arbitrary file names, even those that contain newline characters.
-z, --null-data
Treat the input as a set of lines, each terminated by a zero byte (the ASCII NUL character) instead of a newline. Like the -Z or --null option, this option can be used with commands like sort -z to process arbitrary file names.
Patterns for searching.
.
Matches single character.
*
Wild character Example C* if found would pull up CC or CAT...
{}
Matches any character contained within the bracket.
^
Represents the beginning of the line, so if you did ^T it would search for any sentence starting with a T.
$
Represents the end of the line, so if you did $. then it would pull up any lines that ended with .
\
Means to take the next character serious so you could search for C\ C.
Note: Be careful using the characters $, *, [, ^, , (, ), and \ in the pattern list because they are also meaningful to the shell. It is safest to enclose the entire pattern list in single quotes '... '.
Examples
grep "unix" *.htm
search all .htm files in the current directory
egrep
Search a file for a pattern using full regular expressions.
Syntax
egrep [-b] [-c] [-h] [-i] [-l] [-n] [-s] [-v] [-x] [ -e pattern_list ] [-f file ] [ strings ] [ file]
-b
Precede each line by the block number on which it was found. This can be useful in locating block numbers by context (first block is 0).
-c
Print only a count of the lines that contain the pattern.
-h
Suppress printing of filenames when searching multiple files.
-i
Ignore upper/lower case distinction during comparisons.
-l
Print the names of files with matching lines once, separated by NEWLINEs. Does not repeat the names of files when the pattern is found more than once.
-n
Precede each line by its line number in the file (first line is 1).
-s
Work silently, that is, display nothing except error messages. This is useful for checking the error status.
-v
Print all lines except those that contain the pattern.
-x
Consider only input lines that use all characters in the line to match an entire fixed string or regular expression to be matching lines.
-e pattern_list
Search for a pattern_list (full regular expression that begins with a -).
-f file
Take the list of full regular expressions from file.
strings
Specify a pattern to be used during the search for input.
file
A path name of a file to be searched for the patterns. If no file operands are specified, the standard input will be used.
Examples
egrep "supporthelpwindows" myfile.txt - Would search for patterns of support help and windows in the file myfile.txt.
Sed
Sort for Stream Editor sed allows you to use pre-recorded commands to make changes to text.
Syntax
sed [ -n ] [ -e script ] ... [ -f script_file ] ... [ file ... ]
-n
Suppress the default output.
-e script
script is an edit command for sed . See USAGE below for more information on the format of script. If there is just one -e option and no -f options, the flag -e may be omitted.
-f script_file
Take the script from script_file. script_file consists of editing commands, one per line.
commands
The sed commands to perform.
file
A path name of a file whose contents will be read and edited. If multiple file operands are specified, the named files will be read in the order specified and the concatenation will be edited. If no file operands are specified, the standard input will be used
Script:
A script consists of editing commands, one per line, of the following form:
[ address [ , address ] ] command [ arguments ]
Zero or more blank characters are accepted before the first address and before command. Any number of semicolons are accepted before the first address.
In normal operation, sed cyclically copies a line of input (less its terminating NEWLINE character) into a pattern space (unless there is something left after a D command), applies in sequence all commands whose addresses select that pattern space, and copies the resulting pattern space to the standard output (except under -n) and deletes the pattern space. Whenever the pattern space is written to standard output or a named file, sed will immediately follow it with a NEWLINE character.
Some of the commands use a hold space to save all or part of the pattern space for subsequent retrieval. The pattern and hold spaces will each be able to hold at least 8192 bytes.
sed Addresses:
An address is either empty, a decimal number that counts input lines cumulatively across files, a $ that addresses the last line of input, or a context address, which consists of a /regular expression/.
A command line with no addresses selects every pattern space.
A command line with one address selects each pattern space that matches the address.
A command line with two addresses selects the inclusive range from the first pattern space that matches the first address through the next pattern space that matches the second address. Thereafter the process is repeated, looking again for the first address. (If the second address is a number less than or equal to the line number selected by the first address, only the line corresponding to the first address is selected.)
Typically, address are separated from each other by a comma (,). They may also be separated by a semicolon (;).
Examples
sed G myfile.txt > newfile.txt
In the above example using the sed command with G would double space the file myfile.txt and output the results to the newfile.txt.
Du
Tells you how much space a file occupies.
Syntax
du [-a] [-k] [-s] [-d] [-L] [-o] [-r] [-x] directories
-a
Displays the space that each file is taking up.
-k
Write the files sizes in units of 1024 bytes, rather than the default 512-byte units.
-s
Instead of the default output, report only the total sum for each of the specified files.
-d
Do not cross filesystem boundaries. For example, du -d / reports usage only on the root partition.
-L
Process symbolic links by using the file or directory which the symbolic link references, rather than the link itself.
-o
Do not add child directories' usage to a parent's total. Without this option, the usage listed for a particular directory is the space taken by the files in that directory, as well as the files in all directories beneath it. This option does nothing if -s is used.
-r
Generate messages about directories that cannot be read, files that cannot be opened, and so forth, rather than being silent (the default).
-x
When evaluating file sizes, evaluate only those files that have the same device as the file specified by the file operand.
directories
Specifies the directory or directories.
Examples
du -s *.txt - Would report the size of each txt file in the current directory. Below is an example of the output.
8 file1.txt8 file2.txt10 file3.txt2 file4.txt8 file5.txt8 file6.txt
du -ch *.txt - Display the size of the txt files in a friendly size format listing as well as the total capacity of all the files combined.
Df
Report how much free disk space is available for each mount you have.
Syntax
df [OPTION]... [FILE]...
-a, --all
include dummy file systems
-B, --block-size=SIZE
use SIZE-byte blocks
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si
likewise, but use powers of 1000 not 1024
-i, --inodes
list inode information instead of block usage
-k
like --block-size=1K
-l, --local
limit listing to local file systems
--no-sync
do not invoke sync before getting usage info (default)
-P, --portability
use the POSIX output format
--sync
invoke sync before getting usage info
-t, --type=TYPE
limit listing to file systems of type TYPE
-T, --print-type
print file system type
-x, --exclude-type=TYPE
limit listing to file systems not of type TYPE
--version
output version information and exit
Examples
df
In the above example when performing just the df command with no additional switches or specification of the file or directory you would get a listing of all file systems and their used and available space.
df -h
The above command is one of the most commonly used commands as it displays the sizes in an easy to read format as shown in the below example.
Mount
Mount or unmount file systems and remote resources. Additional definitions about the mount term can be found here.
Syntax
mount [-p -v ]
mount [ -F FSType ] [ generic_options ] [-o specific_options ] [ -O ] special mount_point
mount [ -F FSType ] [ generic_options ] [-o specific_options ] [ -O ] special mount_point
mount -a [ -F FSType ] [ -V ] [ current_options ] [-o specific_options ] [ mount_point ... ]
umount [ -V ] [ -o specific_options ] special mount_point
umount -a [ -V ] [ -o specific_options ] [ mount_point... ]
-p
Print the list of mounted file systems in the /etc/vfstab format. Must be the only option specified.
-v
Print the list of mounted file systems in verbose format. Must be the only option specified.
-F
Used to specify the FSType on which to operate. The FSType must be specified or must be determin able from /etc/vfstab, or by consulting /etc/default/fs or /etc/dfs/fstypes.
-m
Mount the file system without making an entry in /etc/mnttab.
-r
Mount the file system read-only.
-o
Specify FSType-specific options in a comma separated (without spaces) list of suboptions and keyword-attribute pairs for interpretation by the FSType-specific module of the command.
-O
Overlay mount. Allow the file system to be mounted over an existing mount point, making the underlying file system inaccessible. If a mount is attempted on a pre-existing mount point without setting this flag, the mount will fail, producing the error "device busy".
-a
Perform mount or umount operations in parallel, when possible.
If mount points are not specified, mount will mount all file systems whose /etc/vfstab "mount at boot" field is "yes". If mount points are specified, then /etc/vfstab "mount at boot" field will be ignored.
If mount points are specified, umount will only umount those mount points. If none is specified, then umount will attempt to umount all filesystems in /etc/mnttab, with the exception of certain system required file systems: /, /usr, /var, /proc, /dev/fd, and /tmp.
-V
Echo the complete command line, but do not execute the command. umount generates a command line by using the options and arguments provided by the user and adding to them information derived from /etc/mnttab. This option should be used to verify and validate the command line.
Examples
Mount a local disk:mount /dev/usr /usr
Mount a MS-DOS floppy:mount -F dos /dev/rdsk/fds0d2.3.5 /floppy
Mount a Macintosh HFS floppy:mount -F hfs /dev/rdsk/fds0d3.3.5hi /floppy
Mount a HFS CD-ROM:mount -F hfs /dev/rdsk/dks0d7vol /cdrom
Using Vi Editor
Aim : learning the three modes of Vi Editor-Insert Mode-command
mode-Colon mode
Objective : To enable the student to work with Vi Editor in Editor-Insert
How to Use the vi Editor
The vi editor is available on almost all Unix systems. vi can be used from any type of terminal because it does not depend on arrow keys and function keys--it uses the standard alphabetic keys for commands.
vi (pronounced "vee-eye") is short for "vi"sual editor. It displays a window into the file being edited that shows 24 lines of text. vi is a text editor, not a "what you see is what you get" word processor. vi lets you add, change, and delete text, but does not provide such formatting capabilities as centering lines or indenting paragraphs.
This help note explains the basics of vi:
opening and closing a file
moving around in a file
elementary editing
vi has many other commands and options not described here. The following resources can help you get started using the vi editor, and are available at the UW University Book Store:
"vi Tutorial." Specialized Systems Consultants (SSC).
"vi Reference." Specialized Systems Consultants (SSC).
"Learning the vi Editor." Linda Lamb, 1990.
Starting vi
You may use vi to open an already existing file by typing vi filename
where "filename" is the name of the existing file. If the file is not in your current directory, you must use the full pathname.
Or you may create a new file by typing vi newname
where "newname" is the name you wish to give the new file.
To open a new file called "testvi," enter vi testvi
On-screen, you will see blank lines, each with a tilde (~) at the left, and a line at the bottom giving the name and status of the new file:
~ "testvi" [New file]
vi Modes
vi has two modes:
command mode
insert mode
In command mode, the letters of the keyboard perform editing functions (like moving the cursor, deleting text, etc.). To enter command mode, press the escape
In insert mode, the letters you type form words and sentences. Unlike many word processors, vi starts up in command mode.
Entering Text
In order to begin entering text in this empty file, you must change from command mode to insert mode. To do this, type i
Nothing appears to change, but you are now in insert mode and can begin typing text. In general, vi's commands do not display on the screen and do not require the Return key to be pressed.
Type a few short lines and press
If you make a mistake, pressing
Moving the Cursor
To move the cursor to another position, you must be in command mode. If you have just finished typing text, you are still in insert mode. Go back to command mode by pressing
The cursor is controlled with four keys: h, j, k, l. Key Cursor Movement --- --------------- h left one space j down one line k up one line l right one space
When you have gone as far as possible in one direction, the cursor stops moving and you hear a beep. For example, you cannot use l to move right and wrap around to the next line, you must use j to move down a line. See the section entitled "Moving Around in a File" for ways to move more quickly through a file.
Basic Editing
Editing commands require that you be command mode. Many of the editing commands have a different function depending on whether they are typed as upper- or lowercase. Often, editing commands can be preceded by a number to indicate a repetition of the command.
Deleting Characters
To delete a character from a file, move the cursor until it is on the incorrect letter, then type x
The character under the cursor disappears. To remove four characters (the one under the cursor and the next three) type 4x
To delete the character before the cursor, type X (uppercase)
Deleting Words
To delete a word, move the cursor to the first letter of the word, and type dw
This command deletes the word and the space following it.
To delete three words type 3dw
Deleting Lines
To delete a whole line, type dd
The cursor does not have to be at the beginning of the line. Typing dd deletes the entire line containing the cursor and places the cursor at the start of the next line. To delete two lines, type 2dd
To delete from the cursor position to the end of the line, type D (uppercase)
Replacing Characters
To replace one character with another:
1. Move the cursor to the character to be replaced.
2. Type r
3. Type the replacement character.
The new character will appear, and you will still be in command mode.
Replacing Words
To replace one word with another, move to the start of the incorrect word and type cw
The last letter of the word to be replaced will turn into a $. You are now in insert mode and may type the replacement. The new text does not need to be the same length as the original. Press
Replacing Lines
To change text from the cursor position to the end of the line:
1. Type C (uppercase).
2. Type the replacement text.
3. Press
Inserting Text
To insert text in a line:
1. Position the cursor where the new text should go.
2. Type i
3. Enter the new text.
The text is inserted BEFORE the cursor.
4. Press
Appending Text
To add text to the end of a line:
1. Position the cursor on the last letter of the line.
2. Type a
3. Enter the new text.
This adds text AFTER the cursor.
4. Press
Opening a Blank Line
To insert a blank line below the current line, type
(lowercase)
To insert a blank line above the current line, type O (uppercase)
Joining Lines
To join two lines together:
1. Put the cursor on the first line to be joined.
2. Type J
To join three lines together:
1. Put the cursor on the first line to be joined.
2. Type 3J
Undoing
To undo your most recent edit, type u
To undo all the edits on a single line, type U (uppercase)
Undoing all edits on a single line only works as long as the cursor stays on that line. Once you move the cursor off a line, you cannot use U to restore the line.
Moving Around in a File
There are shortcuts to move more quickly though a file. All these work in command mode. Key Movement --- -------- w forward word by word b backward word by word $ to end of line 0 (zero) to beginning of line H to top line of screen M to middle line of screen L to last line of screen G to last line of file 1G to first line of file
Moving by Searching
To move quickly by searching for text, while in command mode:
1. Type / (slash).
2. Enter the text to search for.
3. Press
The cursor moves to the first occurrence of that text.
To repeat the search in a forward direction, type n
To repeat the search in a backward direction, type N
Closing and Saving a File
With vi, you edit a copy of the file, rather than the original file. Changes are made to the original only when you save your edits.
To save the file and quit vi, type ZZ
The vi editor editor is built on an earler Unix text editor called ex. ex commands can be used within vi. ex commands begin with a : (colon) and end with a
To save the edits you have made, but leave vi running and your file open:
1. Press
2. Type :w
3. Press
To quit vi, and discard any changes your have made since last saving:
1. Press
2. Type :q!
3. Press
Command Summary
STARTING vi vi filename edit a file named "filename" vi newfile create a new file named "newfile"
ENTERING TEXT i insert text left of cursor a append text right of cursor
MOVING THE CURSOR h left one space j down one line k up one line l right one space
BASIC EDITING x delete character nx delete n characters X delete character before cursor dw delete word ndw delete n words dd delete line ndd delete n lines D delete characters from cursor to end of line r replace character under cursor cw replace a word ncw replace n words C change text from cursor to end of line o insert blank line below cursor (ready for insertion) O insert blank line above cursor (ready for insertion) J join succeeding line to current cursor line nJ join n succeeding lines to current cursor line u undo last change U restore current line
MOVING AROUND IN A FILE w forward word by word b backward word by word $ to end of line 0 (zero) to beginning of line H to top line of screen M to middle line of screen L to last line of screen G to last line of file 1G to first line of file
CLOSING AND SAVING A FILE ZZ save file and then quit :w save file :q! discard changes and quit file
Modification of CMOS settings :
Aim : Changing of Boot device priority, putting passwords, disabling and enabling of external devices
Objective : To make the student learn how to do the CMOS settings
Changing of Boot device priority
How to Set BIOS to Boot from CDROM:
All modern Computer Systems manufactured in the last years, support boot from cd feature, but it may be required to configure this feature in bios or previous owner of your computer system may have disabled this feature or may have changed the boot priority sequence )
When you start your computer, check the boot-screen for setup key, In most newer pc it will be DELETE key, so make sure to check it.
This AmiBios Require you to press DEL key to enter setup
now you will see some similar screen and choose the BOOT option and choose Boot Device Priority and choose first boot device to CDROM and second boot device to HARD DRIVE You can press F10 to save settings
.
On Award Bios you will see some similar screen and choose the right key to Enter setup
Now choose Advanced Bios Features
and set First Boot Device to CDROM and Second or third to HDD-0 and Press F10 to save it
On some Dell Systems you can enter bios by pressing F2
Now choose Boot Sequence and then arrance 1 to CD-Rom by pressing - + and press space to enable itPress ESC and choose save settings and exit
On some Dell Systems you can enter bios by pressing F2
Sometimes you can press F12 to temporary boot from cd on some Dell Systems
Press F2 to enter bios setup
and set Boot Sequence to A,CDROM,C and Press Esc and then F10 to save it
Some Computer has Option to temporary boot from Cd/Hdd/Floppy/Usb Device, Just keep tapping the F8 button to get Boot Menu and Now choose your manufacture of CDRom.
Putting passwords
1. Go to BIOS settings by pressing F2 key
2. Go to Security tab and select “Set User Password”
3. Enter the password and press “Enter”
4. Similarly to remove or change the password goto Security tab and change the password
Enabling and Disabling External Drives
1. Go to BIOS settings by pressing F2 key
2. Go to BOOT tab
3. Select “Boot to Removable Drives”
4. Then select “Enable” to enable the drives and “Disable” to disable the drives
Installation and Uninstallation of Antivirus
Aim : Installation of any free Antivirus like AVG, MCAFEE etc...
Uninstallation of Antivirus
Objective : To make the student learn how to install and uninstall the
antivirus
Installation of AVG
To Install AVG Anti-Virus
1. Download the Avg anti-virus from avg website
2. After the file has finished downloading double click on the file to start the anti-virus installation process.
3. The AVG Welcome screen will appear - click the Next button.
4. Read the Software License Agreement for AVG Anti-Virus and click the Accept button.
5. The next screen should check the system status of the computer - wait unitl that has finished.
6. On the next screen leave the default selection checked (Standard Installation) and click the Next button.
7. Next, verify the user name, or enter a new one and click the Next button.
8. On the Installation Summary screen, click the Finish button to begin installation.
9. Once the installation has finished, click the OK button to complete the installation process.
Configuring AVG Anti-Virus
1. Once the installation has completed the First Run Wizard will start - click the Next button.
2. At the next screen click Check For Updates
3. Select the check box that is labled Do not ask for update source next time and click the Internet button to download updates.
4. You might see a Update Selection window appear, if so, click Update to begin the update process.
5. You should now see a progress window that shows the status of the updates being downloaded.
6. After the updates have completed, click the OK button.
7. The next window gives you an option to create a Rescue Disk, if you do not wish to do this, click the Next button.
8. The next screen allows users to configure the email scanner, to do this click Configure Email Scanner and follow the instructions, if not, click Next.
9. The next window to open allows the user to scan the computer for viruses, click the Scan Computer button or, if you choose not to scan for viruses at this time, click Next.
10. The next screen allows you to register AVG Anti-Virus, registration can be skipped by clicking Next.
11. Click Continue to complete the configuration process.
Uninstalling Avg
There are three ways to do it.
1. Go to Programs-->AVG-->Uninstall AVG. Click on it and restart the system.
2. Go to control panel->add/remove programs->there u can find AVG FREE ->remove it and restart the system.
3. Quit the program and all running processes related to it, download a copy of the same version and begin the
install process up to the point where you can select uninstall, do so, reboot and it's removed.
Using System tools in windows:
Aim : Disk defragmenter, System Restore, Disk cleanup, character map
Objective : To make the students learn how to use and configure the
system tools
Disk Defragmenater
Disk Defragmenter is a computer program included in Microsoft Windows designed to increase access speed by
rearranging files stored on a disk to occupy contiguous storage locations, a technique commonly known as
defragmenting
Accessing Disk Defragmenter
Disk Defragmenter can be opened a number of different ways. The most common methods are listed below.
Start All Programs Accessories System Tools Disk Defragmenter
Start Run and type dfrg.msc in the Open line. Click OK
Start Administrative Tools Computer Management. Expand Storage and select Disk Defragmenter
The first two methods take you to a standalone window containing Disk Defragmenter. The last method opens Microsoft Management Console and displays Disk Defragmenter as one of the snap-in modules. In all cases, a window similar to the one below will be displayed.
When Disk Defragmenter first opens (Fig. 01) you'll see a list of the hard drives displayed at the top of the screen. The Estimated Disk Usage Before Defragmentation and Estimated Disk Usage After Defragmentation will be blank until a drive is selected and the Analyze button is clicked. In the screen shot above, I've already analyzed the drives as evidenced by the Session Status showing as Analyzed and the Estimated Disk Usage Before Defragmentation area containing a graphical representation of the drive fragmentation.
After the Analyze button has been clicked and the process completes the window shown above (Fig. 02) opens with a brief recommendation of what action Disk Defragmenter thinks should be taken regarding the drive. It's important to note that this is just a recommendation based on the percentage of fragmented files to total files and doesn't prevent the drive from being defragmented if you feel it needs to be done and might improve system performance. If you want to go ahead and defragment without more information, click the Defragment button. If you're in agreement with their recommendation and don't want to defragment, click the Close button. Click the View Report button to view a more detailed drive analysis.
An Analysis Report contains quite a bit of additional information about the selected drive. The report shown above (Fig. 03) details the File Fragmentation status of drive WXP02-D. The top pane provides Volume information, and as you can see there are 3,851 fragmented files. This may not seem like many fragmented files, but consider that this is only a 20GB drive, which is very small by today's standards, and that 81% of the total drive space is currently unused. Look at the Average Fragments Per File number of 1.04 and this tells you that approximately 4% of the files on the drive are in two or more pieces. My experience has been that when this number reaches 1.05 the message in the quick analysis window (Fig. 02) will recommend defragmenting the drive. The bottom pane, Most Fragmented Files, lists the files in descending order that are the most fragmented.
In spite of the recommendation not to defragment this particular disk, I went ahead and clicked the Defragment button. The results of that choice are shown above (Fig. 04) in the Estimated Disk Usage After Defragmentation section. The graphical representation clearly shows that not only have the red lines depicting fragmented files been eliminated, many of the contiguous files indicated by the blue have been repositioned toward the beginning of the drive, reducing the amount of searching the drive heads have to do to locate a file. The drive in this example is not a system drive, nor does it have a paging file which would be indicated by the lime green Unmovable Files color.
After the defragmentation process completes, clicking the View Report button will bring up the Defragmentation Report (Fig. 05). It takes the exact same form as the Analysis Report (Fig. 03) but shows the post defragmentation results. The Total Files and Average File Size remain identical, but notice that Total Fragmented Files and Total Excess Fragments have been reduced to zero (0) and the Average Fragments Per File is now 1.00, indicating most or all of the files are contiguous. In addition, there are no files listed that did not defragment.
System Restore
System Restore is a component of Microsoft's Windows Me, Windows XP and Windows Vista operating systems that allows for the rolling back of system files, registry keys, installed programs, etc., to a previous state in the event of malfunctioning or failure.
This is the opening screen for System Restore, accessible by clicking [Start] [All Programs] [Accessories] [System Tools] [System Restore]. Choose from the bulleted options on the right whether you want to restore your computer to an earlier time or create a new restore point for future use.
If you have chosen to restore to a previously established restore point the screen above will open. The calendar on the left will have dates in bold. Selecting a day will show the restore points available for that date in the breakout to the right of the calendar. Select the restore point you want and click [Next].
Last chance (not really) before you start the restore process. I say not really because one of the excellent features of System Restore is the ability to undo any restore performed. The [Help and Support] option available from the [Start] menu is an excellent source of more information on the different types of restore points available. Search under “System Restore”.
When you choose to establish a new restore point rather than go back to a previous restore point the screen above will open. Simply type in a name for the restore point in the data entry box. Be descriptive in your naming to make it easier when you come back to do a restore. Click [Create] and the process will begin.
The opening screen for System Restore contains a link called [System Restore Settings]. Clicking it will open the System Properties page which is accessible from many different locations and via many methods. The property page allows you to disable System Restore on any or all drives with the one caveat that it must be enabled on C:\ if any of the other drives are enabled. Click [Settings] to open the page shown below.
The Settings Property Sheet allows you to select the percentage of the drive space allocated to restore points. The default setting is 12% of total drive size, but this can be increased or decreased depending on the number of restore points you want to have available.
Disk cleanup
Disk Cleanup (cleanmgr.exe) is a computer maintenance utility included in Microsoft Windows designed to free up disk space on computer users' hard drive.
Starting Disk Cleanup
Disk Cleanup is available on both Home and Professional versions of XP. The utility can be accessed in any of the methods listed below.
Click Start Programs Accessories System Tools Disk Cleanup
Click Start Run and in the Open box type cleanmgr and click OK
In Windows Explorer or My Computer, right-click the disk in which you want to free up space, click Properties, click the General tab, and then click Disk Cleanup.
Use the drop down menu arrow to select the drive you want to clean.
Click [OK] and Disk Cleanup will analyze the selected drive to determine the amount of space that can be freed.
Once the drive analysis is complete a list of file categories will be presented for your selection.
Instead of automatically proceeding with cleanup once the drive analysis is complete, Disk Cleanup allows you to review the categories of files that can be deleted. Click on any of the categories to display more information relative to that category in the Description section of the window. If you're unsure if you want to delete the files in a category from the description, use the [View Files] button. A complete list of files scheduled for deletion will be displayed in Windows Explorer. Use drag and drop to move any files you want to save to a safe location and leave the category selected. If all the files are to be saved, close the window and then remove the checkmark from the file category so it will not be included in the disk cleanup. After all the categories have been reviewed, click [OK] to begin the disk cleanup process.
Character Map
Character Map is a utility included with Microsoft Windows operating systems and is used to view the characters in any installed font, to check what keyboard input (Alt code) is used to enter those characters, and to copy characters to the clipboard instead of typing them. The tool is usually useful for entering special characters.
Installation and configuration of printer and scanner software:
Aim : Installation and configuration of any printer and scanner software.
Objective : To make the student learn how to install and configure the
printer and scanner software
Install and configure a printer driver locally
Installing a printer driver is a Windows function, not a PowerPoint one. Before installing a printer driver, quit PowerPoint and your other programs.
Read over the installation instructions that came with your printer. When in doubt, follow the instructions there rather than the ones below.
Click Start, Settings, Control Panel.
Double-click "Printers & Faxes"
Double-click "Add Printer" to start the Add Printer Wizard
The Add Printer Wizard Welcome screen
Click Next
Local or Network Printer
Click "Local Printer"
Make sure there's NO checkmark next to "Automatically detect and install ..."
Click Next
Select a Printer Port
If your printer is actually attached to the computer, click "Use the following port" and select the port your printer's attached to.
If you're installing a driver only to keep PowerPoint happy, choose LPT1: or FILE: (it doesn't really matter, since you'll never actually print to the port)
If you're installing a local driver but need to print to a network printer, look for the printer's port on the network and choose it, if available. If not, choose LPT1: for now. You can change the setting later.
Click Next
Install Printer Software
If installing a real printer, select your printer manufacturer and printer model here.
If you have an installation disk or CD that came with the printer, click "Have Disk" and locate the INF file for the printer (check the printer's documentation for specific instructions).
If installing a printer only to keep PowerPoint happy, choose the HP LaserJet 4V/4MV as we've done here
Click Next
Name Your Printer
Give the printer a name (this is the name you'll use to select it later)
If installing a printer just to make PowerPoint happy, you might want to give it a name that indicates it isn't a real physical printer (PPT Pacifier, or the like)
Click "Yes" under "Do you want to use this printer as the default printer" (this option may not appear in all Windows versions; see Notes below)
Click Next
Printer Sharing
Click "Do not share this printer"
Click Next
Print Test Page
Click No
Click Next
Completing the Add Printer Wizard
Review your choices. Click Back if you need to change anything
Click Finish
If you don't see "Use this printer as the default printer" in the "Name printer" screen, finish installing the printer, then click Start, Settings, Printers; rightclick the printer you just installed and click "Set as default printer" from the pop-up menu that appears.
If you have a physical printer installed, you can print a test page to make sure it's working correctly and to verify that it's a local and not a network-installed driver.
Click Start, then click Printers and Faxes
Right-click the printer you want to test and choose Properties from the pop-up menu
Click "Print test page" on the Properties dialog box that appears
When the test page finishes printing, check the following items on it:
Computer name: this will be the name of the computer the printer driver is on. It should be the same as your computer's name. If it's some other computer's name, then the printer driver is NOT locally installed.
Printer name: this should show the name you assigned when installing the driver; if it shows something like \\Computername\Printername, the driver's on the network, not on your PC. Consider removing the network version and installing a local driver instead.
To install and configure a scanner follow the steps below:
Parallel Port Scanner
1. Shutdown system.
2. Hook parallel connector to printer port of your computer. If you have a SCSI scanner, or USB simply hook into one of those ports.
3. Unlock scanner head. This is usually done underneath scanner of on sides by power switch.
4. Plug in power for scanner boot system up Windows will recognize new device and hardware manager will appear.
SCSI Scanner
1. If you have a SCSI scanner you may already be familiar with ID settings, terminator plugs, and anything else that goes along with the chain. First I want to cover installing the SCSI Adapter Card.
2. Make sure and refer to your adapters documentation for jumper settings. You will want to set the jumpers if any before we install the adapter.
3. Turn Off PC and unplug from outlet
4. Remove case cover
5. Unscrew a slot on case for adapter card
6. connect any necessary internal cables. (drives)
7. Align card with Bus slot and seat evenly. Be careful of any catching the cards ports on anything.
8. Tighten down card snug
9. Close case
10. Hook up power
NOTE: You may need to load drivers for your device. See: "Installing A Device or Software" below.
USB Scanner
1. This one is very simple. You will simply plug in with computer running and install a driver for it.
2. Exit all programs running.
3. With only windows running plug in your scanner into the USB port
4. Give windows a few seconds
5. you should be brought to a hardware wizard
6. Now you are ready to load a driver for itNote: To install software driver for the device, See: "Installing a Device or Software" below.
Installing A Device or Software Now there are many ways to install a device or software for the device. The most common method is through the control panel. I will show you the manual install under Windows and the Plug and Play way.Plug and Play-With windows detecting your new device you have installed you will be prompted for location of the device driver.In windows you can choose to search for driver or review a driver list windows has set up. The best way to go about this is to have your manufacturers CD/Floppy disk ready and in a drive. Choose "Search for a better driver".The next dialog box will give you a list of a floppy, CD-ROM, and so on. Choose the installation media type you are using and click "next".Now when if your unsure of the location of the software on the disk is usually in a INF. file type. Also look in any corresponding folders for example win95 or win 98 and even drivers. Refer to your software documentation if you cant find it. Windows will also tell you if there is information about your device in the next dialog box. Now that you chosen the drive simply hit "ok" or "next".If you found the right driver you will see a dialog box with the new information in it. Hit "next" or "ok"Windows will build a database of needed drivers from the one you selected and you will need to reboot.
No comments:
Post a Comment