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

PPT
Shell programming
PPT
Linux shell scripting
ODP
Shellscripting
PPTX
Basics of shell programming
PPTX
SHELL PROGRAMMING
PPTX
Bash shell scripting
PPTX
Shell & Shell Script
PDF
Complete Guide for Linux shell programming
Shell programming
Linux shell scripting
Shellscripting
Basics of shell programming
SHELL PROGRAMMING
Bash shell scripting
Shell & Shell Script
Complete Guide for Linux shell programming

What's hot (20)

PDF
Shell scripting
PPT
Chap06
PPTX
Shell programming 1.ppt
PPTX
Shell scripting
PDF
Shell scripting
PPTX
Linux shell env
PDF
Quick start bash script
PPTX
Easiest way to start with Shell scripting
ODP
Introduction to Shell script
PDF
Module 02 Using Linux Command Shell
PPTX
Bash Shell Scripting
PPT
Shell Scripting
PPT
Unix And Shell Scripting
PPTX
Unix shell scripts
PPT
Shell Scripting in Linux
PPTX
Unix - Shell Scripts
PDF
Unix Shell Scripting
PDF
PDF
Shell script-sec
PPTX
Unix - Filters/Editors
Shell scripting
Chap06
Shell programming 1.ppt
Shell scripting
Shell scripting
Linux shell env
Quick start bash script
Easiest way to start with Shell scripting
Introduction to Shell script
Module 02 Using Linux Command Shell
Bash Shell Scripting
Shell Scripting
Unix And Shell Scripting
Unix shell scripts
Shell Scripting in Linux
Unix - Shell Scripts
Unix Shell Scripting
Shell script-sec
Unix - Filters/Editors
Ad

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

PDF
Basics of Linux Commands, Git and Github
PPTX
operating system calls input and output by (rohit malav)
PDF
e.pdf
PPT
Spsl unit1
PPT
Introduction to System Calls
PPTX
linux m1 part 1 notes in mca departement.pptx
PPT
LinuxOS-1 (1).ppt
PDF
Introduction to System Programming
PPT
System calls in Linux environment for beginners
PPTX
linux and shell programming for information.pptx
PPTX
Unix_Introduction_BCA.pptx the very basi
PDF
Operating system concepts
PPT
PPT
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
PPTX
Chapter 2 Introduction to Unix Concepts
PPTX
session 3(Operating System Services).pptx
PPTX
operatinndnd jdj jjrg-system-1(1) (1).pptx
PPT
Operating System 2
DOCX
UNIT II-Programming in Linux
PDF
Linux For Beginners! Ultimate guide to Linux Users!!
Basics of Linux Commands, Git and Github
operating system calls input and output by (rohit malav)
e.pdf
Spsl unit1
Introduction to System Calls
linux m1 part 1 notes in mca departement.pptx
LinuxOS-1 (1).ppt
Introduction to System Programming
System calls in Linux environment for beginners
linux and shell programming for information.pptx
Unix_Introduction_BCA.pptx the very basi
Operating system concepts
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Chapter 2 Introduction to Unix Concepts
session 3(Operating System Services).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
Operating System 2
UNIT II-Programming in Linux
Linux For Beginners! Ultimate guide to Linux Users!!
Ad

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Institutional Correction lecture only . . .
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
01-Introduction-to-Information-Management.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
STATICS OF THE RIGID BODIES Hibbelers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Institutional Correction lecture only . . .
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Pharma ospi slides which help in ospi learning
Microbial diseases, their pathogenesis and prophylaxis
O7-L3 Supply Chain Operations - ICLT Program
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
TR - Agricultural Crops Production NC III.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
01-Introduction-to-Information-Management.pdf
VCE English Exam - Section C Student Revision Booklet
2.FourierTransform-ShortQuestionswithAnswers.pdf
Final Presentation General Medicine 03-08-2024.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
FourierSeries-QuestionsWithAnswers(Part-A).pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...

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