How can I install rustup and cargo with a toolchain for all users on Linux?
01:52 05 Jun 2018

I am trying to install rustup with clippy, but I am looking way of installing for all users.

I installed rustup in /opt/setup. Whenever I switch users, I get this:

error: no default toolchain configured

If I try to install a toolchain it does not take /opt/setup, but /home/user. I specified RUSTUP_HOME and CARGO_HOME in my .bashrc file, but still it chooses /home/user. Is there a way to achieve this?

rust rust-cargo rustup