Take the 2-minute tour ×

I want to clear all enviroment variables for a specific user.

So when the user logins it should be the same as he called

 env -i /bin/bash

i've tried to put this line in .bash_profile but it seems it is never executed.

share|improve this question

1 Answer 1

my understanding is you need exec to start the shell. exec env -i /bin/bash

share|improve this answer
Yes, this is the way i\ve tried. exec env -i HOME=$HOME /bin/bash –  Korniltsev Anatoly Jun 20 '12 at 14:21

Your Answer


