Solved

shell variables

Posted on 2000-03-25
1
268 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nagios 4 php error after installation 6 90
Hacked File Timestamps 4 61
Delete a folder on a linux computer on a regular basis 10 36
Run Secure WMI query from CentOS 5 25
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

785 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