Install Rust offline on WSL2.

Yash
2 min readSep 16, 2022

--

Github & other sites are blocked in my organization. Why? I use wsl2 environment for development. I ❤ linux.

Photo by Venti Views on Unsplash

According to RUST Site. For installing you have to enter the following command.

Rust installation wsl2 command

But this command gave me an ssl error as

curl: (60) SSL certificate problem: unable to get local issuer certificate

So alternate way is to install it offline.

To Install offline, the community has provided installers here.

For my system 64-bit operating system, x64-based processor.

I downloaded — x86_64-unknown-linux-gnu.tar.gz stable build.

Installation

Note — You will require another device with an internet connection (Not connected to your organization network). It can be your mobile phone too.

1. Download the file on another device. (While downloading on organization’s network the file download is auto cancelled.)

2. Transfer the file from another device into organization’s device by MS Teams. One Drive or any other source, and store it in Downloads folder.

3. Open wsl2 and move this file into wsl2 by the following command.

mv /mnt/c/Users/Suyash/Downloads/rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz $HOME
Command to move file to wsl2 home directory. Modify your file path accordingly.

4. Unzip file using the following command

tar -xvf rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz
Change file name accordingly.

5. Go into directory.

cd rust-1.65.0-x86_64-unknown-linux-gnu/
change directory name accordingly

6. Install Rust command.

sudo sh install.sh
execute install command

7. Check installation by below command.

cargo --version
version test

Optional— Delete residual files and folder

Folder

rm -r rust-1.65.0-x86_64-unknown-linux-gnu

File

 unlink rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz

--

--