SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

Shell programming 1.ppt
Shell programming  1.pptShell programming  1.ppt
Shell programming 1.pptKalkey
 
Linux shell env
Linux shell envLinux shell env
Linux shell envRahul Pola
 
Quick start bash script
Quick start   bash scriptQuick start   bash script
Quick start bash scriptSimon Su
 
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 scriptingAkshay Siwal
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell scriptBhavesh Padharia
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command ShellTushar B Kute
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell ScriptingRaghu nath
 
Unix And Shell Scripting
Unix And Shell ScriptingUnix And Shell Scripting
Unix And Shell ScriptingJaibeer Malik
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in LinuxAnu Chaudhry
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell ScriptingMustafa Qasim
 

Mais procurados (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
 

Semelhante a system management -shell programming by gaurav raikar

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 GithubDevang Garach
 
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)Rohit malav
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System CallsVandana Salve
 
LinuxOS-1 (1).ppt
LinuxOS-1 (1).pptLinuxOS-1 (1).ppt
LinuxOS-1 (1).pptSavitha74
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System ProgrammingSayed Chhattan Shah
 
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 basiPriyadarshini648418
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system conceptsGreen Ecosystem
 
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 JyothiSowmya Jyothi
 
Chapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsChapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsMeenalJabde
 
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).pptxkrishnajoshi70
 
Operating System 2
Operating System 2Operating System 2
Operating System 2tech2click
 
UNIT II-Programming in Linux
UNIT II-Programming in LinuxUNIT II-Programming in Linux
UNIT II-Programming in LinuxDr.YNM
 
operating system
operating systemoperating system
operating systemIbbad shah
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptxsara591850
 
Computer system software
Computer system softwareComputer system software
Computer system softwareMozaSaid
 

Semelhante a 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
 

Último

How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...raviapr7
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfTechSoup
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesCeline George
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and stepobaje godwin sunday
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational PhilosophyShuvankar Madhu
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxraviapr7
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsEugene Lysak
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfMohonDas
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationMJDuyan
 

Último (20)

How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 Sales
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and step
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational Philosophy
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptx
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George Wells
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdf
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive Education
 

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