Unless you need the latest, bleeding edge version of Rust, do apt-cache search rust to see which Ubuntu packages provide which versions of rust. For initial learning, one doesn't need the absolute latest, and it's "best" if you don't "accidentally" find yourself at war (or confusion) with the packaging system.

Answer from waltinator on askubuntu.com
🌐
Rust Programming Language
rust-lang.org › tools › install
Install Rust - Rust Programming Language
See "Other Installation Methods" ... like you’re running Windows. To start using Rust, download the installer, then run the program and follow the onscreen instructions....
🌐
Rust
rustup.rs
rustup.rs - The Rust toolchain installer
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ... You appear to be running Unix. If not, display all supported installers. To install Rust, download and run rustup‑init.exe then follow the onscreen instructions.
Discussions

How to install rust?
Use Rustup: https://rustup.rs/ More on reddit.com
🌐 r/rust
6
0
April 29, 2022
Installing rust in windows without VisualStudio
you need to install the Build Tools (don’t worry, it’s not as heavy as the full IDE) that’ll allow you to build Windows executables using Rust another option would be to install a Linux virtual machine like Debian (with the aid of WSL ), and install the distribution-specific build tools e.g. gcc, clang, etc. and then install rustup in the distro like you would in a normal Linux machine that’ll allow you to make Linux executables, which you then run in the VM my advice would be since you’re just starting out, stick to Windows…it’s far more effort to maintain two OSes than just get the Build Tools once and for all More on reddit.com
🌐 r/rust
29
20
July 10, 2023
proxy - How can I install Rust using rustup on Windows when behind a firewall? - Stack Overflow
Suggested by kennytm, add the following line to the hosts file in c:\Windows\System32\drivers\etc ... Suggested by ljedrz, use a standalone installer. In the past, one could easily find those standalone installers, but with the latest reorg of the rust language site, the only thing really pops out initially is the rustup... More on stackoverflow.com
🌐 stackoverflow.com
How to install rust with clang profile?
The actual emerge segfaults, or running one of the installed binaries segfaults ? In either case, there must be something broken deep in your system, hard to say what from your description, but you'll probably need to rebuild sustem packages. More on reddit.com
🌐 r/Gentoo
13
2
December 9, 2023
🌐
Rust
rust-lang.github.io › rustup › installation › index.html
Installation - The rustup book
rustup installs rustc, cargo, rustup and other standard tools to Cargo’s bin directory. On Unix it is located at $HOME/.cargo/bin and on Windows at %USERPROFILE%\.cargo\bin. This is the same directory that cargo install will install Rust programs and Cargo plugins.
🌐
Rust
rust-lang.github.io › rustup › installation › other.html
Other installation methods - The rustup book
To install rustup from source, check out the git repository from https://github.com/rust-lang/rustup and run cargo run --release. Note that after installation the rustup toolchains will supersede any pre-existing toolchains by prepending ~/.cargo/bin to the PATH environment variable.
🌐
The Rust Programming Language
doc.rust-lang.org › book › ch01-01-installation.html
Installation - The Rust Programming Language
The first step is to install Rust. We’ll download Rust through rustup, a command line tool for managing Rust versions and associated tools.
Top answer
1 of 3
4

Unless you need the latest, bleeding edge version of Rust, do apt-cache search rust to see which Ubuntu packages provide which versions of rust. For initial learning, one doesn't need the absolute latest, and it's "best" if you don't "accidentally" find yourself at war (or confusion) with the packaging system.

2 of 3
2

If not installing system wide, then you should probably be in your user's $HOME directory ~/ instead of / so just run cd or cd ~/ before you run the curl stuff.

Your user does not own or have permission to write files to your current directory which is your root directory /. You can see your current directory indicated before the dollar sign at your prompt kdsouza@bsc-848851112:/$

Any one of the following sets of commands listed below will do the same thing, that is, change to your user's home directory before downloading and running the installation script. Your user's home directory will be indicated by the tilde sign ~ as your current directory shown at ypur prompt kdsouza@bsc-848851112:~$

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

or

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

or

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

Running the cd command with no directory specified (first command) shoud change to your home directory by default.

Alternatively, running the cd command along with a directory will change to whatever directory you specify. Your user's home directory is /home/username/ where username is your current username so probably /home/kdsouza.

$HOME and ~ and ~/ and even /home/$USER will all be interpreted by bash as the same thing, /home/kdsouza. So you can cd to any one of these to get to your home directory.


Either that or there's no space left on your device although it usually says something like no space left on device in the output when that is the case.

To view your available free space, run the following command:

df -h

The -h flag will list the free space in human readable format.

Find elsewhere
🌐
GitHub
github.com › rust-lang › rustup
GitHub - rust-lang/rustup: The Rust toolchain installer · GitHub
Rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between stable, beta, and nightly compilers and keep them updated. It makes cross-compiling simpler with binary builds of the standard library for common platforms.
Starred by 6.9K users
Forked by 1K users
Languages   Rust 91.6% | Shell 3.9% | HTML 1.2% | Dockerfile 1.0% | Python 0.8% | JavaScript 0.7%
🌐
MIT
web.mit.edu › rust-lang_v1.25 › arch › amd64_ubuntu1404 › share › doc › rust › html › book › second-edition › ch01-01-installation.html
Installation - The Rust Programming Language
Additionally, PowerShell specific examples will use > rather than $. If you’re on Linux or a Mac, 99% of what you need to do is open a terminal and type this: ... This will download a script and start the installation of the rustup tool, which installs the latest stable version of Rust.
🌐
Rust Programming Language
rust-lang.org › learn › get-started
Getting started - Rust Programming Language
If you’re a Windows Subsystem for Linux user run the following in your terminal, then follow the on-screen instructions to install Rust. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh Copy
🌐
DigitalOcean
digitalocean.com › community › tutorials › install-rust-on-ubuntu-linux
How To Install Rust on Ubuntu | DigitalOcean
February 24, 2026 - Verify with rustc --version and cargo --version. Install the linker with sudo apt install build-essential. Use rustup update to update; use rustup component add clippy rustfmt for the linter and formatter.
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to install rust on ubuntu
How to Install Rust on Ubuntu
December 9, 2025 - This guide will show you how to install Rust on Ubuntu using an installer script or the APT package manager. ... Ubuntu installed. Command-line access. User with sudo privileges. ... Use the rustup shell script to install the latest version of Rust.
🌐
LinuxConfig
linuxconfig.org › home › how to install rust with rustup on ubuntu 26.04
How to Install Rust with Rustup on Ubuntu 26.04
1 month ago - Install Rust with rustup on Ubuntu 26.04. Set up rustc, cargo, manage toolchains, and create your first Rust project.
🌐
Oreate AI
oreateai.com › blog › installing-rust-with-rustup-a-stepbystep-guide › 620b0f8afed83066308b94dbea27bfc1
Installing Rust With Rustup: A Step-by-Step Guide - Oreate AI Blog
December 19, 2025 - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh · This command downloads and executes the installation script directly from the internet. Once you run this command, follow the on-screen instructions—it's straightforward! You’ll be presented with options to proceed with a default installation or customize settings according to your needs. If you’re on Windows, there are two primary methods for installing Rust via rustup:
🌐
ArchWiki
wiki.archlinux.org › title › Rust
Rust - ArchWiki
1 month ago - Example: the official repos offer ... the build root or placed by a package such as llvm18-libs. rustup is also available to download and install manually via rustup's official web page....
🌐
Medium
medium.com › @pachoyan › installing-rust-on-macos-with-homebrew-and-rustup-the-right-way-8e99a209a8f3
Installing Rust on MacOS with Homebrew (and rustup) the right way | by pachoyan | Medium
September 16, 2024 - If you go into the official docs you will see the official way is to just run · curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh · But you can still install rustup from Homebrew if you prefer so. So lets exaplain that in more detail. If you ever wondered if you can install rust directly using Homebrew, yes you can, but it is not ideal.
🌐
LabEx
labex.io › questions › how-to-install-rust-100383
How to Install Rust Programming Language | LabEx
July 25, 2024 - Learn how to install Rust programming language on Linux, macOS, and Windows using rustup with simple steps for beginners.
🌐
Rust Forge
forge.rust-lang.org › infra › other-installation-methods.html
Other Installation Methods - Rust Forge
On Linux in particular, but also on macOS with Homebrew, MacPorts or pkgsrc, and Windows with Chocolatey or Scoop, developers sometimes prefer to install Rust with their platform’s package manager. Preference against curl | sh. On Unix, we usually install rustup by running a shell script via curl.