Re: su
On Tue, 5 Sep 2023 23:41:45 -0400
Greg Wooledge <greg@wooledge.org> wrote:
> To perform that installation, you run "su", which gives you a root
> shell, and then you do something like "make install".
>
> But the Red Hat answer says you should use "su -" instead, to become
> root. What happens now? You've created a login shell. Now you're no
> longer in the directory where your source code was extracted and
> compiled. You're in root's $HOME directory. So "make install" fails.
>
> You could use a "cd" command to get to the source code. But "cd -"
> won't work, because the previous working directory is not known to
> the root login shell. The root login shell has intentionally
> discarded everything from your previous shell, including the old
> working directory's name. So you can't "cd -", but instead, you have
> to re-type the entire path to the source code directory. Or copy and
> paste it out of your shell prompt, if that's still visible on the
> screen, and if it happens to contain the entire path.
>
> Wouldn't it be *nicer* if su simply WORKED?!
>
> You can make su work by creating a ONE-LINE CONFIGURATION FILE.
Thank you Greg
--
** ** ** ** ** ** ** ** ** **
Registered Linux User:- 329524
***********************************************
There is no exercise better for the heart than reaching down
and lifting people up.-- John Holmes
***********************************************
Debian GNU/Linux - just the best way to create magic
_______________________________________________
Reply to: