Quick_Tip_Linux

Quick Tip: How To Set Environment Variables On Linux

Read Time:29 Sec

Quick_Tip_Linux

I ran into this the other day and need to make note of it so….

The commands used to set environment variables on Linux depends on the shell you use to interface with the operating system.

Below are 2 ways to set environment variables on Linux:

  • (bash or ksh) – export TEMP=/tmp
  • (csh or tcsh) – setenv TEMP /tmp

     

Now that you’ve set the environment variable, how do you know it’s really set?

printenv will print all of the environment variables to your screen.

Hopefully that will help me remember how to set environment variables on Linux.

Author

Stewart Schatz

Career: Principal CNC Consultant for Syntax Systems Limited specializing Oracle JD Edwards EnterpriseOne and the technology that supports it. Side Hustle: Owner/Operator of E1Tips.com Location: Lancaster, PA USA  What I like to do: Invest in Family, Explore Technology, Lead Teams, Share Knowledge/Experience, Hunt, Hike, etc.
Happy
Happy
0
Sad
Sad
0
Excited
Excited
0
Sleepy
Sleepy
0
Angry
Angry
0
Surprise
Surprise
0

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

E1Tips Qucik Tip Previous post Monitor a Log File While It Is Being Written To Using The PowerShell Tail Parameter
E1Tips Qucik Tip Next post How To Change The WebLogic Admin Password Using WLST