<p>I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process).</p>

<p>I don't want to redirect stderr stream from each individual command, which I could do by appending <code>2&gt; a_file</code> to each command.</p>

<p>By default, these stderr streams are redirected to the stdout of an interactive bash. I would like to get them on the stderr of this interactive bash process in order to prevent my stdout to be polluted by error messages and be able to treat them separatly.</p>

<p>Any ideas?</p>

<p>I still haven't found an answer ... But maybe it's actually a tty parameter. Does anybody knows something about tty/interactive shell responsibility for handling stderr ?</p>

You could launch a new bash process redirecting the stderr of that process:
```
```
$ bash -i 2> stderr.log
  $
```
```