Solved

shell variables

Posted on 2000-03-25
1
266 Views
Last Modified: 2010-07-27
What is the best way to change shell
variables?
0
Comment
Question by:Dereks
1 Comment
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 2657411
Well, that depends on what shell you are using and when you want the variables set. From a command line the following apply:

sh       - VAR=my-value; export VAR
bash/ksh - export VAR=my-value
csh/tcsh - setenv VAR my-value

If you want the env vars to be set when you log in, you use the appropriate commands from the above in your shell init files in your home directory, usually:

sh   - .profile
bash - .bashrc
ksh  - .profile
csh  - .cshrc
tcsh - .tcshrc
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now