Open Linux

download Open Linux

of 52

Transcript of Open Linux

  • 8/6/2019 Open Linux

    1/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    2/52

    XP Linux

    Primary Extended (Logical)

    40 GB Hard disk

    C:// 10 GB

    D:// 10 GB

    E:// 10 GB

    ------------

    / 8GB

    /boot 200-512 MB

    Swap Ram*2

    -------------

    hda primary master

    hdb primary slave

    hdc secondary master

    hdd secondary slave

    ----------------

    0 Sector size = 512 bytesIPL = 446 bytes

    FAT32 FAT32 FAT32 Ext3 Ext3 swap

    /dev/hda /dev/hda1 /dev/hda2 /dev/hda3 /dev/hda6/dev/hda5/dev/hda4

    C:// D:// E:// /boot X/dev/hda5/0 Sector (MBR)

    Partition Table

    GRUB

    NTLDR

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    3/52

    1:- Linux file system

    / bin All commandswhich are used by normal users

    / sbin All commandswhich are used by supper user

    / boot Linux kernel ( vmlinuz , initrd ) Grub directory

    / etc System conf files

    / var Server data logsMail proxy cache

    / dev All devicesname stored in / dev

    / usr All gui toolsinstalled in / usr

    / proc System informations( picture of RAM )

    / home User'shome dir's

    / tmp Temporaryfiles

    / media Auto mounted devicesmount point in / media

    / boot / etc / usr / var / home / tmp / dev / proc / media

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    4/52

    2:--Concept of swap

    / / boot

    Ext3 Ext3 swap

    [Ram 256MB]

    Linux os image size 300MB Remaining os image in swap

    44MB

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    5/52

    3:-- Basic commonds

    For changing directory / to /etc

    One step back /etc to /

    Go to previous working directory

    Go to current login user home directory

    Show the contents of /etc in single color

    Show the contents of /etc in different colors with nature of contents

    create a folder on root partition

    Create a folder in /disk

    Create multiple folder in multiple directories with single command

    Create multiple folder in same directory

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    6/52

    Copy a file in directory

    Copy a file from /disk/file and paste it in /disk/dir/

    Copy a directory with r option

    Copy a file from /disk/file and paste it in /etc with myfile name

    Remove a file

    Remove a file with forcefully option

    Remove a directory with out r option and you face will an error

    Remove a directory with r option

    Remove a directory with forcefully option

    Move /etc/dir1 to /disk/ with different name

    Rename the folder name mydir to dir

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    7/52

    Rename the file name with myfile

    Read a file on terminal

    Read a file page by page with less command

    Read a file page by page with more command

    Read first ten lines of grub.conf

    Read last ten lings of grub.conf

    Read first 12 lines with n option

    Read last 11 lines with n option

    Copy the contents of /etc/grub.conf in /disk/file

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    8/52

    Append the contents /etc/mtab in /etc/file

    Merging tow commands with pipe sign output of the first command is input of second command

    Count the total lines of squid.conf

    Show only spool words in squid.conf

    Flush the contents of file

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    9/52

    4:- User Management

    Adding user with graphical utility

    Show the properties of fiaz user

    Add tow uses ishaq and umar with different command with default properties

    Assigning password to ishaq

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    10/52

    Add a group

    Customizing users properties at the time of creating user

    [u uid ] [-g primary group] [-G secondary group] [ -c comments] [ -d home directory path ] [-s login shell ]

    Modify user properties with usermod command

    Delete a user saleem with his home directory

    Delete a group corvit

    All usersinformation stored in / etc/ passwd everyuser have a seven column line in thisfile

    1-user name [ user authenticate at the time of login from the first column of / etc/ passwd ]

    2-password required [ x meansusersmust requiredpasswordif remove thisx user canlogin without password

    ]

    3-uid [ 500 first user id 0 to 499 idsare reserved0 for root user and remainingfor servicesusers]

    4-gid [ every user relate with any group which storedin / etc/ group]

    5-comments [full name but it is not compulsoryonly for information ]

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    11/52

    6-home directory path [ linuxfile system isread only for normal user only hishome directory iswith full

    permission for normal user

    7-login shell (/ bin/ bash, / bin/sh, / bin/ tsh, / sbin/ nologin) everyuser requireda shell for login without shell user

    can never login at machine

    All groups stored in this file

    User password stored in this file

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    12/52

    5:- Help

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    13/52

    6:- Permission

    Gui permission method...

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    14/52

    Three types of permission read write and execute, Ever file and folder have three relations owner group and

    others

    [ Read = r write = w execute = x ] [ owner = u group = g other = o ]

    1 2 3 4 5 6 7 8 9 10

    1= nature of object [d=dir -=file L=link]

    2= first three permission for owner [ rwx]

    3= second three permissionfor group members[ r-x]

    4= thirdthree permissionfor others[r-x]

    5= number of inodes contain bythisdirectory

    6= owner of directory

    7= groupof directory

    8= size of directory

    9= creatingdate of object

    10=name of object

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    15/52

    Changingpermission = give write permission to other on/ disk

    Give read write and execute permissionfor group on / disk

    Assigningread writ and execute permissionto user, group and other with single command

    Assigningdifferent permission with different commands which separate with semicolon

    Usingnumber system =----- [ Read = 4 ] [ Write = 2 ] [ Execute = 1 ]

    rwx=7

    r-x=5

    ---=0

    Assigningfull permission to owner and no permissionfor group and others

    Assigningfull permissionfor owner and group nopermission for other

    Assigningfull permission to all

    Assigning full permission for owner and read, and execute for group and others

    Assigning no permission for all

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    16/52

    Assigning sticky bit permission for other

    Assigning suid permission for owner

    Assigning sgid permission for group

    7:-Archivingand Compression

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    17/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    18/52

    8:-Partition

    Fdisk utility use to manage hard disk

    Help

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    19/52

    Starting cylinder

    Print partition table

    Add new partitionSize in Mb

    Print partition table

    New partition size 500MB

    Write and quite

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    20/52

    This command sink and updating kernel real table with fdisk utility you can check this table cat /proc/partitions

    Make file system ext3 on /dev/hdc6

    Create a folder for mount point

    Mount device name on /windisk folder

    Show Linux mounted partitions size and usage percentage

    Boot time Linux file system mount from /etc/fstab

    Device name Mount point File system Mounting option

    Auto dump

    Order of

    fsck utility

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    21/52

    Umounting partition

    Assigning a label [work] to device name

    Show device name label

    Mounting device label on /windisk

    / dev/ hdc6 or LABEL=work

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    22/52

    10:- RPM ( Redhat package manager )Query about zsh package from installed rpm database

    Removing zsh package

    Again query after removing zsh package

    For installing new rpms first mount your DVD in /media

    Copy the contents of DVD in /var/ftp/pub

    Installing zsh package

    Information about installed zsh package

    Show the path where zsh is installed

    Query all installed rpms

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    23/52

    Query all installed rpms but show only those which have bind word in there name

    Query to squid.conf what is your package name

    Query about information of uninstalled zsh package

    Query the list of files and directories which zsh will be create after installing

    Fresh installation of zsh package with new version ( old version of zsh must be installed before using Fvh )

    Update zsh package with new version of zsh ( Uvh can work as ivh )

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    24/52

    11:- Network Configuration

    Show ip address and MAC of eth1

    Show physical connectivity

    Enable eth1

    Disable eth1

    Opening gui tool for configuring ip configuration

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    25/52

    Restarting network service

    Dns address stored this file

    Mac, ip and more information about eth1 in this file

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    26/52

    Check your machine name

    Reconfigure your machine name

    Permanent store your machine name in this file

    Check your route way

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    27/52

    12:- Disk Quota

    Quota is mounting option before applying quota on any partition first mount this partition with quota option

    Add mounting option in /etc/fstab because our file system mounting from /etc/fstab

    After adding usrquota option remount the partition

    Show all mounted partitions mount points and mounting options

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    28/52

  • 8/6/2019 Open Linux

    29/52

    13:- ACL

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    30/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    31/52

    14:- Crontab

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    32/52

    15:- SWAP(Partition & file)

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    33/52

    SWAPPartition

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    34/52

    / dev/ hdc7 swap swap defaults 0 0

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    35/52

  • 8/6/2019 Open Linux

    36/52

    / etc/ rc.d/ rc.sysinit

    1: set kernel parametersin / etc/ sysctl.conf

    2: load system maps

    3: Enablesswap partition

    4: Setshostname

    5: Root file system check and remount

    6: Active Raid and LVM devices

    7: Enable disk quota

    Run levels:--

    # ls/ etc/ rc.d/

    Rc0.d [halt or shutdown ]

    Rc1.d [ emergency mode or single user mode without password ]

    Rc2.d [ Multi user mode without nfsservice ]

    Rc3.d [ Full multi user mode ]

    Rc4.d [ unused ]

    Rc5.d [ X11 ]

    Rc6.d [ Reboot ]

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    37/52

    17:- Raid [redundant array independent disk]

    0striping 1Mirroring 5Strip set with parity bit

    Hard disk 2-32 2-2 3-32

    Failure support 0 1 1

    Size loss 0% 50% =1 hard disk

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    38/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    39/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    40/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    41/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    42/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    43/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    44/52

    18:- LVM (logical volume manager)

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    45/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    46/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    47/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    48/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    49/52

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    50/52

    19:-YUM

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    51/52

    On client

    http://www.go2pdf.com/
  • 8/6/2019 Open Linux

    52/52