keeping aliases after sudo

Todd C. Miller Todd.Miller at courtesan.com
Wed Jan 15 18:59:32 EST 2003


I assume you mean shell aliases here.  Sudo has no knowledge of
your shell or any aliases defined by the shell.  You can, of
course, use shell scripts instead of aliases.  That would
allow you do run "sudo foo" where foo is a shell script.

If, on the other hand, you are doing "sudo su" you should be able
to do "sudo your_shell" (ie: sudo csh) instead and have your aliases
since the new (root) shell will load the rc file from your home dir.

 - todd


More information about the sudo-users mailing list