Date: Fri, 17 Nov 2023 14:41:41 -0500 From: Garrett Wollman <wollman@bimajority.org> To: mike tancsa <mike@sentex.net> Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: csh to sh migration for root in RELENG_14 Message-ID: <25943.49653.523313.53953@hergotha.csail.mit.edu> In-Reply-To: <6c6add3c-4a5e-4d84-9964-9a9448a36c95@sentex.net>
index | next in thread | previous in thread | raw e-mail
<<On Fri, 17 Nov 2023 13:40:44 -0500, mike tancsa <mike@sentex.net> said: > I am trying to bring my environment along from previous versions where > csh was the default shell and now trying to get used to sh. In the past > things like > sudo su > would pick up my settings in /root/.cshrc automatically. However, with > sh I have to do > sudo su -l root > Is there a way to configure it so I dont need the -l as part of the su > to get the same behavior ? See sh(1) section "Invocation", which describes how /bin/sh reads its initialization files, and in particular, that (as POSIX specifies) interactive non-login shells do not read any startup files unless the environment variable `ENV` is set. This is stupid but required by the standard. I would recommend changing root's shell to something that better suits your needs: either change it back to csh, or install the appropriate package and set it to bash or zsh, both of which read startup files for all interactive shells, not just login shells. -GAWollmanhelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25943.49653.523313.53953>
