How to install Rust using rustup on macOS/Linux/Ubuntu


What is rustup?

    rustup is an installer for Rust Programming Language. It is the official release channels or Rust which makes it easy to switch between stable, beta, and nightly compilers and keep them updated.


How to install Rust using rustup on Mac/Linux/Ubuntu?

  1. Open Terminal
  2. Run the below command on Bash/Zsh shell.
    % curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

    Some installation logs.

    Current installation options:
    
    
       default host triple: aarch64-apple-darwin
         default toolchain: stable (default)
                   profile: default
      modify PATH variable: yes
    
    1) Proceed with installation (default)
    2) Customize installation
    3) Cancel installation
    >1
    
    info: syncing channel updates for 'stable-aarch64-apple-darwin'
    info: latest update on 2023-07-13, rust version 1.71.0 (8ede3aae2 2023-07-12)
    info: downloading component 'cargo'
      5.0 MiB /   5.0 MiB (100 %)   4.0 MiB/s in  1s ETA:  0s
    info: downloading component 'clippy'
    info: downloading component 'rust-docs'
    ...
    ...
    info: downloading component 'rustfmt'
    info: installing component 'cargo'
    info: installing component 'clippy'
    info: installing component 'rust-docs'
     13.6 MiB /  13.6 MiB (100 %)   6.7 MiB/s in  2s ETA:  0s
    info: installing component 'rust-std'
     24.3 MiB /  24.3 MiB (100 %)  19.3 MiB/s in  1s ETA:  0s
    info: installing component 'rustc'
     52.6 MiB /  52.6 MiB (100 %)  21.5 MiB/s in  2s ETA:  0s
    info: installing component 'rustfmt'
    info: default toolchain set to 'stable-aarch64-apple-darwin'
    
      stable-aarch64-apple-darwin installed - rustc 1.71.0 (8ede3aae2 2023-07-12)
    
    
    Rust is installed now. Great!
    
    To get started you may need to restart your current shell.
    This would reload your PATH environment variable to include
    Cargo's bin directory ($HOME/.cargo/bin).
    
    To configure your current shell, run:
    source "$HOME/.cargo/env"
    
Installing Rust Lang using rustup on Mac

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap