SlideShare a Scribd company logo
SHELL
PROGRAMMING
System Management
By
Gaurav. M. Raikar
EL-18-12
• A shell program or script is a computer program
designed to be run by the Unix shell, a
command-line interpreter.
• The various dialects of shell scripts are
considered to be scripting languages.
• Typical operations performed by shell scripts
include file manipulation, program execution,
and printing text
Shell Programming
SYSTEM ARCHITECTURE
Hardware layer
Hardware layer consists of all peripheral devices (RAM/ HDD/ CPU etc.)
Kernel
• It is the core component of Operating System.
• It interacts directly with the underlying hardware and provides low level services
to upper layer components.
• It manages the resources of Linux such as file management, multitasking,
memory & I/O management
Shell
• Shell is an interface between a user and the kernel, hiding complexity of kernel's
functions from users.
• The shell takes commands from the user and executes kernel's functions.
• shell gets started when the user logs in or start the terminal.
Utilities
• Utility programs that provide the user most of the functionalities of an operating
systems.
Vmware & Fedora OS
• VMware Workstation is a hosted hypervisor that runs on
x64 versions of Windows and Linux operating systems; it
enables users to set up virtual machines on a single
physical machine
• Fedora is an open-source operating system built over the
Linux OS kernel architecture.
Fedora is a free to use, customize and distribute. The
operating system is integrated with packaged software and
applications to provide enhanced abilities and functions.
Python
• Python is a high level language like C++, java.
• It is easier to program in python as it is easy to learn and
use, it takes less time to write, programs are shorter and
easier to read.
System Administration
• The job of a system administrator is to manage the
operations of a handling files and directories of
computer system.
• An Operating System is designed consisting of system
software meant for different purpose.
• Each process is monitored by the process to know if it
is working properly or not.
Session Management
• Its a process of keeping track of activity across
sessions of interactions with the computer system.
• Typically sessions management include keeping
track of applications open and thread handled.
• A desktop is a program that saves contents and
keep it for further use.
FILE SYSTEM COMMANDS
System Related Commands
Who: shows who is logged in
Who am I :Shows the name of current user logged in
who -b: Shows the user list
Date : Shows the current date and time
ps -ef : Gives the full information of each running process
Up-time : Tells how long it has been since the system has been powered ON.
Last : shows Session In.
Last User : Shows Information Of Login session Of Last User
Free : Shows the free ,used memory on system
import os
import sys
import time
print "who am i"
print os.system('who am i')
print os.system('uname -airvms')
print "todays date and time"
print os.system ('date')
print "who has logged in the system"
print os.system('who -b')
print os.system('w')
print "full information about each of
the process currently running"
print os.system('ps -ef')
print "user oriented information"
print os.system('ps -u')
print "list information about files"
print os.system('ls -ls')
print "memory usage chart"
print os.system('free')
print " memory usage chart in human
readable format "
print os.system('free -h')
print "see how long the system has been
power up"
print os.system('uptime')
print "uptime in pretty format"
print os.system('uptime -p')
print "information about last logged in
session"
print os.system('last -f/var/log/wtmp')
print "get information of the session only
of the user "
print os.system('last user ')
print "information of the session with full
user name and domain name "
print os.system('last -w')
print "get information of the session with
the full user name and information about
last session"
print os.system('last reboot')
Program
Output
system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikar

More Related Content

What's hot

Shell programming 1.ppt
Shell programming  1.pptShell programming  1.ppt
Shell programming 1.ppt
Kalkey
 
Linux shell env
Linux shell envLinux shell env
Linux shell env
Rahul Pola
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
Raghu nath
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
Mustafa Qasim
 

What's hot (20)

Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Chap06
Chap06Chap06
Chap06
 
Shell programming 1.ppt
Shell programming  1.pptShell programming  1.ppt
Shell programming 1.ppt
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Linux shell env
Linux shell envLinux shell env
Linux shell env
 
Quick start bash script
Quick start   bash scriptQuick start   bash script
Quick start bash script
 
Easiest way to start with Shell scripting
Easiest way to start with Shell scriptingEasiest way to start with Shell scripting
Easiest way to start with Shell scripting
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
Unix And Shell Scripting
Unix And Shell ScriptingUnix And Shell Scripting
Unix And Shell Scripting
 
Unix shell scripts
Unix shell scriptsUnix shell scripts
Unix shell scripts
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
Unix - Shell Scripts
Unix - Shell ScriptsUnix - Shell Scripts
Unix - Shell Scripts
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
 
Unix
UnixUnix
Unix
 
Shell script-sec
Shell script-secShell script-sec
Shell script-sec
 
Unix - Filters/Editors
Unix - Filters/EditorsUnix - Filters/Editors
Unix - Filters/Editors
 

Similar to system management -shell programming by gaurav raikar

operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
krishnajoshi70
 

Similar to system management -shell programming by gaurav raikar (20)

Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)
 
e.pdf
e.pdfe.pdf
e.pdf
 
Spsl unit1
Spsl   unit1Spsl   unit1
Spsl unit1
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
 
LinuxOS-1 (1).ppt
LinuxOS-1 (1).pptLinuxOS-1 (1).ppt
LinuxOS-1 (1).ppt
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
 
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
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
 
Os concepts
Os conceptsOs concepts
Os concepts
 
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya JyothiIntroduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
 
Chapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsChapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix Concepts
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
 
UNIT II-Programming in Linux
UNIT II-Programming in LinuxUNIT II-Programming in Linux
UNIT II-Programming in Linux
 
operating system
operating systemoperating system
operating system
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptx
 
Operating system
Operating systemOperating system
Operating system
 
Computer system software
Computer system softwareComputer system software
Computer system software
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 

Recently uploaded

Recently uploaded (20)

INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 

system management -shell programming by gaurav raikar

  • 2. • A shell program or script is a computer program designed to be run by the Unix shell, a command-line interpreter. • The various dialects of shell scripts are considered to be scripting languages. • Typical operations performed by shell scripts include file manipulation, program execution, and printing text Shell Programming
  • 4. Hardware layer Hardware layer consists of all peripheral devices (RAM/ HDD/ CPU etc.) Kernel • It is the core component of Operating System. • It interacts directly with the underlying hardware and provides low level services to upper layer components. • It manages the resources of Linux such as file management, multitasking, memory & I/O management Shell • Shell is an interface between a user and the kernel, hiding complexity of kernel's functions from users. • The shell takes commands from the user and executes kernel's functions. • shell gets started when the user logs in or start the terminal. Utilities • Utility programs that provide the user most of the functionalities of an operating systems.
  • 5. Vmware & Fedora OS • VMware Workstation is a hosted hypervisor that runs on x64 versions of Windows and Linux operating systems; it enables users to set up virtual machines on a single physical machine • Fedora is an open-source operating system built over the Linux OS kernel architecture. Fedora is a free to use, customize and distribute. The operating system is integrated with packaged software and applications to provide enhanced abilities and functions. Python • Python is a high level language like C++, java. • It is easier to program in python as it is easy to learn and use, it takes less time to write, programs are shorter and easier to read.
  • 6. System Administration • The job of a system administrator is to manage the operations of a handling files and directories of computer system. • An Operating System is designed consisting of system software meant for different purpose. • Each process is monitored by the process to know if it is working properly or not.
  • 7. Session Management • Its a process of keeping track of activity across sessions of interactions with the computer system. • Typically sessions management include keeping track of applications open and thread handled. • A desktop is a program that saves contents and keep it for further use.
  • 9. System Related Commands Who: shows who is logged in Who am I :Shows the name of current user logged in who -b: Shows the user list Date : Shows the current date and time ps -ef : Gives the full information of each running process Up-time : Tells how long it has been since the system has been powered ON. Last : shows Session In. Last User : Shows Information Of Login session Of Last User Free : Shows the free ,used memory on system
  • 10. import os import sys import time print "who am i" print os.system('who am i') print os.system('uname -airvms') print "todays date and time" print os.system ('date') print "who has logged in the system" print os.system('who -b') print os.system('w') print "full information about each of the process currently running" print os.system('ps -ef') print "user oriented information" print os.system('ps -u') print "list information about files" print os.system('ls -ls') print "memory usage chart" print os.system('free') print " memory usage chart in human readable format " print os.system('free -h') print "see how long the system has been power up" print os.system('uptime') print "uptime in pretty format" print os.system('uptime -p') print "information about last logged in session" print os.system('last -f/var/log/wtmp') print "get information of the session only of the user " print os.system('last user ') print "information of the session with full user name and domain name " print os.system('last -w') print "get information of the session with the full user name and information about last session" print os.system('last reboot') Program