me@host:~$ export FOO=bar me@host:~$ echo $FOO bar me@host:~$ sudo -i [sudo] password for me: root@host:~# echo $FOO root@host:~# exit logout me@host:~$ sudo bash root@host:/home/me# echo $FOO root@host:/home/me#