Re: $PATH and su to root
x85729201kza <[email protected]> Sun, 5 Jul 2026 13:53:45 +1000
| Newsgroups | gmane.os.netbsd.general |
|---|---|
| Message-ID | <TYZPR02MB6044067013DAD1FCFD6F3B83D6F22@TYZPR02MB6044.apcprd02.prod.outlook.com> |
You need to "su -" to "login" to root.
Or source/execute your root's .{shell_init_file} (eg .kshrc, .zshrc, .tcshrc) to pick up root's path.
On 5/07/2026 3:23 am, Todd Gruhn wrote:
> Under X11 I have many dirs in $PATH.
>
> When I su to root, while under X11,
> the root-window still has the previous and
> huge $PATH.
>
> Ho do I reset $PATH under X11 when I su
> to root??