help-bash
[Top][All Lists]
Advanced

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

Re: /etc/profile


From: microsuxxor
Subject: Re: /etc/profile
Date: Tue, 17 Dec 2024 14:28:34 +0100

try

su -

that opens login shell

On Tue, Dec 17, 2024, 2:27 PM Jérémy Bézairie <jeremy.bezairie@gmail.com>
wrote:

> Hi
>
> I'm on Debian testing KDE.
>
> In Konsole, Bash, e.g. if I type fdisk as normal user or root (after typed
> su) it doesn't work: bash: fdisk: command not found, but it works in both
> cases if I type /usr/sbin/fdisk & sudo fdisk.
> Why is /etc/profile like that?
>
> A solution: edit /etc/profile:
> replace:
>
> if [ "$(id -u)" -eq 0 ]; then
>   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
> else
>   PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
> fi
>
> by simply:
>
>
> PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
>
> Best regards.
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]