linux basic knowledge.doc

27
Page | 1 BK IT-INFORMATICS ---------------------------------------------------------------------------- -------------------------------------------------------------------------- Linux Basic Knowledge 1. History of Unix Linux is a sterling pedigree as a child of UNIX. In the 1960, AT&T, Bell labs partnered with the MIT (Massachusetts institute of Technology) and general electronic in developing a multi user operating system known as MULTICS. Two Bell labs researcher Dennis Ritchie and Ken Thompson worked on this project until Bell labs withdrew from this project. Bell labs withdrew from the project they determine to resolve this by re-hosting space travel to run a little used PDP-7 computer. This new project requires them to implement a new operating system for the PDP- 7 which they called UNICS. They somehow eventually changed the name of the operating system to UNIX. One of the unique features of UNIX was that Ritchie and Thompson had implemented its using new programming language "C". Implementing UNIX in C made it possible to port UNIX to other computer more easily than previous operating system. Which were usually written ____________________________________________________________________________ ________________ Mob.No.9975142191 Email:- [email protected]

Upload: harshal-tapadiya

Post on 12-Dec-2015

249 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linux Basic Knowledge.doc

Page | 1 BK IT-INFORMATICS

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

Linux Basic Knowledge

1. History of Unix

Linux is a sterling pedigree as a child of UNIX. In the 1960, AT&T, Bell labs partnered with the MIT (Massachusetts institute of Technology) and general electronic in developing a multi user operating system known as MULTICS. Two Bell labs researcher Dennis Ritchie and Ken Thompson worked on this project until Bell labs withdrew from this project. Bell labs withdrew from the project they determine to resolve this by re-hosting space travel to run a little used PDP-7 computer. This new project requires them to implement a new operating system for the PDP-7 which they called UNICS. They somehow eventually changed the name of the operating system to UNIX. One of the unique features of UNIX was that Ritchie and Thompson had implemented its using new programming language "C". Implementing UNIX in C made it possible to port UNIX to other computer more easily than previous operating system. Which were usually written in assembly language. UNIX was widely distributed especially to universities, computer scientists and student the world even studied UNIX, found ways to improve it and sent their code back to Ritchie and Thompson. UNIX rapidly grew and improved.

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 2: Linux Basic Knowledge.doc

Page | 2 BK IT-INFORMATICS

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

2.History of Linux

 Universities used UNIX for teaching computer science student about the operating system. When AT&T asserted its proprietary claim to UNIX. University need to replacement. Andrew Tannenbaum (Computer scientist, Professor Andy Tanenbaum of Vrije Universities, Amsterdam) created a UNIX-like operating system called MINIX.

In the 1990 finishing computer science student Linus Torvalds began work on a memory manager for Intel Architecture PC. At some point he realized that his work could be extended to operate as a UNIX kernel. In August 1991 he posted his work-in progress to the internet newsgroup Comp.os.minix. Torvalds called his operating system kernel Linux, for Linus's MINIX. UNIX programmer offered help in developing Linux. Because Stallman's GNU project had completed almost all of the component need for its UNIX like operating system. In 1994 about three years after Torvalds posting 1.0 was released under the term of GPL.

3. Difference Between Linux and Unix

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 3: Linux Basic Knowledge.doc

Page | 3 BK IT-INFORMATICS

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

Attributes Linux Unix

What is it? Linux is an example of Open Source software development and Free Operating System (OS).

Unix is an operating system that is very popular in universities, companies, big enterprises etc.

Manufacturer Linux kernel is developed by the community. Linus Torvalds oversees things.

Three bigest distributions are Solaris (Oracle), AIX (IBM) & HP-UX Hewlett Packard. And Apple Makes OSX, an Unix based OS..

Price Free but support is available for a price.

Three bigest distributions are Solaris (Oracle), AIX (IBM) & HP-UX Hewlett Packard. And Apple Makes OSX, an Unix based OS..

Processors Dozens of different kinds.

x86/x64, Sparc, Power, Itanium, PA-RISC, PowerPC and many others.

GUI Linux typically provides two GUIs, KDE and Gnome. But Linux GUI is optional.

Initially Unix was a command based OS, but later a GUI was created called Common Desktop Environment. Most distributions now ship with Gnome

File system support Ext2, Ext3, Ext4, Jfs, ReiserFS, Xfs, Btrfs, FAT, FAT32, NTFS

jfs, gpfs, hfs, hfs+, ufs, xfs, zfs format

Text mode interface BASH (Bourne Again SHell) is the Linux default shell. It can support multiple command interpreters.

Originally the Bourne Shell. Now it's compatible with many others including BASH, Korn

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 4: Linux Basic Knowledge.doc

Page | 4 BK IT-INFORMATICS

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

& C.

Security Linux has had about 60-100 viruses listed till date. None of them actively spreading nowadays.

A rough estimate of UNIX viruses is between 85 -120 viruses reported till date.

Examples Ubuntu,,Red Hat,etc. OS X, Solaris, All Linux

4.Difference Between Linux and Windows

Attributes Linux Windows

What is it? Linux is an example of Open Source software development and Free Operating System (OS).

Windows is the family of operating system (OS) from Microsoft, which is the most famous OS in the world.

Cost Linux can be freely distributed.

For desktop or home use, Windows can be expensive.

Price

Processors Dozens of different kinds.

Intel and AMD, but WinCE runs on some additional processors. (see: WinCE)

GUI Linux typically provides two GUIs, KDE and Gnome. But Linux GUI is optional.

The Windows GUI is an integral component of the OS and it is mainly influenced by Apple Macintosh OS and Xerox.

File system support Ext2, Ext3, Ext4, Jfs, ReiserFS, Xfs, Btrfs, FAT, FAT32, NTFS

FAT, FAT32, NTFS,

Text mode interface BASH (Bourne Again SHell) is the Linux default shell. It can

Windows uses a command shell and each version of

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 5: Linux Basic Knowledge.doc

Page | 5 BK IT-INFORMATICS

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

support multiple command interpreters.

Windows has a single command interpreter with dos-like commands, recently there is the addition of the optional PowerShell that uses more Unix-like commands.

Security Linux has had about 60-100 viruses listed till date. None of them actively spreading nowadays.

According to Dr. Nic Peeling and Dr Julian Satchell's “Analysis of the Impact of Open Source Software” there have been more than 60,000 viruses in Windows

Examples Ubuntu, Fedora, Red Hat, Debian, Archlinux, Android etc.

Win-98,Win-2000,Win-2007,Win-8,etc.

5.GNU ProjectIn the 1980 AT&T began to recognize the commercial value of UNIX. They asserted proprietary rights to it and began charging a substantial license free. The MIT researcher Richard Stallman launched the GNU project which focused on creating a UNIX-like operating system that could be freely distributed in supports of GNU Stallman and other created the Free Software Foundation in 1984. The FSF promotes free software but free software is not necessarily cost free software the FSF intends the word free in the séance of Freedom. Free software is the software with which you can do the following:

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 6: Linux Basic Knowledge.doc

Page | 6 BK IT-INFORMATICS

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

1. Use of any purpose 2. Study to learn how to works and adapts to meet your need. 3. Copy and redistribute. 4. Distribute as part of an improved software system. GNU GPL (General Public License) The GPL is a form of copyright known as copy left. Design to protect not preclude-right to use, study, and copy and redistribute software. The GPL provides that a user has the right to use a software program as long as the user does not attempt to impair other rights to use it.

6. What is User, Shell, Kernel, Hardware.User- The means by which the user and a computer system interact, in particular the use of input devices and software.Shell-Shell is an interface between user and kernel. Shell interprets your input as commands and pass them and pass

them to kernel ( C Shell, Sh, K Shell, Bash). Kernel-Kernel is a main program of Linux system .It controls hard wares, CPU,memory, hard disk, network card etc. The kernel is the heart of the Linux operating system. It manages the resources of Linux such as:

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 7: Linux Basic Knowledge.doc

Page | 7 BK IT-INFORMATICS

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

File management Multitasking Memory management I/O management Process management Device management Networking support including IPv4 and IPv6 The kernel decides who will use these resources and for how long and when. It runs your programs or sets up to execute binary files. The kernel acts as an intermediary between the computer hardware and various applications.Hardware- Computer hardware is the collection of physical elements that constitute a computer system. Computer hardware refers to the physical parts or components of a computer such as monitor, keyboard, Computer data storage, hard drive disk, mouse, CPU (graphic cards, sound cards, memory, motherboard and chips), etc.

7. Features and Principal of Linux OSFeature-:1- virus free2- more stable, no "blue screen of death"3- not an extreme memory hog4- can run on a very simple system5- 99.99999% of the software for linux is free and open source, including the OS.6- more secure7- very easy to tweak8- everything you can do on windows, i can do on linux, faster, better, and... FREE9- Unix is something developed in 1969 for multi processor systems (more than one user using the same computer).10- Unix can't operate on a x86 based computer. Linux will work on x86, AND supercomputers.

Principle-:1- Everything is a file (Including hardware) You can secure access to hardware in the same way as you secure access to a document. 2- Small-single-purpose program Linux provides many small utilities that perform one task very well. When new functionality is required the general philosophy is to create a separate program.

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 8: Linux Basic Knowledge.doc

Page | 8 BK IT-INFORMATICS

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

 3- Ability to chain program together to perform complex task The core design to UNIX is that the output of one program can be input for another program. 4- Avoid captive user interface Most-command expects their option and argument to be type on the command line when the command is lunched. 5- Configuration data store in text Text is a universal interface. UNIX utilities exist to manipulate text; storing configuration in text allows a configuration from one system to another system. 

*******************************************************

REDHAT HISTORY

A Brief History of Red Hat LinuxRed Hat Enterprise Linux is the product of a U.S. company called Red Hat, Inc., based in Raleigh, North Carolina near the campus of NC State University. The company was founded in the mid 1990s when Marc Ewing and Bob Young merged two companies. In 1993 Bob Young created a company called ACC Corporation that he says he ran from his wife’s “sewing closet”. The name ACC was intended to represent a catalog business but was also an abbreviation of a small business his wife ran called Antiques and Collectables of Connecticut. Amongst the items sold through the ACC catalog business were Linux CDs and related open source software. Around the same time Marc Ewing had created his own Linux distribution which he named Red Hat Linux (after his

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 9: Linux Basic Knowledge.doc

Page | 9 BK IT-INFORMATICS

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

propensity to wear a red hat). In 1995, ACC acquired Red Hat and adopted the name Red Hat, Inc. Red Hat went public in 1999 making both owners fabulously wealthy. Early releases of Red Hat Linux were shipped to customers on floppy disks and CDs. In later years Red Hat provided better levels of support tied to paid subscriptions (and you can now get phone support 24 hours a day). Red Hat Enterprise Linux 6 is the latest commercial offering from Red Hat and is targeted at corporate, mission critical installations. It is an open source product in that you can download. Red Hat also sponsors the Fedora Project. The goal of this project is to provide access to a free Linux operating system in the form of Fedora Linux. Fedora also acts as a proving ground for new features that eventually are adopted into the Red Hat Enterprise Linux operating system family. For users that cannot afford a Red Hat Enterprise Linux subscription, another option is provided in the form of the CentOS operating system. CentOS is a community driven project that takes the source code to Red Hat Enterprise Linux, removes the Red Hat branding and subscription requirements, compiles it and provides the distribution for download. Bob Young left the company in 1999 and has since gone on to start Lulu, a company that provides self-publishing services to book authors.

DIFFERENCE BETWEEN RHEL-4,5 AND RHEL-6

RHEL-4 RHEL-5 RHEL-6

RHEL 4 SELinux Block only 13 services

RHEL 5SElinux Block 80 services

RHEL6 has advanced level of security. SELinux (Security Enhanced Linux)features are improved and a new set of SELinux rules has been added to provide security to virtual machines from hackers and

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 10: Linux Basic Knowledge.doc

Page | 10 BK IT-INFORMATICS

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

attackers. This new feature is called SVirt.

Ext2 is made the default filesystem

Ext3 is made the default filesystem

Ext4 is made the default filesystem

no virtualization Feature

virtualization with Hypervisor-V

RHEL6 introduces the use of KVM (Kernel-based Virtual Machine)   as its hypervisor. In the earlier releases kenhypervisor was used.

In RHEL 4 we have no Yum

RHEL 5 we have Yum available

RHEL 6 we have Yum available

Date of Release-2005-02-14

Date of Release-2007-03-15

Date of Release-2010-11-10

Redhat Life-cycle dates

Version Date Of Release End of support dates

Red Hat Enterprise Linux 4

(Prior version outside of Regular Life Cycle)

2005-02-14 2009-03-31 (End of Production 1)2011-03-31 (End of Production 2)2012-02-29 (End of Production 3 / End of Regular Life Cycle)2015-02-28 (End of Extended Life Cycle)

Red Hat Enterprise Linux 5

(Prior version with varying degrees of support)

2007-03-15 2013-01-08 (End of Production 1)Q1 2014 (End of Production 2)2017-03-31 (End of Production 3 / End of Regular Life Cycle)

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 11: Linux Basic Knowledge.doc

Page | 11 BK IT-INFORMATICS

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

Q1 2020 (End of Extended Life Cycle)

Red Hat Enterprise Linux 6

( Current version )

2010-11-10 Q2 2016 (End of Production 1)Q2 2017 (End of Production 2)2020-11-30 (End of Production 3 / End of Regular Life Cycle)Q4 2023 (End of Extended Life Cycle)

Red Hat Enterprise Linux 7

( Future version)

Scheduled for the second half of 2013

Undisclosed

*******************************************************

INSTALLATION OF THE REDHAT

1. Minimum Requirements of RED HAT RHEL6? Architecture- These instructions are for installing Red Hat Enterprise Linux 6 (RHEL6) on an IA-32 system (i.e., a 32-bit Intel- or AMD-based system) and Opteron 64-bit systems (x86_64).

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 12: Linux Basic Knowledge.doc

Page | 12 BK IT-INFORMATICS

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

Processor- Pentium IV processor, 2.4 Ghz Minimum Memory- Red Hat recommends for 32 bit a minimum of 1GB memory/logical CPU, and for 64 bit a minimum of 1GB of memory, 1GB/logical CPU. Minimum Disk Space- disk size of above 12 GB, and a minimum root partition ("/") size of about 9 GB. CD-ROM Drive- Red Hat does not include a floppy version of the boot images for RHEL6. Your system will need a boot-capable CD-ROM drive, or a BIOS which knows how to PXE boot

2.Boot the system to install Red Hat Enterprise Linux From a CD-DVD

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 13: Linux Basic Knowledge.doc

Page | 13 BK IT-INFORMATICS

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

1.        

 Select Install or upgrade an existing system option on Grub Menu

2. Choose a language

3. Choose a keyboard type 4. Choose a installation media

5. Skip DVD media test (or select media test, if you want to test installation media

6. Red Hat 6 graphical installer starts, select next

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 14: Linux Basic Knowledge.doc

Page | 14 BK IT-INFORMATICS

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

before installation)

7. Accept Pre-Release Installation

8. Select storage devices

9. Insert computer name 10. Select time zone

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 15: Linux Basic Knowledge.doc

Page | 15 BK IT-INFORMATICS

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

11. Enter a password for root user

12. Select type of installation

Use All Space - The entire disk drive will be assigned to the RHEL 6 operating system installation. Any pre-existing partitions, together with any existing operating systems and associated data files contained therein will be deleted to make room for RHEL. This option should only be used if you are absolutely sure you no longer need anything that is currently stored on that disk, or have already backed up all user files. Replace existing Linux System(s) - If the drive was previously configured to support a Windows/Linux dual boot environment or was devoted entirely to another Linux installation, this option may be selected to instruct the installer to delete the pre-existing Linux partition and replace it with RHEL 6. Once again, it is important to backup any user data that may still be needed. Shrink Current system - Allows an existing partition to be reduced in size to make room on the drive for the RHEL 6 installation. More details on this option are provided in a later chapter entitled Installing RHEL 6 with Windows in Dual Boot Environment. Use Free Space - If the current partitions on the drive do not take up the entire disk space

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 16: Linux Basic Knowledge.doc

Page | 16 BK IT-INFORMATICS

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

available, any unallocated space may be assigned to the RHEL installation using this option. Create Custom Layout - When selected, this option displays the disk partitioning tool allowing each partition on the disk to be manually configured. Unless you have experience with low level disk partitioning this option is not recommended. On this screen, make a selection based on your requirements. If, for example, the entire disk is to be used for RHEL 6, select the Use All Space option. In order to implement a dual boot configuration, refer to I nstalling RHEL 6 with Windows in Dual Boot Environment .

13. Review partition layout

Modify if needed. Default setup with ext4 and LVM looks good for desktop machine.

14. Accept write changes to disc

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 17: Linux Basic Knowledge.doc

Page | 17 BK IT-INFORMATICS

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

15. Writing changes (creating partitions) to disc

16. Configure boot loader options

17. Select softwares to install and enable repositories

18. Customize package selection

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 18: Linux Basic Knowledge.doc

Page | 18 BK IT-INFORMATICS

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

19. Checking dependencies for installation

21. Installation is complete

Click reboot computer and remove installation media.

20. Starting installation process

22. Booting Red Hat 6

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 19: Linux Basic Knowledge.doc

Page | 19 BK IT-INFORMATICS

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

23. Red Hat 6 Welcome screen 24. Create normal user

25. Setup date and time and keep up-to-date with NTP

26. Login Red Hat 6 Gnome Desktop

27. Red Hat (RHEL) 6 Gnome Desktop, empty and default look

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 20: Linux Basic Knowledge.doc

Page | 20 BK IT-INFORMATICS

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

REDHAT BASIC

1. Linux BasicLogin Screen-1. two types of login screens:

virtual consolegraphical login (called display manager)

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 21: Linux Basic Knowledge.doc

Page | 21 BK IT-INFORMATICS

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

2. login using login name and password3. each user has a home directory for personal file storage.Switching between virtual console and graphical environment-1. A linux system will run six virtual consoles and one graphical console.2. server system often have only virtual consoles 3. desktop system and workstation typically have both.4. switch among virtual consoles by pressing:Ctrl+Alt+F[1-6]5. access the graphical console by pressing Ctrl+Alt+F7Elements of the X Window System- 1. the X Window System is Linux graphical subsystem2. Xorg is the particular version of the X Window System used by Red Hat.3. look and behavior largely controlled by the desktop environment4. two desktop environment provided by Red Hat:- GNOME (GNU Network Object Model Environment )

KDE (K desktop Environment)

Difference Between Gnome and KDE Desktop-

Gnome KDE

Gnome IMO is better looking. All it is is just a different desk top environment.

KDE is lighter on resources but looks a bit more like that "Other" operating system.

Note- Basically Linux Server Uses Virtual Console.

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 22: Linux Basic Knowledge.doc

Page | 22 BK IT-INFORMATICS

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

2. Virtual ConsoleA virtual console (VC) – also known as a virtual terminal (VT) – is a conceptual combination of the keyboard and display for a computer user interface. It is a feature of some operating systems such as BSD, Linux, and UnixWare in which the system console of the computer can be used to switch between multiple virtual consoles to access unrelated user interfaces. Virtual consoles date back at least to Xenix in the 1980s.

The root user

1. the root user a special administrative account

2. also called superuser

3. root has near complete control over the system

4. and a nearly unlimited capacity to damage it.

5. do not login as root unless necessary

6. normal users potential to do damage is more limited.

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]

Page 23: Linux Basic Knowledge.doc

Page | 23 BK IT-INFORMATICS

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

[root@localhost ~]#

Difference between a normal user and a root user in Linux?

Root User Normal User

A "root" user has the power to do anything on a Linux system.

A normal user can only gain root access with sudo if they are in the sudoers file

Control all over system N

[root@localhost ~]# [uesr@localhost ~]$

For Example- Admin control all users.

____________________________________________________________________________________________

Mob.No.9975142191 Email:[email protected]