Thursday, April 14, 2011

Basic commands and comparision with windows functionality :-)

yup just installation is nt enough you want to learn something else to work on this platform so try these simple basic commands which is essential for even you become a big stream adm
in 


first let me write about some important terms that compared to windows
Directories  -  folders
root /          -  administrator


For a more details about that particular command  use the man pages available in the linux itelf .(eg: man ls)


1.COMMAND
  • ls - To list the directory content -To list the contents of available directories
         
SYNTAX
                 -a -shows all files that are hidden (hidden files starts with .(dot))
                 -l  -shows all information with permission too
                 -r -reverse the order of file display
                 -s -gives size in blocks
                 -x -Displays files in columns

EXAMPLE
          ls  -l <directory name or file name>
     
   this command will display the files information with permission too

drwxr-----  2 root 4025 nov 8 19:51 mail/

in the above example first drwxr-----   is a permission lets we discuise about permission in new post just know about it d -directory r -read w -write x -execute
then 2 denote no.of directoris
4025 is size
and followed by date and time
mail/ is diretory name 

Comparing with windows
 ls command - in windows we open folders to view that files and we use folder option to view that hidden file orelse we use properties of that folder to view the permission and size and all but ina single command we can see all its :-)











2.COMMAND
  • cd - Change directories - to move from one directory to another                                                          

                                                                                        
SYNTAX
                   cd <directory name> 

                  
EXAMPLE  
                      cd /home
in this if you are in root directory it will move on to /home directory 

Comparing with windows
                         cd command works as like that we use oru mouse and keyboard to choose or move from  one folder to another that will be done here by just typing 




3.COMMAND
  • mkdir - make directory - to make a new directory                                                         

                                                                                        
SYNTAX
                   mkdir <directory name> 

                  
EXAMPLE  
                      mkdir /test
fr this command system will create a new directory  on  / -root's home directory

Comparing with windows
                         mkdir command works as like creating a new folder by right click on the mouse and selecting
     NEW - FOLDER(here in linux directories refers folder in windows nothing more than that)




4.COMMAND
  • rm - Remove  - to remove a file                                                          

                                                                                        
SYNTAX
                   rmdir  <file name>  
                   rmdir -rf  <file name>

                  
EXAMPLE  
                      rm file
                      rm -rf  file1
in the first one rm file the command only remove the empty file 
while in the second one it will delete whole file even its written 

Comparing with windows
                       rm command works as deleting a files in the system






5.COMMAND
  • rmdir - Remove directories - to remove  directory                                                          

                                                                                        
SYNTAX
                   rmdir  <directory name>  
                   rmdir -rf  <dirctory name>

                  
EXAMPLE  
                      rmdir test
                      rmdir -rf test1
in the first one rmdir test the command only remove the empty directory if test directory has some other files inside it then it will prompt a message that the directory cannot be removed  while it has parent directory

while in the second one it doesn't prompt it will delete the whole tree structure 

Comparing with windows
                       rmdir command works as deleting a folder in the system



6.COMMAND
  • touch -  to create empty file                                                         

                                                                                        
SYNTAX
                   
                   touch  <file name>

                  
EXAMPLE  
                      touch test
                   
 this cmmand will create a new empty file 

Comparing with windows
                       touch command works as creating blank notepad or wordpad file  in the system



7.COMMAND
  • cp - copy - to copy file or directory                                                         

                                                                                        
SYNTAX
                   
                   cp  <source file> <destination file>

                  
EXAMPLE  
                      cp test test1
                   
 this cmmand will copy test file info into test1 and create a dublicate file test1 as test   

Comparing with windows
                       cp command works as same as copy command in windows



8.COMMAND
  • mv -  to move a file(thats renaming)                                                         

                                                                                        
SYNTAX
                   
                   mv  <source file> <destination file>

                  
EXAMPLE  
                      mv test guest
                   
 this cmmand will rename test file into guest and move that file to the specified location

Comparing with windows
                       mv command works as a rename option in the windows and also it will move the file like drag and drop in windows


FOR  FURTHER INFO ABOUT THESE COMMANDS USE MAN PAGES THAT IS AVAL ON THE LINUX SYSTEM ITSELF

Wednesday, April 13, 2011

Linux installation guide

Lets install on screen by screen process with explanation on it :
  
If u are willing to install LINUX on WINDOWS then Follow below steps
First of all i will explain how to make the partiton in windows for linux
  

Go to START--RUN--diskmgmt.msc
 on that DELETE LOGICAL DRIVE thats other than the Windows os drive  choose anyone (max upto 10GB hard drive is space is enough to boot up linux for learning purpose) and make a check whether it is changed into extended partiton if its then move on to installation process

reboot the system

Insert Linux cd-rom or DVD (now a days linux is coming under a DVD format so no problem in installation)

Screen 1:
    Redhat welcome screen will appear - on that if u are wiling to do in graphical mode (using keyboard and mouse)just press ENTER or else if u want t try in text mode then move on to type a command and get ready  for learn bit much better than  graphcial learner :-)


for text mode installation type following command while it shows boot : prompt

Linux text

(note: one main thing that u lose while using text mode is that LVM(logical volume)configuration is not available  during text mode installation
bt we an also use configure it at when we entered ito it we will learn later about it )


Screen 2:
Keyboard type : US international

Desc:
     let u first know about the type of keyboard that you are using there are many types of keyboard languages


Screen 3:
choose installation method:Cd-rom or DVD


Desc:
      i will list all methods:
1.CD-ROM
2.HARD DRIVE
3.NFS(Network file sharing)
4.FTP(File transfer protocol)
5.HTTP(Hyper text transfer protocol)
6.PEN DRIVE
Full desc:
1.CD-ROM
       If u have redhat CD's then move on to this method
2.HARD DRIVE
      If u have copied a iso images of redhat os in ur hard drive then move on to this method it also requires bootable CD-ROM
3.NFS
     If u are using NFS server using iso image or a mirror image of redhat ,you also need a bootable CD-ROM(use linux ask method in boot option)
4.FTP
     If u are using FTP server then use this method(use linux ask method in boot option)
5.HTTP
      If u are installing directly from HTTP(web)server,use this method
6.PENDRIVE:
Screen 4:
Skip this step (if u are not having installation  code)


Desc:
   Intallation key is provided if u are using it from legal redhat (buy from redhat enterprice while u download)

Screen 6:
u have two options:
1.Automatic partition
2.Manual partiton

Desc:
    Automatic partition:
            It will automatically partition from its memory(do not prefer)
   Manual partition:
            Prefer it then only the partition drive will be notified by urs and space allocation  should be allocated by urs own


okey lets move to main part of it partitioning :

normally two partition is more than enough for a user
1.swap
2.root that is / (admin)

but for our purpose we can use more than that lets move on to it

click on new
then submit below partition
 choose  Mount point  /
              File system type ext3
              size   10000Mb
then click ok

then again go to new
          Mount point  swap
           size   (2XRAM size) ie first know RAM mem size than 2X RAm size (most probably 2048Mb)
then once again go to new
Mount point  /boot
              File system type ext3
              size   500Mb

 go to new again
 Mount point  / home
              File system type ext3
              size   10000Mb       
click ok
 if u want to edit any partiton click  edit orelse double click on that partition
to delete the partiton highlight on that partition and then click delete and give okey if prompt appears
yup finished your partition lets move on to next screen click next

Screen 6:
     Boot loader:GRUB is the default boot loader for Linux so nothing to change click next


Screen 7:
      Network configuration : DHCP is best but if u can u can also assign ip address directly you can do it but  its not permanent we can modify if we enter in to Linux
 Note: normally if u have any network devie then it will auotmatically detects and display it on the screen
Screen 8:
       Firewall options: nothing to do more we can configure if we want inside the Linux
Screen 9:
      Language support :you can select language of ur own here

Screen 10:
      Time zone configuration: select time zone  base  on GMT or else u can point out the place in map        
Screen 11:  
     Root password: This screen is to login as super-user set password that u can remember always

Screen 12:
    Package selection:
  1.Cutomize package selection
  2.Default package selection
  use any one if u choose customize then u must tick appropriate selection i that group of package
  Default is system will automatially install main packages that linux need more
Screen 13:
     Preparing to install:
   Dec:
       A screen preparing to install is appear and process goes on automatially
       for your reference a complete log of your installation will be found in /root.install.log once you reboot your sytem
Warning:
      For some reason if u cant able to run the installation and if u wish to drop then just do it before you press next here if you press next then the installation files will be wriiten in your hard disk
Screen 14:
         Installation complete
note:The installation program prompt you to prepare system reboot on this screen check whether you removed your CD or any media

yes the installation process got over and now you are going to enter into LINUX world

but before that it ask for activation subscribtion key: yes if u had a key then enter it then only you can receive updation from redhat enterprice na dyou can also use their repository for download purpose
orelse just skip it and enter into LINUX
        
   
      

INSTALLATION METHOD-Creating MBR recovery Step1

You have two choices, 
1.a single Operating System (OS) 
2. a multi-boot system


Single operating system(os):-
                  We can install single os ina system thats only LINUX -that will never cause any fault in booting most probably(than mulit boot)


Multi-boot system:-
                Installing dual or more than that in a single hard disk - Like  Windows,Linux,Mac or Win xp ,Win 98,redhat(linux),Win xp.....
                    On Installing mulit os Boot loader will ask at the time of boot - which one want to choose it from ,we can select it from that prompt
                      on installing multi -boot cause override problems - its wiser to make a recovery CD as a Administrator to recover from it 






As i dont know about creating this MBR disk i just copied this from several sites by referral :-) 
and iam trying to do it after i finished and tested i will strongly recommend it until then dont try this plzzzzzzzz






Okey lets move on to the uestion HOW TO MAKE RECOVERY CD in MS/WINDOWS


There are three steps :
1.Make a wise backup of files that is important in ur system - even its better  to make it at the time of updating that files 
2.Make a Dos boot floppy to restore MBR if its gete corrupted
3.Create Dos/Windows reovery disks for Dos/Windows partition (if dual boot is required )


Oops i forget to tell about MBR
yup MBR is MASTER BOOT RECORD is the  information in the first sector of any hard disk or diskette that identifies how and where an operating system is located so that it can be boot (loaded) into computers main storage or RAM 


simply saying MBR contains table of records of boot option of all OS in which user an choose any one of them and then it will search in that table for that particular partition and load that in to RAM for access.


Okey again move on to the Steps to create a wise recovery diskette fo windows :


Dos recovery disk:
Note: These steps are for users who have MS-DOS installed on the computer. If you have any version of Windows follow the below steps for your version of Windows.
To create a MS-DOS diskette, begin by getting to the DOS directory by typing:
cd/dos

NOTE: When making a boot disk, if you are running "Stacker" or some kind of a DoubleSpace or drive swapper program, this could not work
Once you are in DOS and at the correct directory as instructed in the above sections by operating system, you are ready to create your bootable diskette. Insert a diskette that does not contain any information (it will be erased).
At the prompt, if you have MS-DOS 6.2 / Windows 3.x / Windows 95 / Windows 98, type:
FORMAT A:/S
If you have MS-DOS 5.0 type using double density 5.25" diskettes type:
FORMAT A: /360 /S
If you have MS- DOS 3.11 through 4.0 using double density 5.25" diskettes, type:
FORMAT A: /4 /S
Once the diskette has been formatted and the system has been transferred, you should be returned to your original directory. In this directory, type:
copy format*.* a: [PRESS ENTER]
copy fdisk*.* a: [PRESS ENTER]
copy mscdex*.* a: [PRESS ENTER]
copy sys*.* a: [PRESS ENTER]
copy edit*.* a: [PRESS ENTER]

copy qbasic*.* a: [PRESS ENTER] (Win 95/98 users skip this line)
copy debug*.* a: [PRESS ENTER]
copy himem*.* a: [PRESS ENTER]
copy emm386*.* a: [PRESS ENTER]
If you are planning to use this diskette as a diskette to load games or you feel that you need mouse support, you will need to copy the mouse driver onto the boot diskette. The MS-DOS mouse driver is generally mouse.com / mouse.sys. Locate this file and copy it to your bootable diskette.
Once you have copied the above files, create an  autoexec.bat and config.sys

About the autoexec and config
The autoexec.bat and the config.sys were files created for MS-DOS and Windows 3.x as an easy solution of loading the files required for various devices as well as the operating system to properly run. These files are required for later revisions of MS-DOS and Windows 3.x to load. Because Microsoft is trying to steer away from MS-DOS, these files are not required for Windows 95Windows 98Windows NTWindows MEWindows 2000Windows XP, or later operating systems. However, in some cases it may still be necessary for users to edit or configure these files.
How to edit the files
The auotexec.bat and the config.sys are most commonly edited by the MS-DOScommand file Edit. To edit these files, type edit c:\autoexec.bat to edit the autoexec.bat file, or edit c:\config.sys to edit the config.sys file. If the mouse drivers are not loaded properly you will not have the capability of navigating the mouse.
If you have Windows 95Windows 98, or later versions of Windows it is recommended that you use the sysedit command; to run this program, click Start / Run and type sysedit.
Remarking information
Remarking lines within the autoexec.bat or the config.sys allows you to temporarily or permanently prevent a line from loading each time you boot the computer. This is done by placing "REM " in front of the line you wish to skip.
If you are encountering issues with a line in the autoexec.bat it is highly recommended that you remark the line instead of removing it. This will prevent issues from arising if the line needs to be placed back into the autoexec.bat.
Getting additional memory
The below commands will help allow your computer to load programs into memory more efficiently allowing you to have more memory for MS-DOS programs / games.
Ensure you have the below three lines at the beginning of your config.sys file.
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
By placing the DOS=HIGH,UMB on the second line, this can, in some cases, save memory because it is loading DOS into upper memory before loading the memory manager. Additionally, the first and third lines cannot be loaded into high memory because these lines are the memory managers.
Load all your devices in your config.sys and autoexec.bat into high memory.
Autoexec.bat layout
Below is an example of what an autoexec may look like:
@echo off
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET PATH=C:\Windows;C:\
LH C:\Windows\COMMAND\MSCDEX.EXE /D:123
SET PATH=C:\Windows;C:\
LH C:\Windows\COMMAND\MSCDEX.EXE /D:123

Get to the floppy drive by typing A:, once at the floppy drive, type:
copy con autoexec.bat [PRESS ENTER]
@echo off [PRESS ENTER]
LH A:\MSCDEX.EXE /D:CDROM [PRESS ENTER] 
(this line is used for your CD-ROM drive).
LH A:\MOUSE.* [PRESS ENTER]
 (skip line if you did not copy mouse file, the * is either sys / com).
Press and hold CTRL + Z - this should return ^Z. Once this is displayed, press enter to copy the file.
copy con config.sys [PRESS ENTER]
device=a:\himem.sys
dos=high,umb
device=a:\emm386.exe noems
files=30
buffers=20
devicehigh=a:\oakcdrom.sys /d:CDROM
 (this line is used for your CD-ROM drive).
Press and hold CTRL + Z - this should return ^Z. Once this is displayed, press enter to copy the file.
Congratulations, after completing the above steps you should now have a bootable floppy diskette.



yup  now let i inform how to use this  disk as i know that :p


First boot the system with Rescue cd inside adn then enter the following commands in shell

ter the following shell command:
  • DOS/Win9X:
    A:\>FDISK /MBR C:
    
  • Win 2000/NT: (boot from CD and enter "Recovery Console")
    fixmbr
    
  • Win XP: (boot from CD and enter "Recovery Console")
    bootcfg /rebuild
    
     yes thats all urs MBR will be normal back to action

    on next post u can see the installation method 

HARDWARE REQUIREMENTS FOR LINUX

For installing Linux operating system needs a specific hardware reuirements here are the basic hardware requirement for a Linux operating system:-

For REDHAT :-

  • 2GHz or better processor,Pentium 4 or higher version is opt
  • 4GB of available disk space
  • 1GB of memory (RAM)
  • CD-ROM drive
  • Ethernet interface
For UBUNTU :-

  • 700 MHz or better processor
  • 3GB of available disk space
  • 256MB of memory (RAM)
  • CD-ROM drive
  • Ethernet interface
  • VGA graphics interface

For  XUBUNTU:-
  • 500 MHz or better processor
  • 1.5GB of available disk space
  • 192MB of memory (RAM) for installation but only 128 MB of RAM to run from the installation CD
  • CD-ROM drive
  • Ethernet interface
  • VGA graphics interface                     
For SUSE :-

  • pentium 1-4;AMD Duron,Athlon,Athlo xp,Athlon Mp,or Athlon 64;Intel celeron or EM64 processor
  • Atleast 500MB of available disk space,2.5GB recommended for standard system
  • Atleast 128MB of memory (RAM)
  • CD-ROM drive
  • Ethernet interface
  • VGA graphics interface