LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   help with command setenv (https://www.linuxquestions.org/questions/red-hat-31/help-with-command-setenv-196177/)

J0sep 06-21-2004 08:04 PM

help with command setenv
 
Hello I need help with the command setenv, it doesen't work, I'm using Red Hat 9 the command is as follows:

setenv PATH /usr/local/ActivePerl-5.6/bin:$PATH

I'm as root, is the command right ? or I'm missing something?

Pleaso Help!

OK THNX.

lyle_s 06-21-2004 08:32 PM

setenv is used to set environment variables in csh (C shell).

Most people using Linux use bash (Bourne again shell).

One way to tell which shell you're using is to look at your prompt. If your prompt is a % character, you're using csh; if it's a $, you're using bash.

Here's an example of how to set an environment variable in bash:

PATH=/usr/local/ActivePerl-5.6/bin:$PATH

Lyle

J0sep 06-21-2004 08:57 PM

Thank U man, it seems that works, no error displayed.
any way my promt is a # and worked with command

PATH=/usr/local/ActivePerl-5.6/bin:$PATH

Ok thnx again

J0sep

lyle_s 06-22-2004 06:52 PM

You're welcome!

I should have said: One way to tell which shell you're using is to look at your prompt when logged in as a normal (non-root) user. If your prompt is a % character, you're using csh; if it's a $, you're using bash.

Lyle


All times are GMT -5. The time now is 07:49 AM.