在 /etc/profile 之前什么脚本设置 PATH?

在 /etc/profile 之前什么脚本设置 PATH?

echo $PATH > /home/z/path.txt我在前面加了一行/etc/profile,发现内容/home/z/path.txt如下:

/usr/local/bin:/usr/local/sbin:/usr/bin

部分修改/etc/profile

# /etc/profile

# Set our umask
umask 022
echo $PATH > /home/z/path.txt

# Append "$1" to $PATH when not already in.
# This function API is accessible to scripts in /etc/profile.d
append_path () {
    case ":$PATH:" in
        *:"$1":*)
            ;;
        *)
            PATH="${PATH:+$PATH:}$1"
    esac
}

# Append our default paths
append_path '/usr/bin'
append_path '/usr/local/sbin'
append_path '/usr/local/bin'

/etc/profile正如您所看到的,处理时 PATH 不为空。我的问题是:在/etc/profile处理之前,什么脚本设置PATH变量?

我已经浏览过/etc/environment,但我认为这不是我要找的:

#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#

QT_AUTO_SCREEN_SCALE_FACTOR=1

QT_QPA_PLATFORMTHEME="gnome"

QT_STYLE_OVERRIDE="kvantum"

# Force to use Xwayland backend
# QT_QPA_PLATFORM=xcb

#Not tested: this should disable window decorations
# QT_WAYLAND_DISABLE_WINDOWDECORATION=1

EDITOR=/usr/bin/nano

我在 manjaro 上使用zshshell。

相关内容