When I opened up the Gnome command prompt, several lines of the message:

No command 'setenv' found, did you mean command 'netenv' from package 'netenv' (command)

However, I have never used such command before. It's just I installed a software through Gnome.


setenv is a C shell command, but you're running bash which has no such command.

There are two major families of unix shells: the Bourne family and the C family. Bash, the default shell on most Linux systems, is a member of the Bourne family (“bash” stands for “Bourne-again shell”). The C family has fallen into disuse, its features have now mostly been imitated and improved in bash and zsh.

You've clearly inserted some C shell instructions into one of your shell startup files (.bashrc, perhaps?). You'll need to undo that.

If you have C shell instructions and you need help translating them into Bourne syntax, feel free to ask here. The most important thing to know is that to set an environment variable in the C shell, you write

setenv VARIABLE_NAME "some value"

In a Bourne shell, you write this in ~/.profile (or in /etc/profile if it's for all users):

export VARIABLE_NAME="some value"
  • That is strange, because I did use export function. I put in export VARIABLE =/usr/local/sac newline source ${VARIABLE}/bin/sacinit.csh onto the ~/.bashrc editor and saved it.I clearly did not use "sentenv" anywhere. – GTyler Jun 24 '11 at 0:29
  • @GTyler That file you're including, sacinit.csh, is clearly a C shell (csh) file which calls setenv. Bash can't read it, it's in a wrong language. You need to source sacinit.bash or sacinit.sh if such is provided, or convert sacinit.csh to Bourne/bash syntax. – Gilles 'SO- stop being evil' Jun 24 '11 at 0:38
  • Changed that. Now I am getting bash: export: 1 not a valid identifier newline bash: export: 0 not a valid identifier – GTyler Jun 24 '11 at 1:41
  • @GTyler: Changed what to what? Post the names and contents of all the files involved, we can't help you with so little detail. – Gilles 'SO- stop being evil' Jun 24 '11 at 7:14
  • it sounds like you are doing export $FOO=bar not export FOO=bar — including the dollar sign means it is trying to evaluate $FOO, which is not what you want. – jmtd Jun 24 '11 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.