I know what should be the difference between su
and su -
, but in my system (Debian) for example PATH
is the same:
[root]# su
[root]# echo $PATH
/user_path/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[root]# exit
[root]$ su -
[root@debian ~]# echo $PATH
/user_path/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
So I'm starting to think that the settings can be changed in configuration files.
su
program since this question was written and answered. unix.stackexchange.com/q/460478/5132