Summary:
Section titled “Summary:”How to install Rust on macOS
Who is this KB written for?:
Section titled “Who is this KB written for?:”Service Desk
When should this KB be referenced?:
Section titled “When should this KB be referenced?:”When a request is made to install Rust
1. Open Terminal
Section titled “1. Open Terminal”- You can find Terminal via Spotlight (Cmd+Space, then type
Terminal) or in Applications > Utilities > Terminal.
2. Install Homebrew (if you don’t have it yet)
Section titled “2. Install Homebrew (if you don’t have it yet)”-
Install Homebrew
-
Install it with:
sh
Copy code
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3. Install Rust using the official installer
Section titled “3. Install Rust using the official installer”-
Copy and paste the following into your Terminal:
sh
Copy code
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
This command downloads and starts the rustup installation script.
4. Follow the prompts
Section titled “4. Follow the prompts”- When prompted, press Enter to proceed with the default installation.
5. Restart your shell
Section titled “5. Restart your shell”-
Close Terminal and open it again or run:
sh
Copy code
source $HOME/.cargo/env
6. Verify the installation
Section titled “6. Verify the installation”-
Check that Rust is installed:
sh
Copy code
rustc --version