Tutorial on linux introduction installation initial setups
This presentation is the property of its rightful owner.
Sponsored Links
1 / 72

Tutorial on Linux Introduction, Installation & Initial Setups PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

Tutorial on Linux Introduction, Installation & Initial Setups. Speaker: Faran Javed (BIT-5) Abdul Lateef Khan (BIT-5). Agenda. Introduction Planning to Install Installing Red Hat Linux Post Installation Configuration First Steps with Linux. Part – I Getting Started. Introduction.

Download Presentation

Tutorial on Linux Introduction, Installation & Initial Setups

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Tutorial on linux introduction installation initial setups

Tutorial on Linux Introduction, Installation & Initial Setups


Faran Javed (BIT-5)

Abdul Lateef Khan (BIT-5)



  • Introduction

  • Planning to Install

  • Installing Red Hat Linux

  • Post Installation Configuration

  • First Steps with Linux

Part i getting started

Part – IGetting Started



  • For x86 architecture

  • Free implementation of UNIX

  • Used for

    • Programming

    • Productivity

    • Distributed Computing

    • Telecom & Networking

What is l inux

What is Linux ?

Tutorial on linux introduction installation initial setups

  • The core kernel of a free operating system first developed and released to the world by Linus Bendict Torvalds in 1991

What s red hat linux

What’s Red Hat Linux ?

Tutorial on linux introduction installation initial setups

  • Product of Red Hat Inc.

  • Named after a Cornell university team hat.

  • Objective:

    • Develop release and market an easily managed, and easy to use Linux Distribution

Brief history

Brief History

  • Initiated by Linux Torvalds

  • Initially the little Clone of Unix

  • Version 0.0.1 was never announced

  • Version 0.0.2 announced October 5 1991

  • Aim was to build a MINIX look-a-like OS for AT 386 machines

System features

System Features

  • complete multitasking, multi-user operating system

  • Complete Implementation of the TCP/IP stack and other networking software is provided

  • Variety of File systems supported

    • Ext2

    • Ext3

    • XENIX and UNIX System V

    • Microsoft MS-DOS

    • Windows 95 VFAT file systems on a hard drive or floppy.

    • The ISO 9660 CD-ROM file system is also supported.

System features1

System Features

  • The kernel supports demand-paged, loaded executables.

    • Only those segments of a program which are actually in use are read into memory from disk.

  • unified memory pool for user programs and disk cache.

    • All free memory is used by the cache, which is reduced when running large programs.

  • Executables use dynamically linked, shared libraries

System features2

System Features

  • To facilitate debugging, the kernel generates core dumps for post-mortem analysis.

  • amount of available memory, Linux also implements disk paging

  • If several instances of a program are running at once, they share physical memory, which reduces overall usage.

Software features

Software Features

  • Coming Up in Later Slides

Preparing to install l inux

Preparing To InstallLinux

Linux installation

Linux Installation

  • Hardware Compatibility

    • http://hardware.redhat.com/hcl/

  • Disk Space

    • 400 MB – 5 GB depending on minimal, personal, server etc. settings

Preparing for the install process

Preparing for the Install Process

  • Most Common Installation Methods

    • CD-ROM

    • NFS

      • From a remotely mounted hard drive containing the red hat Linux software

    • FTP

    • HTTP

    • Hard Drive Partition

Preparing to install from a cd rom

Preparing to Install from a CD-ROM

  • Just make sure System BIOS is set to BOOT from CD_ROM

Partitioning your hard disk space

Partitioning Your Hard Disk Space

  • If Linux is the only OS than we can auto partition

  • Assuming a machine with 20 GB Hard Disk & 256 MB RAM

  • Most basic Scheme Requires a native root partition & a swap partition

Typical partitions

Typical Partitions

  • For a machine with only Linux on the system the scheme will look like:

    • Hard Drive Partition Mount Point Size

      /dev/hda1/19.14 GB

      /dev/hda2 swap512 MB

  • For a machine already having windows:

    • Hard Drive Partition Mount Point Size

      /dev/hda1/mnt/dos9.74 GB

      /dev/hda2/8.14 GB

      /dev/hda3 swap512 MB

Hosting parts of the linux file system on partitions

Hosting Parts of the Linux File System on Partitions

  • /home

    • Our users home – will contain our personal files,

  • /opt

    • Directory for additional software packages to be installed

  • /tmp

    • Used as temporary storage for users

  • /usr

    • Holds nearly all software on the red hat system

  • /var

    • Security logs, mails, print spools are under this directory

Kickstart installation method

Kickstart Installation Method

  • Automation always saves time

  • Use Red Hats KickStart Configurator

  • A sample ks.cfg file

    #System Language

    Lang en-US

    #Langugae Modules to Install

    Langsupport en_US

Sample file

Sample File

# System Keyboard

keyboard us

# System mouse

Mouse genericps/2

# System time zone

Timezone –utc America/NewYork

# Root password

Rootpw – iscrypted $1$shaldsgfakd3452435gjAJHSGDA/SAD324

The installation process

The Installation Process

  • Language Selection

  • Keyboard and Mouse configuration

  • Choice of installation type

    • Personal Desktop

      • If new to the world of Linux

    • Workstation

      • If you would like a graphical desktop environment, as well as software development tools

    • Server

      • If you would like your system to function as a Linux-based server

    • Custom

      • Greatest flexibility

    • Upgrade

Installation process cont

Installation Process (cont.)

  • Disk partitioning

    • Automatic Partitioning

    • Manual Partitioning

      • ext2, ext3, RAID, swap, vfat etc.

  • Configuring Boot Loader

    • LILO

    • GRUB

  • Network Configuration

  • Firewall Configuration

  • Language & Time Zone Configuration

Installation process cont1

Installation Process (cont.)

  • Authentication setup

  • Package Selection

  • Actual installation

  • Boot Disk creation, VGA and monitor configuration

First steps in linux

First Steps In Linux

Viewing the red hat linux file system

Viewing the red hat Linux file system

  • Ls

  • Tree

Basic linux directories

Basic Linux Directories

  • / The root Directory

  • /bin Essential Commands

  • /bootBoot Loader Files

  • /devDevice Files

  • /etcSystem Configuration files

  • /home User home directories

  • /lib Shared libraries

  • /mntusual mount point

  • /opt Add-on software packages

  • ProcKernel Information Process control

  • /rootSuper user

  • /sbinSystem commands mostly root only

  • /tftpbootNetwork boot support

  • /tmptemp files

  • /UsrSecondary software file hierarchy

  • /varVariable data (e.g. logos), spooled files

Files in the etc directory

Files in the /etc directory

  • Fstab

    • FILE SYSTEM TABLE. A text file listing each hard drive, Floppy drive or other storage attached to your PC.

  • Inittab

    • The system Initialization table. Defines default run level. Here we can define either to use text or GUI mode.

  • Modules.conf

    • Contains directions and options used when loading kernel modules to enable various types of hardware

  • Passwd

    • The list of users of the system & their accnt info.

  • Printcap

    • Systems printer capabilities database

  • Shells

    • A list of approved shells (command line interfaces)

  • Sysconfig

    • Tree –afx /etc/sysconfig

Interact with the kernel

Interact with the kernel

  • Use the proc diractory

  • Vi /proc/meminfo

  • Or use the free command

  • /proc/cpu -- cpu family,type & speed

  • /proc/net – important networking info

    • /proc/net/netstat , /proc/net/route , /proc/net/dev

  • /proc/version – kernel version

Remote login

Remote Login

  • Use SSH – secure shell

  • Linux also supports :

    • Telnet

    • Rlogin

Changing user information

Changing user Information

  • Chfn – change finger information

  • Finger – get finger information

Accessing documentation

Accessing Documentation

  • Apropos partition

  • Will display related commands

Using the man pages

Using the Man pages

  • Man rm

  • Will display manual pages for the rm command

Tutorial on linux introduction installation initial setups


  • Grep alateef /etc/passwd

  • This will search for alateef in /etc/passwd

  • Whereis fdisk

Using environment variables

Using Environment Variables

  • PWD – current directory

  • USER – declare user name

  • LANG – To set language defaults

  • SHELL – TO declare the name and location of the current shell

  • PATH – set default location of executable files

  • LD_LIBRARY_PATH – location of important software libraries

  • TERM – set the type of terminal in use

  • MACHINE – declare system type, architecture & so on

  • $env

  • /etc/profile

Navigating searching with shell

Navigating & searching with shell

  • Cd /home/…..

  • Cd ..

  • Whereis

  • Locate

  • Apropos

  • Cat <filename>– contents of file

  • Less <filename> - allows scrolling while reading contents of file name

  • Mv <file1> <file2>

  • Mv <file> <dir>

  • Cp <src> <dst>

  • Rm <file>

  • Rmdir <dir>

  • Grep <string> <file>

Compressing decompressing files

Compressing & Decompressing Files

  • Bunzip2 - expands a compressed file

  • Bzip2 – compresses or expands files & directories

  • Gunzip

  • Gzip

  • Shar

  • Tar

  • unshar

Using text editors

Using Text Editors

  • Ed

  • Emacs

  • Jed

  • Joe

  • Mcedit

  • Pico

  • Sed

  • Vim

  • Vi

  • Gedit

  • Kate

  • Kedit

  • Nedit

  • kwrite

Working with vi

Working with vi

  • H,j,k,l – cursor movement

  • Delete character – x

  • Delete line – dd

  • Mode toggle – ESC, Insert (or i)

  • Quit - :q

  • Quit without saving - :q!

  • Save file - :w

  • Text search - /

  • Run a shell command - :sh (use exit to return)

Mounting a drive

Mounting a Drive

Compiling a simple c program

Compiling a simple C Program

Internet configuration

Internet Configuration

Ethernet configuration

Ethernet Configuration

  • Things you should know

    • IP address

      • If you're configuring loopback mode, it is

    • Subnet mask

      • It is always for loopback address

    • Broadcast address

      • It is equal to your subnet address with 255 replaced as the host address

    • IP address of Gateway

    • IP address of Name server

Configuration using system scripts

Configuration using system scripts

  • Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0








  • Edit the file /etc/sysconfig/network




Configuration of static ip via command line

Configuration of Static IP via command line

  • The shell provides two programs for NIC configuration, ifconfig & route

    • ifconfig

      • For configuring the network device interface with certain parameters, such as the IP address, subnetwork mask etc.

      • Remember to bring the interface down & up when modifying

      • Set IP Address

        ifconfig lo

        ifconfig eth0 netmask

      • Verify Settings

        ifconfig eth0

    • route

      • To show and manipulate the IP routing table

      • Add default gateway

        route add default gw

        route add –net netmask dev eth0

Important configuration files

Important Configuration files

  • /etc/hosts

    • Contains a list of IP addresses and the hostnames they correspond to ENT localhost.localdomain localhost

  • /etc/networks

    • lists the names and addresses of your own and other networks

    • Used by the route command and allows you to specify a network by name instead of by address

      default # default route - mandatory

      loopnet # loopback network - mandatory

      niit-net # Modify for your own network address

Important configuration files1

Important Configuration files

  • /etc/host.conf

    • Specifies how your system resolves hostnames

      order hosts,bind

  • /etc/resolv.conf

    • Configures the name resolver

      • specifies the address of your nameserver (if any)

      • domains that you want to search by default if a specified hostname is not a fully specified hostname

        domain niit.edu.pk


Network configuration for dhcp

Network Configuration for DHCP

  • Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0








  • Edit the file /etc/sysconfig/network




Basic ppp configuration for modems

Basic PPP Configuration for Modems

  • In Windows, modems and other serial devices are named COM1, COM2 etc.

  • In Linux, these are referred as /dev/ttyS0, /dev/ttyS1

    • At installation time a symbolic link called /dev/modem will be created for the modem

  • KDE graphical tool called “kppp” configures a dialup connection easily

  • Located in /usr/bin/kppp

  • Red Hat requires the root password to be entered each time kppp is executed for security reasons

  • Some distributions allow any user to execute this program such as SuSE

Configuring kppp

Configuring kppp

  • Start kppp

  • Click the Setup button and then click the Device Tab

Tutorial on linux introduction installation initial setups

  • In the Model tab, click Query Modem, it should come up with some results

Tutorial on linux introduction installation initial setups

  • Setting up your ISP Info

    • Accounts button

Tutorial on linux introduction installation initial setups

  • You might need to add the line route add default ppp0 to the field Execute program upon connect: to ensure the default gateway is set to the default gateway from your ISP.

Tutorial on linux introduction installation initial setups

  • Enter your username and password for your ISP and Connect

Users groups permissions

Users Groups & Permissions

User accounts

User Accounts

  • Personal Accounts

    • AAA (Authentication, Authorization, Accounting)

  • Administrative Accounts

    • root

    • Accessed using the su command

  • Daemon accounts

    • e.g., news daemon

The passwd file

The passwd File

  • Every account on the system has an entry in the file /etc/passwd


  • Username

    • A unique character string, identifying the account

  • Password

    • An encrypted representation of the user's password

  • UID

    • unique integer the system uses to identify the account

  • GID

    • an integer referring to the user's default group, found in the file /etc/group

  • gecos

    • Misc. information like user's real name, office address or phone no. etc.

The passwd file1

The passwd File

  • homedir

    • user's home directory

  • shell

    • name of the program to run when the user logs in e.g., /bin/bash or /bin/tcsh

      root:ZxPsI9ZjiVd9Y:0:0:The root of all evil:/root:/bin/bash

Shadow passwords

Shadow Passwords

  • Encrypted passwords in /etc/passwd are potential security risk

  • Instead /etc/shadow is used

    • Contains the real encrypted passwords

    • Readable only by root

    • Contain similar fields but empty or bogus values

  • passwd command

    • -n : sets the minimum number of days between changes

    • -x : the maximum number of days between changes

    • -w : the number of days a warning is issued before a password expires

    • -i the number of days of inactivity between the expiry of a password and the time the account is locked

The group file

The Group File

  • To logically organize sets of user accounts

  • To allow users to share files within their group or groups

  • Every user is assigned to at least one group

  • The file /etc/group contains a one-line entry for each group on the system


  • password is an optional encrypted password associated with the group, which allows users not in this group to access the group with the newgrp command

  • members is a comma-separated list of usernames identifying those users who are members of this group but who have a different gid in /etc/passwd






Creating accounts

Creating Accounts

  • Adding an entry to /etc/passwd

  • Creating the user's home directory

  • Setting up the user's default configuration files

  • adduser or useradd

Deleting and disabling accounts

Deleting and Disabling Accounts

  • To delete an account

    • remove the user's entry in /etc/passwd

    • remove any references to the user in /etc/group

    • delete the user's home directory

    • any additional files created or owned by the user

      userdel -r lateef

  • Disabling a user account

    • add an asterisk to the first character of the password field of the /etc/passwd entry

      kashif:*BjDf5hBysDsii:104:50:lateef Rao:/home/aclark:/bin/bash

Modifying user accounts

Modifying User Accounts

  • Simply edit /etc/passwd and /etc/group

  • To change a user's password, use the passwd command

  • Use chown command to change ownership of files

    chown -R alateef /home/alateef

File ownership and permissions

File Ownership and Permissions

  • Permissions refer to the ways in which someone can use a file or directory

    • For files

      • Read permission means you can look at the file's contents

      • Write permission means you can change or delete the file

      • Execute permission means you can run the file as a program

Tutorial on linux introduction installation initial setups

File Ownership and Permissions

  • For directories

    • Read permission means you can list the contents of that directory

    • Write permission means you can add or remove files in that directory

    • Execute permission means you can list information about the files in that directory

  • Who gets these permissions?

    • Linux has three levels of permissions

      • Owner

      • Group

      • Other

  • Owners and groups

    Owners and Groups

    • Each file has an owner and a group

    Changing the owner group

    Changing the Owner, Group

    • Common mistake when creating a directory under /home for a new user as root

    • chowncommand changes the owner of a file

      • only root can use chown for changing ownership of a file

    • chgrpcommand changes the group

      • any user can change the group to another group to which he belongs

        # chown root /home/lateef/apache.conf

        # chgrp bin /home/lateef/apache.conf

        # chown root.bin /home/lateef/apache.conf

    Changing the permissions

    Changing the Permissions

    • The permissions are also called the file's "mode"

    • The command that changes permissions is chmod

    • Symbolic Mode

      $ chmod +x header.c

      $ chmod u-x header.c

      $ chmod ug+rwx header.c

    • User permission is u, group permission is g, and other is o

    Changing the permissions1

    Changing the Permissions

    • Absolute Mode

      • in terms of bits and octal notation

        $ chmod 400 header.c

        $ chmod 555 header.c

    • To set the default mode that is assigned to each file you create

      • umask command

        $ umask 027

    Shutting down the machine

    Shutting down the machine

    • Shutdown –h now

    • Or shutdown –h 0

    • Shutdown –h 18:30 “system is going down for maintenance”

    • Shutdown –r now

    • shutdown –r 0



    • http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/install-guide/

    • Red Hat Linux 9 Unleashed – Bill Ball & Hoyt Duff

  • Login