0

On interactive login I get:

dircolors: no SHELL environment variable, and no shell type option given

But I do have SHELL variable set:

% set | grep SHELL
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor

In ~/.bash_profile I source .dircolors like that:

eval "`dircolors ~/.dircolors`"

I have done this on other Linux hosts and it was never a problem, but when I do vzctl enter $CTID (OpenVZ container with Debian wheezy), this always appears.

Why is it doing that? And how do I fix that?

0

Try to check the environment variables using env command and see if the SHELL variable exist.

set can also see shell-local variables, which only accessible by the current shell, not by every executed program [1]

If SHELL variable doesn't exist you can export it using export SHELL

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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