SlideShare a Scribd company logo
Linux Commands Summary
Course Objective
 To introduce the Unix Operating System Concept.
 To introduce standard Unix commands.
 To introduce VI editor.
References
 Text Book Reference
 Brain W. Kernighan and Rob Pike, The UNIX Programming
Environment.
 A Practical Guide to Linux® Commands, Editors, and Shell
Programming - Mark Sobell's
 Web Reference
 Unix Tutorial For Beginners
 Introduction to Unix
 http://www.cis.uab.edu/cs344/spring2005/
What is Unix Operating System
 Unix OS is a Program
 Unix OS provides interface
between users and bare
hardware
 Unix OS manages
resources: CPU(s),
memory, disks, other I/O
devices.
Operating System
users
Why do we need Operating System ?
To Interact with Computer Hardware
End User
Computer Hardware
Operating-System
Utilities
Application
Programs
OS Designer
System Programmer
Application Programmer
E.g.
compiler, librari
es, shell
E.g.
database, web
servers
Evolution of Unix OS
Flavors of Unix
 AIX (Advanced IBM Unix)
 HP-UX ( Hewlett Packard Unix)
 BSD ( Berkeley Software Distribution. )
 SCO UNIX
 SOLARIS
 LINUX, etc
System Architecture
HARDWARE
KERNELDATABASE
UNIX
COMMANDS
COMPILERS
OTHER
APPLICATIONS
PACKAGES
SHELL
SHELL
SHELL
SHELL
User
UserUser
User
System Architecture
 Major components of Unix are :
 Kernel
 Monitors and controls hardware resources
 Allocates them among its users in an optimal manner
 Utilities
 Programming tools that do standard tasks extremely well.
 EX: cp, grep, awk, sed, bc, wc, more
 Shell
 Command Line Interpreter.
 Provides a processing environment for the user programs.
 User Applications
 Programs written by the user
Processing Environment
• User Program
– Set of instructions written by the user
• Process
– Instance of a program under execution
• Shell
– Provides a processing environment for the user programs
Structure of Unix File System
Absolute Path and Relative Path
 The Absolute Path
 The entire pathname starting from root(/)
 Example
 /home/oresoft/.
 The Relative Path
 The path relative to your present working directory
 Example
 cd ..
How Unix Session Works.
USER TYPES COMMAND
SHELL EXECUTES
UTILITY TO CARRY
OUT COMMAND
SHELLASKS FOR A COMMAND
USER INTERACTS WITH
UTILITY
SHELL PROMPTS FOR
NEXT COMMAND
USER TYPES CONTROL-D
LOGOUT
LOGIN
Login Sequence.
 /etc/passwd 1
 /etc/shadow 2
 /etc/group 3
 /etc/profile 4
 /etc/profile.d/*.sh 5
 ~/.bash_profile 6
 ~/.bashrc 7
 /etc/bashrc 8
Unix Command Structure
 Unix Command line structure
 command [options] [arguments]
Refer the following word Doc for Detail Command
Concept of stdin, stdout and stderr
Operating System
Another
Computer
program running
stdout
stderr
stdin
Keyboard
A Computer
program running
stdout
stderr
stdin
Monitor
Standard Files
 Standard Input (0)
 This file is opened by shell to accept information.
 Standard Output (1)
 This file is opened by shell to direct output
 Standard Error (2)
 This file is opened by shell for writing error messages
Regular Expressions
What is it?
 String of ordinary and metacharacter which can be used to
match more than one type of pattern.
 Uses character set
 * , [], ^, $, {}, etc.
The Shell Metacharacters.
 See Demo at
/home/oresoft/Training/Linux/commands/shellChar
 * - Matches all filenames in current directory.
 ? - Matches a single character.
 [abc] - Matches a single character – either a, b or c.
 [!abc] - Matches a single character – which is not a, b or c.
 [a-c] – Matches a single character which is within the range of a and c.
 ^abc – Matches the pattern abc at the beginning of the line.
 abc$ - Matches the pattern abc at the end of the line.
Editor in Unix
 Need for editor in Unix
 Types of editor
 Line Editor
 ed : UC Berkeley
 ex : Powerful than ed, Bell Systems
 Full Screen Editor
 vi (stands for visual)
 vim – vi improved
 emacs (GNU)
The vi Editor.
 The important characteristic features are:
 Omnipresent
 Works on different Unix flavors
 Fast
 Various operations are very fast
 Powerful UNDO features
 Text in lines could be undone with very less effort
The vi Editor.
 The limitations are:
 Less user-friendly
 No graphical user interface
 Highly Case-sensitive
 Letter in small case has a different implementation in comparison
with the same letter in upper case
 Keystrokes could have more than one meaning
 A letter (of the same case) has different implementation across
different modes.
The vi Editor.
 Modes of working:
 Command Mode
 Keys are interpreted as commands
 Insert Mode
 Keys are interpreted as data
 Escape Mode
 Keys are interpreted for saving/exiting purposes
vi Operating modes.
Command mode
Insert mode
i, I , o, O, a, A ..
esc
Last line mode
Enter:
:q
Vi editor commands
 To move around
 h, j, k, l, ^D, ^U, G, 0, ^, $, w, b
 Inserting/Deleting text
 i, a, I, A, r, R, o, O, dd, dw, c$, D, x, X.
 Changing/Replacing text.
 cc, cw, c$, ~, J, u, . , yy, yw, p, P
 File manipulation.
 :w, :wq, ZZ, :w!, :q, :q! , :![command]
Searching a pattern
 /pattern
 Searches forward for first occurrence of a pattern.
 ?pattern
 Searches backward for first occurrence of a pattern.
 n
 Repeats the last search.
 N
 Repeats the last search command in opposite direction.
Pattern Substitution.
 :s/ptn1/ptn2
 Replaces first occurrence of ptn1 with ptn2.
 : s/ptn1/ptn2/g
 Replaces all occurrences in the current line.
 : m, n s/ptn1/ptn2/g
 Replaces all occurrences in lines m to n.
 : ., $ s/ptn1/ptn2/g
 Replaces all occurrences from current line to end of file.
Customizing vi.
 The set command
 :set all
 :set nu
 The abbr command
 :abbr itl ―Infosys Technologies Ltd‖
 The map command
 :map ^X :wq
System Variables.
 PATH
 Search path referred by Unix for any command.
 echo $PATH
 HOME
 Indicates the home directory for the user.
 echo $HOME
 set command
 Used for display all the environment variables.
 Shows the current values of system variables.
 Also allows conversion of arguments into positional parameters.
 Syntax : set
set command.
File Permission - Absolute Mode.
r w x r w x r w x
4 2 1 4 2 1 4 2 1
Owner Group Other
Group OthersOwner
rwxrwxrwx
Permission Value
R 4
W 2
x 1
- No Permission
Summary
 Background
 Features of Unix
 Unix System Architecture
 Unix File System
 General Unix commands and utilities
 Processes
 Regular Expressions
 Vi Editor
 Modes of operation
File Permission – Symbolic Mode.
Who User Class Meaning
U User Owner of file
G Group Group to which owner
belongs
O Other All other Users
Who Meaning
r Sets read permission
w Sets write permission
x Sets exec permission
Symbolic mode user class specification
Symbolic mode permissions
Examples of chmod
 Syntax.
chmod [0-7][0-7][0-7] filename (Absolute
Mode)
chmod [ugo][+-][rwx] filename (Symbolic
Mode)
$ chmod a=rw temp
$ ls -l temp-rw-rw-rw- 1 alex pubs 57 Jul 12 16:47 temp
Unmasking File Permission
 umask
 Stands for user creation mask.
 Sets default permissions for a newly created file and directory.
 The value can be changed.
Example
6 6 6 - System wide default permissions
- 0 2 2 - Denial ‗mask‘ set by UMASK
6 4 4 - Resultant permissions that will be
set on all files created (-rw-r—r--)
Linux Command Suumary
Ad

More Related Content

What's hot (20)

Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
sbmguys
 
Some basic unix commands
Some basic unix commandsSome basic unix commands
Some basic unix commands
aaj_sarkar06
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Nikhil Jain
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
Mohit Belwal
 
Linux basic commands tutorial
Linux basic commands tutorialLinux basic commands tutorial
Linux basic commands tutorial
Teja Bheemanapally
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
Rodrigo Maia
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
meashi
 
A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
Tusharadri Sarkar
 
Linux commands
Linux commandsLinux commands
Linux commands
Mannu Khani
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
Anuchit Chalothorn
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
Ishan A B Ambanwela
 
Red hat linux essentials
Red hat linux essentialsRed hat linux essentials
Red hat linux essentials
Haitham Raik
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
Wave Digitech
 
QSpiders - Unix Operating Systems and Commands
QSpiders - Unix Operating Systems  and CommandsQSpiders - Unix Operating Systems  and Commands
QSpiders - Unix Operating Systems and Commands
Qspiders - Software Testing Training Institute
 
Linux powerpoint
Linux powerpointLinux powerpoint
Linux powerpoint
bijanshr
 
Linux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScITLinux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScIT
vignesh0009
 
Basic Unix
Basic UnixBasic Unix
Basic Unix
Rajesh Kumar
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
raj upadhyay
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
Brahma Killampalli
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
sbmguys
 
Some basic unix commands
Some basic unix commandsSome basic unix commands
Some basic unix commands
aaj_sarkar06
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Nikhil Jain
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
Mohit Belwal
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
Rodrigo Maia
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
meashi
 
A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
Tusharadri Sarkar
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
Anuchit Chalothorn
 
Red hat linux essentials
Red hat linux essentialsRed hat linux essentials
Red hat linux essentials
Haitham Raik
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
Wave Digitech
 
Linux powerpoint
Linux powerpointLinux powerpoint
Linux powerpoint
bijanshr
 
Linux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScITLinux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScIT
vignesh0009
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
raj upadhyay
 

Viewers also liked (17)

Unix
UnixUnix
Unix
Srinath Dhayalamoorthy
 
Unix short
Unix shortUnix short
Unix short
Sunil Kumar Gunasekaran
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
srinivas damarla
 
Java For beginners and CSIT and IT students
Java  For beginners and CSIT and IT studentsJava  For beginners and CSIT and IT students
Java For beginners and CSIT and IT students
Partnered Health
 
Java Notes
Java NotesJava Notes
Java Notes
Abhishek Khune
 
Unix command line concepts
Unix command line conceptsUnix command line concepts
Unix command line concepts
Artem Nagornyi
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testing
Garuda Trainings
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
mukul bhardwaj
 
Unix command-line tools
Unix command-line toolsUnix command-line tools
Unix command-line tools
Eric Wilson
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
kalyanineve
 
Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674
Lokesh Kakkar Mobile No. 814-614-5674
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
Stephen Colebourne
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
Michael Olafusi
 
Top 100 Linux Interview Questions and Answers 2014
Top 100 Linux Interview Questions and Answers 2014Top 100 Linux Interview Questions and Answers 2014
Top 100 Linux Interview Questions and Answers 2014
iimjobs and hirist
 
Linux.ppt
Linux.ppt Linux.ppt
Linux.ppt
onu9
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
Chris Lema
 
Ad

Similar to Linux Command Suumary (20)

Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basi
Priyadarshini648418
 
unix.ppt
unix.pptunix.ppt
unix.ppt
jeronimored
 
Nithi
NithiNithi
Nithi
sharmibalu
 
Linux programming - Getting self started
Linux programming - Getting self started Linux programming - Getting self started
Linux programming - Getting self started
Emertxe Information Technologies Pvt Ltd
 
cisco
ciscocisco
cisco
edomaldo
 
Linuxs1
Linuxs1Linuxs1
Linuxs1
rajikaa
 
3. intro
3. intro3. intro
3. intro
Harsh Shrimal
 
Spsl unit1
Spsl   unit1Spsl   unit1
Spsl unit1
Sasidhar Kothuru
 
Linux For Beginners! Ultimate guide to Linux Users!!
Linux For Beginners! Ultimate guide to Linux Users!!Linux For Beginners! Ultimate guide to Linux Users!!
Linux For Beginners! Ultimate guide to Linux Users!!
mailtosidharthme
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
poornima sugumaran
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
Reka
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
poornima sugumaran
 
Linux
LinuxLinux
Linux
nazeer pasha
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
Nitesh Nayal
 
UNIX_Module 1.pdf
UNIX_Module 1.pdfUNIX_Module 1.pdf
UNIX_Module 1.pdf
krishnaraj714229
 
Chapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsChapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix Concepts
MeenalJabde
 
Unit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-pptUnit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-ppt
Rahul Mashal
 
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
KesavanT10
 
Operating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptOperating System Laboratory presentation .ppt
Operating System Laboratory presentation .ppt
PDhivyabharathi2
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training
Nancy Thomas
 
Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basi
Priyadarshini648418
 
Linux For Beginners! Ultimate guide to Linux Users!!
Linux For Beginners! Ultimate guide to Linux Users!!Linux For Beginners! Ultimate guide to Linux Users!!
Linux For Beginners! Ultimate guide to Linux Users!!
mailtosidharthme
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
Reka
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
Nitesh Nayal
 
Chapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsChapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix Concepts
MeenalJabde
 
Unit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-pptUnit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-ppt
Rahul Mashal
 
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
KesavanT10
 
Operating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptOperating System Laboratory presentation .ppt
Operating System Laboratory presentation .ppt
PDhivyabharathi2
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training
Nancy Thomas
 
Ad

Recently uploaded (20)

Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 

Linux Command Suumary

  • 2. Course Objective  To introduce the Unix Operating System Concept.  To introduce standard Unix commands.  To introduce VI editor.
  • 3. References  Text Book Reference  Brain W. Kernighan and Rob Pike, The UNIX Programming Environment.  A Practical Guide to Linux® Commands, Editors, and Shell Programming - Mark Sobell's  Web Reference  Unix Tutorial For Beginners  Introduction to Unix  http://www.cis.uab.edu/cs344/spring2005/
  • 4. What is Unix Operating System  Unix OS is a Program  Unix OS provides interface between users and bare hardware  Unix OS manages resources: CPU(s), memory, disks, other I/O devices. Operating System users
  • 5. Why do we need Operating System ? To Interact with Computer Hardware End User Computer Hardware Operating-System Utilities Application Programs OS Designer System Programmer Application Programmer E.g. compiler, librari es, shell E.g. database, web servers
  • 7. Flavors of Unix  AIX (Advanced IBM Unix)  HP-UX ( Hewlett Packard Unix)  BSD ( Berkeley Software Distribution. )  SCO UNIX  SOLARIS  LINUX, etc
  • 9. System Architecture  Major components of Unix are :  Kernel  Monitors and controls hardware resources  Allocates them among its users in an optimal manner  Utilities  Programming tools that do standard tasks extremely well.  EX: cp, grep, awk, sed, bc, wc, more  Shell  Command Line Interpreter.  Provides a processing environment for the user programs.  User Applications  Programs written by the user
  • 10. Processing Environment • User Program – Set of instructions written by the user • Process – Instance of a program under execution • Shell – Provides a processing environment for the user programs
  • 11. Structure of Unix File System
  • 12. Absolute Path and Relative Path  The Absolute Path  The entire pathname starting from root(/)  Example  /home/oresoft/.  The Relative Path  The path relative to your present working directory  Example  cd ..
  • 13. How Unix Session Works. USER TYPES COMMAND SHELL EXECUTES UTILITY TO CARRY OUT COMMAND SHELLASKS FOR A COMMAND USER INTERACTS WITH UTILITY SHELL PROMPTS FOR NEXT COMMAND USER TYPES CONTROL-D LOGOUT LOGIN
  • 14. Login Sequence.  /etc/passwd 1  /etc/shadow 2  /etc/group 3  /etc/profile 4  /etc/profile.d/*.sh 5  ~/.bash_profile 6  ~/.bashrc 7  /etc/bashrc 8
  • 15. Unix Command Structure  Unix Command line structure  command [options] [arguments] Refer the following word Doc for Detail Command
  • 16. Concept of stdin, stdout and stderr Operating System Another Computer program running stdout stderr stdin Keyboard A Computer program running stdout stderr stdin Monitor
  • 17. Standard Files  Standard Input (0)  This file is opened by shell to accept information.  Standard Output (1)  This file is opened by shell to direct output  Standard Error (2)  This file is opened by shell for writing error messages
  • 18. Regular Expressions What is it?  String of ordinary and metacharacter which can be used to match more than one type of pattern.  Uses character set  * , [], ^, $, {}, etc.
  • 19. The Shell Metacharacters.  See Demo at /home/oresoft/Training/Linux/commands/shellChar  * - Matches all filenames in current directory.  ? - Matches a single character.  [abc] - Matches a single character – either a, b or c.  [!abc] - Matches a single character – which is not a, b or c.  [a-c] – Matches a single character which is within the range of a and c.  ^abc – Matches the pattern abc at the beginning of the line.  abc$ - Matches the pattern abc at the end of the line.
  • 20. Editor in Unix  Need for editor in Unix  Types of editor  Line Editor  ed : UC Berkeley  ex : Powerful than ed, Bell Systems  Full Screen Editor  vi (stands for visual)  vim – vi improved  emacs (GNU)
  • 21. The vi Editor.  The important characteristic features are:  Omnipresent  Works on different Unix flavors  Fast  Various operations are very fast  Powerful UNDO features  Text in lines could be undone with very less effort
  • 22. The vi Editor.  The limitations are:  Less user-friendly  No graphical user interface  Highly Case-sensitive  Letter in small case has a different implementation in comparison with the same letter in upper case  Keystrokes could have more than one meaning  A letter (of the same case) has different implementation across different modes.
  • 23. The vi Editor.  Modes of working:  Command Mode  Keys are interpreted as commands  Insert Mode  Keys are interpreted as data  Escape Mode  Keys are interpreted for saving/exiting purposes
  • 24. vi Operating modes. Command mode Insert mode i, I , o, O, a, A .. esc Last line mode Enter: :q
  • 25. Vi editor commands  To move around  h, j, k, l, ^D, ^U, G, 0, ^, $, w, b  Inserting/Deleting text  i, a, I, A, r, R, o, O, dd, dw, c$, D, x, X.  Changing/Replacing text.  cc, cw, c$, ~, J, u, . , yy, yw, p, P  File manipulation.  :w, :wq, ZZ, :w!, :q, :q! , :![command]
  • 26. Searching a pattern  /pattern  Searches forward for first occurrence of a pattern.  ?pattern  Searches backward for first occurrence of a pattern.  n  Repeats the last search.  N  Repeats the last search command in opposite direction.
  • 27. Pattern Substitution.  :s/ptn1/ptn2  Replaces first occurrence of ptn1 with ptn2.  : s/ptn1/ptn2/g  Replaces all occurrences in the current line.  : m, n s/ptn1/ptn2/g  Replaces all occurrences in lines m to n.  : ., $ s/ptn1/ptn2/g  Replaces all occurrences from current line to end of file.
  • 28. Customizing vi.  The set command  :set all  :set nu  The abbr command  :abbr itl ―Infosys Technologies Ltd‖  The map command  :map ^X :wq
  • 29. System Variables.  PATH  Search path referred by Unix for any command.  echo $PATH  HOME  Indicates the home directory for the user.  echo $HOME
  • 30.  set command  Used for display all the environment variables.  Shows the current values of system variables.  Also allows conversion of arguments into positional parameters.  Syntax : set set command.
  • 31. File Permission - Absolute Mode. r w x r w x r w x 4 2 1 4 2 1 4 2 1 Owner Group Other Group OthersOwner rwxrwxrwx Permission Value R 4 W 2 x 1 - No Permission
  • 32. Summary  Background  Features of Unix  Unix System Architecture  Unix File System  General Unix commands and utilities  Processes  Regular Expressions  Vi Editor  Modes of operation
  • 33. File Permission – Symbolic Mode. Who User Class Meaning U User Owner of file G Group Group to which owner belongs O Other All other Users Who Meaning r Sets read permission w Sets write permission x Sets exec permission Symbolic mode user class specification Symbolic mode permissions
  • 34. Examples of chmod  Syntax. chmod [0-7][0-7][0-7] filename (Absolute Mode) chmod [ugo][+-][rwx] filename (Symbolic Mode) $ chmod a=rw temp $ ls -l temp-rw-rw-rw- 1 alex pubs 57 Jul 12 16:47 temp
  • 35. Unmasking File Permission  umask  Stands for user creation mask.  Sets default permissions for a newly created file and directory.  The value can be changed. Example 6 6 6 - System wide default permissions - 0 2 2 - Denial ‗mask‘ set by UMASK 6 4 4 - Resultant permissions that will be set on all files created (-rw-r—r--)