What is the mechanism that rustup uses to set the PATH
variable? I couldn't find any entry in my .bashrc
.
How/where does rustup export the PATH variable?
1.3k Views Asked by user299831 At
3
There are 3 best solutions below
0

I'm using rustup installed by package manager(pacman) to manage rust environment in Arch Linux, at first I don't know how does it set PATH
. Then I run pacman -Ql rustup
to list all files the package has installed and found there's a file /etc/profile.d/rustup.sh
and its content:
export PATH=$PATH:/usr/lib/rustup/bin
So it's a global profile file and all shells will source it. I don't know which distro you are using but it must be in similar condition.
Apparently the
PATH
variable is exported in.profile
in the user home directory: