Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i want to do something like:

schroot -c name -u root "export A=3 && export B=4"

but i get the error:

Failed to execute “export”: No such file or directory

In other words, I want to be able to programmatically execute shell commands inside the schroot environment. What is the right way to get this behavior?

share|improve this question

schroot bash -c "export....

share|improve this answer

an echo solution is possible as :

echo "export A=3 && export B=4" | schroot -c name -u root 

I use this behavior for a svn/git buildpackaging bash

share|improve this answer

I think since export is a shell builtin that you'd need do do bash export for that to work. Try it again but with a real command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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