Aliases in Ubuntu
zongo saiba
zongosaiba at gmail.com
Thu Mar 25 00:08:54 UTC 2010
On Wed, 2010-03-24 at 18:27 +0100, Johnny Rosenberg wrote:
> 2010/3/24 Tom H <tomh0665 at gmail.com>:
> >> Two questions about creating aliases in Ubuntu
> >> 1) is it best practice to create an alias in ~/.bashrc or is it
> >> preferable to create the alias in ".bash_aliases" ? If so, how do you
> >> create an alias in ".bash_aliases" ? I can vim into ~/.bashrc but can't
> >> seem to be able to vim into ~/.bash_aliases. I can cd into that
> >> directory but it is empty since I have created my aliases into ~/.basrc.
> >> 2) Is it best to use single or double quote when creating aliases.
> >> ex: would alias dirA="echo Working directory is $PWD" be similar to
> >> alias dirB='echo Working directory is $PWD'
> >
> > I have always used single quotes and seen others using single quotes.
> >
> > You can put your definitions in either file. If you put them in
> > ~/.bash_aliases, make sure that it is sourced by ~/.bashrc.
>
> I think the .bashrc file is already prepared for this. All you have to
> do is to remove some ”#” at the beginning of some lines (and of course
> create a .bash_aliases file).
>
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
>
In ubuntu 9.10, the ~/.bash_aliases is already created. My problem is
not being able to edit this file under vim. I can cd into it though.
More information about the ubuntu-users
mailing list