aliases for use in ubuntu
Paul Sladen
ubuntu at paul.sladen.org
Thu Jan 5 08:09:05 UTC 2006
On Wed, 4 Jan 2006, alex wrote:
> On Wed, 2006-01-04 at 10:35 -0400, Derek Broughton wrote:
> > Paul Sladen wrote:
> > > (1) put the aliases in your *own* '/home/alex/.bashrc'.
> > Or into /etc/bash.bashrc - which should also work in the other distros
> It seems that in ubuntu, the aliases have to be in /etc/bash.bashrc
This is read for all users; the version in your home is read just for you.
Note that can't just add the alias, if you put it in one of the bashrc files
then you will have to either close the terminal and start a new one; or do:
$ . ~/.bashrc
which tells Bash to read and execute that file---that will load your
aliases.
> and they need sudo in strategic places.
The 'sudo' should come anywhere you would normally need to type it if you
weren't using an 'alias' short-hand; for instance:
$ cd /media
$ sudo mount ...
would turn into:
$ alias foo='cd /media; sudo mount ...'
> I couldn't get suitable results when the aliases were in
> /root/.bashrc
Ignore '/root/.bashrc', it'll never get touched! :)
-Paul
--
This country is covered in white fluffy snow. Helsinki, FI
More information about the ubuntu-users
mailing list