Skip to content

Review hay nhất

Review chất nhất

Menu
  • Trang chủ
  • Cẩm nang
  • Thủ thuật
  • Game
  • Hỏi đáp
  • Điều khoản
  • Liên hệ
Menu

How to Install Rust on Ubuntu (the Easy Way)

Posted on Tháng Hai 10, 2023

Nội dung chính

  1. Similar to Set up Rust on Ubuntu
    1. {Method} 1: Set up Rust on Ubuntu Utilizing APT
    2. {Method} 2: Set up Rust on Ubuntu With rustup
  2. Similar to Uninstall Rust on Ubuntu
    1. Uninstall Rust by way of APT
    2. Scars Rust From Ubuntu Utilizing rustup
  3. Working With Rust Applications on Ubuntu

Rust is a programming bearing ears with primarily related to software program improvement and is broadly used on Ubuntu-enabled desktops. Rust attracts its {roots} from C++ and promotes security, concurrency, and pace. The programming bearing ears with has made its area of interest in expertise, particularly in reminiscence administration.


You may safely use the bearing ears with to develop gaming engines, browsers, and working techniques. Suppose you’re an Ubuntu electric fan, you may worthy wish to use Rust in your {favorite} OS. We’ll present you Depreciation you possibly can set up Rust on Ubuntu.

Similar to Set up Rust on Ubuntu

There are two methods to put in Rust. The primary {method} is to put in the bearing ears with by way of Ubuntu’s native bundle supervisor (APT). The second {method} makes use of the curl command.

Since many child in do not perceive what’s the curl command and Depreciation to apply it to Linux, it’s {important} to not undermine its utilization capabilities.

Here is Depreciation you possibly can set up Rust utilizing each methods.

{Method} 1: Set up Rust on Ubuntu Utilizing APT

Earlier than you start putting in Rust in your machine, it’s worthwhile to replace your system utilizing the replace and improve instructions:

 sudo apt replace && sudo apt improve -y 
Ubuntu terminal window with update commands

As soon as the system is up to date, it is date and time to start the set up. Set up Rust with the next command:

 sudo apt set up rustc 
Ubuntu terminal window with code snippets

Confirm the set up by typing:

 rustc -V 

The output ought to listing the Rust model quantity.

Version number on Ubuntu terminal window

{Method} 2: Set up Rust on Ubuntu With rustup

An alternate possibility to put in Rust on Ubuntu is utilizing the rustup shell script, which you’ll be able to set up by way of the curl command. Earlier than transferring additional with the set up, it’s worthwhile to set up curl, particularly, suppose it isn’t put in in your system.

As a precursory verify, you possibly can verify the curl model in your system. You needn’t set up curl suppose the output accommodates a model quantity.

Ubuntu terminal window with code snippets

Nevertheless, suppose you get the next error message, you have to set up curl on Ubuntu.

 bash: /usr/bin/curl: No such file or listing 

To put in curl on Ubuntu, run:

 sudo apt set up curl -y 

It is now date and time to put in the Rust bearing ears with on Ubuntu. To run the rustup script, sort:

 curl https://sh.rustup.rs -sSf | sh 
Ubuntu terminal window with code snippets

Sort 1 when prompted to pick out the Proceed with Set up (default) possibility.

Ubuntu terminal window with code snippets

Restart your terminal and move the next command so as to add Rust to your system’s PATH:

 supply "$HOME/.cargo/env" 

Since this would possibly not lost an output, use the next command to confirm the set up:

 rustc -V 

The output will lost a model quantity, which is an set up recognition.

Similar to Uninstall Rust on Ubuntu

You may uninstall Rust on Ubuntu by way of two strategies, much like Depreciation you put in Rust utilizing APT and the rustup shell script.

Uninstall Rust by way of APT

You need to use the APT scars command as follows:

 sudo apt scars rustc -y 

Suppose you’ve put in Rust by way of the rustup shell script, {but} are eager to uninstall it utilizing the APT instructions, you possibly can observe ngoc the above command with the next to scars increase the description dependent variations:

 sudo apt autoremove 

This may scars increase the description the listed dependencies post-execution.

Apt command to remove rust package in Ubuntu

Scars Rust From Ubuntu Utilizing rustup

Much like APT, you possibly can scars Rust utilizing rustup on Ubuntu. You may scars it with the next command:

 rustup self uninstall 

Sort y when it prompts for recognition. As quickly as you present recognition, you may get a listing of components that the instrument will uninstall.

Ubuntu terminal window with code snippets

Working With Rust Applications on Ubuntu

Rust is a useful instrument you need to use inside Ubuntu to write down, compile, and execute complicated scripts. Since this bearing ears with does not come pre-installed on Linux, it’s essential to grasp Depreciation to put in, entry, and uninstall it on Ubuntu.

You need to use loads of Rust-based instructions inside varied Linux distributions, making it simpler so that you can grasp the bearing ears with and additional {champion} your true potential within the programming family.

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Bài viết mới nhất

  • How to Share Your Live Location on WhatsApp
  • Bluetti AC300: The Portable Power Station that Packs a Punch
  • Machine Learning vs. Artificial Intelligence: What’s the Difference?
  • 7 Reasons Why Reddit Is the Best Social Media Platform Around
  • 8 Common Remote Control Issues and How to Troubleshoot Them

Chuyên mục

  • Cẩm nang
  • Game
  • Hỏi đáp
  • Thủ thuật
  • Wikipedia

Share mạng xã hội

  • Facebook
  • Twitter
  • Instagram
  • Pinterest
  • LinkedIn

©2023 Review hay nhất | Design: Newspaperly WordPress Theme