1 |
On 02/18/2017 02:00 AM, Meino.Cramer@×××.de wrote: |
2 |
> Ian Zimmerman <itz@×××××××.net> [17-02-18 07:52]: |
3 |
>> On 2017-02-17 17:40, Meino.Cramer@×××.de wrote: |
4 |
>> |
5 |
>>> is there any clean way to delete the environment completly |
6 |
>>> right after chrooting into a alternate root installation |
7 |
>>> -- except using 'login <user>' after chrooting? |
8 |
>>> |
9 |
>>> Thanks in advance for any keeping the environment clean! ;) |
10 |
>> |
11 |
>> Run |
12 |
>> |
13 |
>> env -i sh |
14 |
>> |
15 |
>> as the command in chroot. |
16 |
>> |
17 |
>> I wish it was this easy in the "real world" :-( |
18 |
>> |
19 |
>> -- |
20 |
>> Please *no* private Cc: on mailing lists and newsgroups |
21 |
>> Personal signed mail: please _encrypt_ and sign |
22 |
>> Don't clear-text sign: http://cr.yp.to/smtp/8bitmime.html |
23 |
>> |
24 |
> |
25 |
> Hi Ian, |
26 |
> |
27 |
> this puts a big smile onto my face: |
28 |
> Before posting a did several experiments with 'env -i' in |
29 |
> several places (bashrc and such)....nothing works, |
30 |
> THIS one you mentioned I left out for reasons I dont know. |
31 |
> :) |
32 |
> |
33 |
> And yes(!): I also would like to have some instances |
34 |
> of 'env -i' running for several purposes not limited |
35 |
> to the phusical/nature environment only. |
36 |
> ;) |
37 |
> |
38 |
> To the future!....but not without my commandline... |
39 |
> |
40 |
> Cheers |
41 |
> Meino |
42 |
> |
43 |
> |
44 |
> |
45 |
> |
46 |
|
47 |
You probably want to keep at least the TERM environment variable; to do |
48 |
so, use something like `env -i TERM=$TERM ...`. The TERM environment |
49 |
variable is generally only set by the terminal emulator you use (or by |
50 |
agetty(8) for console logins); the default is to treat everything as |
51 |
"dumb", which breaks anything using curses (like vim, nano, etc.). |
52 |
|
53 |
-- |
54 |
Jonathan Callen |