[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [solved] Re: Setting up aliases to work also in tty* consoles?



On Tue, Jun 20, 2017 at 05:32:09PM +0100, Rodolfo Medina wrote:
> Greg Wooledge <wooledg@eeg.ccf.org> writes:
> > Once more, from the top:
> >
> > 1) ~/.bash_profile should source ~/.bashrc
> > 2) Shell functions and aliases and shopts and sets and other transient
> >    settings should go in ~/.bashrc
> > 3) Environment variables and other NON-transient settings should go in
> >    ~/.bash_profile

> My alias:
> 
>  alias mplayer='mplayer -demuxer lavf'
> 
> works, for tty* consoles, if I put it in ~/.bash_profile.  Instead, if I put it
> in ~/.bashrc, it doesn't work within tty* but only within graphical system.

Refer to step 1.  Make sure ~/.bash_profile sources ~/.bashrc.

Debian provides a ~/.profile by default in jessie and stretch, so
~/.bash_profile is either something you wrote, or something you
inherited from an older system.

Make ~/.bash_profile source ~/.bashrc.

If you need help with that, you can paste the code from /etc/skel/.profile
starting with "# if running bash" and ending with the second "fi" line
which follows that comment.

~/.bash_profile must source ~/.bashrc


Reply to: