SlideShare a Scribd company logo
1 of 6
Getting Started With Environment Variables in Linux...
Module 1:
What are environment variables?
- Set of dynamic named values
- They provide a way to influence the software behavior on a system
printenv and env commands ????
What are environment variables?What are environment variables?
- printenv - print all or part of environment
- env - run a program in a modified environment
Principles of Environment Variables …..
Module 2:
PROCESS LOCALITY ...
- The values of environment variables are local.
- These values are specific to the process in which or for which they
were set
Principles of Environment Variables …..
Module 3:
INHERITANCE...
- The Child process inherits (gets) all the environment variables from
parent with values
Note: Changes to env vars at run time by parent is not visible to child and vice versa
Process locality get applied here
Principles of Environment Variables …..
Module 4:
CASE SENSITIVITY...
- Env variables are case sensitive
- It is a common practice to name all env variables in English Capital
Letters and _ signs
Persistent Environment Variables (Session-wide Environment
Variables )...
Module 5:
Types:
- Session-wide Environment Variables
- System-wide Environment Variables
Session-wide Environment Variables
~/.pam_environment
~/.profile
Shell Config files
~/.bashrc
~/.bash_logout
~/.bash_history
Persistent Environment Variables (System-wide Environment
Variables )...
Module 6:
System-wide Environment Variables
- /etc/environment
- /etc/profile.d/*.sh
Other files:
-/etc/profile
-/etc/default/locale
-/etc/bash.bashrc

More Related Content

Similar to Environment Variables in Linux

Next generation of frontend architectures
Next generation of frontend architecturesNext generation of frontend architectures
Next generation of frontend architecturesluca mezzalira
 
VaMoS 2022 - Transfer Learning across Distinct Software Systems
VaMoS 2022 - Transfer Learning across Distinct Software SystemsVaMoS 2022 - Transfer Learning across Distinct Software Systems
VaMoS 2022 - Transfer Learning across Distinct Software SystemsLuc Lesoil
 
130830 stephane bunod - impact of code ownership on antipatterns
130830   stephane bunod - impact of code ownership on antipatterns130830   stephane bunod - impact of code ownership on antipatterns
130830 stephane bunod - impact of code ownership on antipatternsPtidej Team
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
The experience of cross device testing
The experience of cross device testingThe experience of cross device testing
The experience of cross device testingLINE Corporation
 
130705 zephyrin soh - how developers spend their effort during maintenance ...
130705   zephyrin soh - how developers spend their effort during maintenance ...130705   zephyrin soh - how developers spend their effort during maintenance ...
130705 zephyrin soh - how developers spend their effort during maintenance ...Ptidej Team
 
Test Environment: An Essential Component Of The DevSecOps Framework
Test Environment: An Essential Component Of The DevSecOps FrameworkTest Environment: An Essential Component Of The DevSecOps Framework
Test Environment: An Essential Component Of The DevSecOps FrameworkEnov8
 
Mats Grindal - Risk-Based Testing - Details of Our Success
Mats Grindal - Risk-Based Testing - Details of Our Success Mats Grindal - Risk-Based Testing - Details of Our Success
Mats Grindal - Risk-Based Testing - Details of Our Success TEST Huddle
 
CEIS106_Final_Project.pptx.pdf
CEIS106_Final_Project.pptx.pdfCEIS106_Final_Project.pptx.pdf
CEIS106_Final_Project.pptx.pdfluxasuhi
 
A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...
A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...
A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...Takashi Yamanoue
 
software development methodologies
software development methodologiessoftware development methodologies
software development methodologiesUTeM
 
Spm unit v-software maintenance-intro
Spm unit v-software maintenance-introSpm unit v-software maintenance-intro
Spm unit v-software maintenance-introKanchana Devi
 
ICALT 2010: Supporting Exception Handling in Scripted Collaborative Courses
ICALT 2010: Supporting Exception Handling in Scripted Collaborative CoursesICALT 2010: Supporting Exception Handling in Scripted Collaborative Courses
ICALT 2010: Supporting Exception Handling in Scripted Collaborative CoursesRoberto Perez-Rodriguez
 
11091.handout os lab ii
11091.handout os lab ii11091.handout os lab ii
11091.handout os lab iiamitkkhan
 

Similar to Environment Variables in Linux (20)

Next generation of frontend architectures
Next generation of frontend architecturesNext generation of frontend architectures
Next generation of frontend architectures
 
VaMoS 2022 - Transfer Learning across Distinct Software Systems
VaMoS 2022 - Transfer Learning across Distinct Software SystemsVaMoS 2022 - Transfer Learning across Distinct Software Systems
VaMoS 2022 - Transfer Learning across Distinct Software Systems
 
130830 stephane bunod - impact of code ownership on antipatterns
130830   stephane bunod - impact of code ownership on antipatterns130830   stephane bunod - impact of code ownership on antipatterns
130830 stephane bunod - impact of code ownership on antipatterns
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
The experience of cross device testing
The experience of cross device testingThe experience of cross device testing
The experience of cross device testing
 
MPI - 4
MPI - 4MPI - 4
MPI - 4
 
130705 zephyrin soh - how developers spend their effort during maintenance ...
130705   zephyrin soh - how developers spend their effort during maintenance ...130705   zephyrin soh - how developers spend their effort during maintenance ...
130705 zephyrin soh - how developers spend their effort during maintenance ...
 
Test Environment: An Essential Component Of The DevSecOps Framework
Test Environment: An Essential Component Of The DevSecOps FrameworkTest Environment: An Essential Component Of The DevSecOps Framework
Test Environment: An Essential Component Of The DevSecOps Framework
 
Soft Eng 1st PPT
Soft Eng 1st PPTSoft Eng 1st PPT
Soft Eng 1st PPT
 
Mats Grindal - Risk-Based Testing - Details of Our Success
Mats Grindal - Risk-Based Testing - Details of Our Success Mats Grindal - Risk-Based Testing - Details of Our Success
Mats Grindal - Risk-Based Testing - Details of Our Success
 
CEIS106_Final_Project.pptx.pdf
CEIS106_Final_Project.pptx.pdfCEIS106_Final_Project.pptx.pdf
CEIS106_Final_Project.pptx.pdf
 
P&MSP2012 - Maven
P&MSP2012 - MavenP&MSP2012 - Maven
P&MSP2012 - Maven
 
A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...
A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...
A Casual Teaching Tool for Large Size Computer Laboratories ans Small Size Se...
 
software development methodologies
software development methodologiessoftware development methodologies
software development methodologies
 
mehdi-refactoring.pptx
mehdi-refactoring.pptxmehdi-refactoring.pptx
mehdi-refactoring.pptx
 
Spm unit v-software maintenance-intro
Spm unit v-software maintenance-introSpm unit v-software maintenance-intro
Spm unit v-software maintenance-intro
 
Evolution in the large
Evolution in the largeEvolution in the large
Evolution in the large
 
ICALT 2010: Supporting Exception Handling in Scripted Collaborative Courses
ICALT 2010: Supporting Exception Handling in Scripted Collaborative CoursesICALT 2010: Supporting Exception Handling in Scripted Collaborative Courses
ICALT 2010: Supporting Exception Handling in Scripted Collaborative Courses
 
11091.handout os lab ii
11091.handout os lab ii11091.handout os lab ii
11091.handout os lab ii
 
MuFinal
MuFinalMuFinal
MuFinal
 

Recently uploaded

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهMohamed Sweelam
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistandanishmna97
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 

Recently uploaded (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistan
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 

Environment Variables in Linux

  • 1. Getting Started With Environment Variables in Linux... Module 1: What are environment variables? - Set of dynamic named values - They provide a way to influence the software behavior on a system printenv and env commands ???? What are environment variables?What are environment variables? - printenv - print all or part of environment - env - run a program in a modified environment
  • 2. Principles of Environment Variables ….. Module 2: PROCESS LOCALITY ... - The values of environment variables are local. - These values are specific to the process in which or for which they were set
  • 3. Principles of Environment Variables ….. Module 3: INHERITANCE... - The Child process inherits (gets) all the environment variables from parent with values Note: Changes to env vars at run time by parent is not visible to child and vice versa Process locality get applied here
  • 4. Principles of Environment Variables ….. Module 4: CASE SENSITIVITY... - Env variables are case sensitive - It is a common practice to name all env variables in English Capital Letters and _ signs
  • 5. Persistent Environment Variables (Session-wide Environment Variables )... Module 5: Types: - Session-wide Environment Variables - System-wide Environment Variables Session-wide Environment Variables ~/.pam_environment ~/.profile Shell Config files ~/.bashrc ~/.bash_logout ~/.bash_history
  • 6. Persistent Environment Variables (System-wide Environment Variables )... Module 6: System-wide Environment Variables - /etc/environment - /etc/profile.d/*.sh Other files: -/etc/profile -/etc/default/locale -/etc/bash.bashrc