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

Re: User Forgets Aliases



On Mon, Dec 16, 2019 at 09:30:08AM -0500, Stephen P. Molnar wrote:
> As a matter of fact, there was no .bash_profile.
> 
> I created on and transferred all of my alias statement to that and not is
> fine.

I believe you meant to say "now is fine".  But your typo is literally
correct: it is *NOT* fine.  That is not how you do it.

https://mywiki.wooledge.org/DotFiles
https://wiki.debian.org/DotFiles

You put aliases in ~/.bashrc so that they are read by NON-LOGIN SHELLS
such as the one you get when you open an xterm from a window manager,
and that xterm is NOT invoked with the -ls option.

You source .bashc from your profile so that you ALSO get your aliases
when you run a LOGIN SHELL, such as the one you get when you ssh into
the system, or login on a text console, or open an xterm from a window
manager with the -ls option.

On top of that, you probably already had a ~/.profile, and now that you've
created a ~/.bash_profile, your ~/.profile is no longer used.  This
will probably be a new, separate problem that you have just created for
yourself, and simply not noticed yet.

Remove your ~/.bash_profile.

Put all your LOGIN SHELL STUFF (environment variables and so on)
in ~/.profile.

Make sure ~/.profile dots in ~/.bashrc.

Put all your ALIASES, FUNCTIONS, SHOPTS AND SO FORTH in ~/.bashrc.

Read the two wiki pages.  Or at least one of them.  The Debian one is
older, so if you only read one of them, it should probably be the
first one.

Tell us HOW. YOU. LOG. IN.  This is no longer optional.  Stop fooling
around.  Stop being an obstinate blockhead.

Do you not understand the QUESTION?  Here are some possible answers to
it:

"I login on a text console, and then I run startx."

"I login with the GNOME graphical thingy.  It says it runs a Wayland."

"I login with the graphical thingy and the default is GNOME Wayland,
but I have problems with that, so I told it use to use GNOME X11."

"I installed XFCE and I login with the graphical thing, I think it's
called light something."

"It's a remote server.  I login with ssh."

And so on.

These things MATTER.

You don't have to be an EXPERT, but you do have to demonstrate a tiny
modicum of AWARENESS.


Reply to: