Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

6 votes
6 answers
14k views

How to pass an environment variable when change rooting?

I don't seem to be able to pass an environment variable to a chroot: $ sudo apt-get install debootstrap dchroot $ sudo debootstrap trusty mychroot $ sudo chroot mychroot /bin/bash -c "MY_VAR=5; echo $...
tarabyte's user avatar
  • 4,376