Quick Tip: How To Set Environment Variables On Linux
Share
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
More Stories
How to Clean Up Empty Directories Using the find Command in Linux
Managing files and directories in Linux often involves dealing with empty directories that can clutter your workspace. Manually finding and...
Quick Tip: Determine Active Directory Account Status From The Windows Commandline
Use the following command to Determine Active Directory Account Status from the Windows Commandline without Powershell or any special software....
Where Is Java Installed?
Below are a few commands that can be run to determine where Java is installed on each Operating System: Windows:...
Windows God Mode… What!?!
Windows God Mode is a hidden feature in the Windows operating system that allows users to access all of the system’s control panel options and settings in a single place.
A Better SMTP Test
Several years ago, I posted about an SMTP Test that I was using. Well, lately, I've needed something with a...
How To Kill All Processes With The Same Name On Windows
The taskkill command can be used many different ways to end or kill running processes on Windows Server 2012 and...
Average Rating