aliases for use in ubuntu
Paul Sladen
ubuntu at paul.sladen.org
Wed Jan 4 12:41:31 UTC 2006
On Tue, 3 Jan 2006, alex wrote:
Hello Alex,
> (all aliases are in /root/.bashrc in each Linux)
> alias ubu-='cd; umount -l /mnt/da10'
There are two things:
(1) put the aliases in your *own* '/home/alex/.bashrc'.
(2) move the 'sudo' into the alias
so for example:
$ alias foo='sudo echo hello world'
$ foo
hello world
$ sudo tail -1 /var/log/auth.log
localhost sudo: [...] COMMAND=/bin/echo bar
or using your two original examples:
$ alias ubu+='sudo mount -t ext3 /dev/hda10 /mnt/da10; cd /mnt/da10; ls -aF --color=auto'
$ alias ubu-='cd; sudo umount -l /mnt/da10'
and to execute them:
$ ubu+
$ ubu-
Note that only put need to put 'sudo' in front of the bits requiring the
privileges.
Hope that helps!
-Paul
--
This country is covered in white fluffy snow. Helsinki, FI
More information about the ubuntu-users
mailing list