setting env. variables
hi grp i'm using slack 10.1.
1) How do I set environmental variables? setenv does not work.Is there any other method? 2) For setting PATH...do i need to always wdit the /etc/profile?? There is no .bashrc in slack.But, can I create my own .bashrc and like that for every user? |
If you're using bash, then to set an environment value:
variable1=value variable2=value export variable1 variable2 Bash expects to find a ~/.bashrc and ~/.bash_profile for each user (in addition to using the system /etc/bashrc and /etc/profile files). |
1) setenv is C shell syntax, slackware use bash by default (bourne shell) so the syntax is like:
PATH=/usr/bin:/bin:/usr/X11R6/bin VISUAL=vim 2) yes |
Re: setting env. variables
Quote:
$ export $VAR if you want to get rid of it without exiting the shell $ unset VAR Set PATH only for that shell instance. $ export PATH=$PATH:/opt/kde if you forget the $PATH:, then the only thing in you path will be /opt/kde. play around the echo $WHATEVER. You can see all variable that begin with C by echo $C ... tab. To set them for ever instance of a shell put them in you /etc/profile..global or ~/.profilerc only for only a specific user. |
All times are GMT -5. The time now is 01:26 PM. |