linux basics | core linux | ppts | introduction | demo | course free

21
Basics

Upload: kernel-training

Post on 19-Feb-2017

523 views

Category:

Education


2 download

TRANSCRIPT

Basics

www.kerneltraining.com/linux-admin-training

Outline What is an Operating Systems History of UNIX Unix Principles ARCHITECTURE OF UNIX FILE SYSTEM HIERARCHY BASIC COMMANDS IN UNIX

www.kerneltraining.com/linux-admin-training

WHAT IS OPERATING SYSTEM? Operating system is an interface between user and the

computer hardware. The hardware of the computer cannot understand the human readable language as it works on binaries i.e. 0’sand 1’s. In such case we need an interface which can translate human language to hardware and vice-versa for effective communication

Requirement to create an operating system

source code +applications=kernel

kernel+ software=os

www.kerneltraining.com/linux-admin-training

HISTORY OF UNIX In 1960 1st operating system is MULTICS (multiplexed information computer

service)at AT & T bell lab

Ken Thompson developed UNIX in 1969 so he could play games on a scavenged DEC PDP-7. With the help of Dennis Ritchie, the inventor of the “C” programing language, Ken rewrote UNIX entirely in “C”

In 1974, the OS was licensed to universities for educational purposes.

Over the years, hundreds of people added and improved upon the system, and it spread into the commercial world.

GNU project started in 1984 by Richard Stallman.

www.kerneltraining.com/linux-admin-training

During the late 1980’s there were several of commercial implementations of UNIX: Apple Computer’s A/UX AT&T’s System V Release 3 Digital Equipment Corporation’s Ultrix and OSF/1 (renamed to DEC UNIX) Hewlett Packard’s HP-UX IBM’s AIX Lynx’s Real-Time UNIX NeXT’s NeXTStep Santa Cruz Operation’s SCO UNIX Silicon Graphics’ IRIX SUN Microsystems’ SUN OS and Solaris and dozens more.

www.kerneltraining.com/linux-admin-training

UNIX PRINCIPLESEverything is a file:- UNIX system have many powerful utilities designed to create and manipulate files. The UNIX security model is based around the security of files. By treating everything as a file, you can secure access to hardware in the same way as you secure access to a document.

Configuration data stored in text: - Storing configuration in text allows an administrator to move a configuration from one machine to another easily, provide the ability to roll back a system configuration to a particular date and time.

www.kerneltraining.com/linux-admin-training

Linux orgins Linux was developed in 1991 by Linus Torvalds and a band

of programmers who voluntarily developed the core program of the system, the kernel. That program was originally compatible for another operating system called Minix .

When Linux Kernel combined with GNU applications, complete free UNIX like OS was

developed.

Eg: Redhat, CentOS, SuSe, Fedora, Ubuntu, Gentoo

www.kerneltraining.com/linux-admin-training

ARCHITECTURE OF UNIX

www.kerneltraining.com/linux-admin-training

FILESYSTEM HIERARCHY

www.kerneltraining.com/linux-admin-training

Basic commands

Cat find command Vim soft&hard link Mkdir Cp,mv,rm,rmdir Grep Filter commands i/o redirection File permission

www.kerneltraining.com/linux-admin-training

Command to create files: 1.cat > file1 to create a file and data to file

2.cat file1 to see file information

3.cat >> file1 to add data to already the extisting file

Touch command: 1.touch file{1..100} to create multipul files

but empty files

Create directory: mkdir ktdir to create a directory

www.kerneltraining.com/linux-admin-training

1. cp file ktdir2. cp –rfvp ktdir ktdir23. mv file ktdir4. mv ktdir ktdir2 5. mv oldfilename newfilename6. mv olddirectory newdirectory7. rm –f filename8. rmdir dirname9. rm –rf dirname

www.kerneltraining.com/linux-admin-training

Vim editor: 1.Command mode(edit)

2.Inset mode(inter data) 3.Extend command mode(save the file) Command mode keys: gg, G, dd, 5dd, u, yy, 4yy, p, P, x, U

Insert mode: i, o, a ,A

Extend command mode: Esc+shift+:+wq Esc+shift+:+X Esc+shift+:+se nu Esc+shift+:+se nonu

www.kerneltraining.com/linux-admin-training

soft link Hard link

SHORTCUT FILE BACKUP FILE

if original file is deleted, link is broken and data is lost

If original file is deleted then also link will contain data

Files,directorys files

Inode no. of source and link file isdifferent

Inode no. of both file is same

www.kerneltraining.com/linux-admin-training

Filter commands:

1. less

2. more

3. head

4. tail

5. sort

6. cut

7. sed

www.kerneltraining.com/linux-admin-training

Find command: find / -name file1

find / -inum file1

find / -group file1

find / -user file1

I/O REDIRECTION: Redirection is a process where we can copy the output of any command(s), file(s) into a new file. There are two ways of redirecting the output into a file.

cat file1 >> file2 cat file1 > file2

www.kerneltraining.com/linux-admin-training

FILE PERMISSIONS: 1. Symbolic method

2. Absolute methods

Absolute methodsPermissions are applied on three levels:- Owner or User level(u) Group level(g) Others level(o)

Syntax:Chmod u+rw,g+wrx,o+wx file/dir + adding, -substract, = overwritting

www.kerneltraining.com/linux-admin-training

Symbolic method:Read = 4

Write = 2

Execute = 1

User,group,others

Syntax: 1. Chmod 675 file/dir

www.kerneltraining.com/linux-admin-training

Umask

022

Directory: 777-022 = 755

Files: 666-022 = 644

Umask 002

Directory: 777-002 = 775

Files: 666-002 = 664

Questions?

www.kerneltraining.com/linux-admin-training

THANK YOUfor attending introduction to

www.kerneltraining.com/linux-admin-training