How to install Rust system-wide?

⚓ Rust    📅 2026-04-28    👤 surdeus    👁️ 1      

surdeus

I think that running toolchain from the user space (~) and any binary from ~/.cargo could be unsafe as one bin can put the malware to another executive one that have write permissions from the current user. In Unix, it's better to store this data in protected shared location such as /usr/local or /var/lib

Can I setup this script to install Rust into custom location?

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

For cargo install .. I can use just cargo build --release then sudo install from to, but how to move the toolchains out from the current user namespace?

4 posts - 3 participants

Read full topic

🏷️ Rust_feed