keeping aliases after sudo

Hanspeter Roth hampi at rootshell.be
Sun Jan 19 14:22:21 EST 2003


  On Jan 18 at 14:47, Aaron spoke:

> Hanspeter,
> 
> I use sudo -s to become root,and recently just tried
> sudo ksh. After I type that my shell aliases
> disappear.

Hi Aaron,

the aliases probably haven't disappeared. They rather are hidden.
After you exit the sudo shell they should »reappear«.

But after doing »sudo ksh« you could source your environment
file containing the alias definitions (e.g. . ~/.kshenv).

If the account you invoke sudo from has ksh as login shell you
should succeed by invoking it as: sudo su

-Hanspeter


More information about the sudo-users mailing list