sudo blocks aliases

alex radsky at ncia.net
Fri Dec 30 15:45:59 UTC 2005


On Fri, 2005-12-30 at 02:28 +0100, Leo Cacciari wrote:
> Well, there are two solutions I can see. First, you could simply
> ignore
> the sudo thing and use your commands after becoming root using 'su'.
> Another one is to add your aliases to the adminstrative user aliases
> (/home/whatever/.bash_aliases). If you do this, however, you must
> change
> your aliases by adding 'sudo' in front of them. Beware that for
> multiple
> commands (such as the above examples) you must either add sudo in
> front
> of each command, or execute them all in a subshell: 
> 
> alias xpa+='sudo sh -c "mount -t vfat /dev/hda1 /mnt/da1;\
>                         cd /mnt/da1; ls -aF'"
> 
> Hope that helps
> 
Of all the responses to 'sudo blocks aliases' this is the only one that
seems to address the problem, so thanks, Leo. 
I'll work on your suggestions.

alex
> 
> -- 
> Leo "TheHobbit" 





More information about the ubuntu-users mailing list