[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: /etc/profile
From: |
Greg Wooledge |
Subject: |
Re: /etc/profile |
Date: |
Tue, 17 Dec 2024 11:09:39 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Tue, Dec 17, 2024 at 17:37:42 +0200, Yuri Kanivetsky wrote:
> A while ago I learned to always use `su -`:
>
> https://unix.stackexchange.com/questions/7013/why-do-we-use-su-and-not-just-su/7021#7021
>
> As such Debian didn't break for me.
Yes, that's a valid solution. It has the advantage of working on every
Debian system, whether it's got the original su implementation, or the
Debian 10+ su implementation, and on most other Linux systems besides.
It has the disadvantage that it forces a full environment cleanse,
including a change of working directory. So, workflow patterns like
this one will break:
$ cd my/deep/source/directory
$ make
$ su -
# make install
make: error, there's no makefile here, what's an install?
But if you never use that workflow pattern, then it may not matter to you.
That's why I put many different workarounds on the Debian wiki. I
encourage people to read them all and choose the one that best fits
their own needs.
<https://wiki.debian.org/NewInBuster#Changes>