{"id":11703,"date":"2022-01-20T17:11:18","date_gmt":"2022-01-20T22:11:18","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=11703"},"modified":"2022-01-20T17:11:20","modified_gmt":"2022-01-20T22:11:20","slug":"how-to-install-rust-on-debian-11-using-installer-script","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/","title":{"rendered":"How to Install Rust on Debian 11 Using Installer Script"},"content":{"rendered":"\n

This is the tutorial where you will learn how to install Rust on Debian 11 Linux system. We will be using the terminal and a non-root user with sudo privileges.<\/p>\n\n\n\n

Rust<\/a> is a multi-paradigm, general-purpose programming language<\/a> designed for performance, efficiency, and safety, especially with regards to concurrency. Like C++ it contains no garbage collector and is also syntactically similar but unlike C++ it is type-safe. See more details here<\/a>.<\/p>\n\n\n\n

Install Rust on Debian 11<\/p>\n\n\n\n

Step 1<\/strong>: Update the package list and upgrade any packages.<\/p>\n\n\n\n

$ sudo apt update && sudo apt upgrade<\/code><\/pre>\n\n\n\n

Step 2<\/strong>: Install the compiler and other build tools.<\/p>\n\n\n\n

$ sudo apt install curl build-essential gcc make<\/code><\/pre>\n\n\n\n

Step 3<\/strong>: Install Rust Programming Language on the Debian<\/a> system from the installation script.<\/p>\n\n\n\n

wget -qO - https:\/\/sh.rustup.rs | sudo RUSTUP_HOME=\/opt\/rust CARGO_HOME=\/opt\/rust sh -s -- --no-modify-path -y<\/code><\/pre>\n\n\n\n

Step 4<\/strong>: Execute the following commands to add the rust environment variables.<\/p>\n\n\n\n

echo 'export RUSTUP_HOME=\/opt\/rust' | sudo tee -a \/etc\/profile.d\/rust.sh\necho 'export PATH=$PATH:\/opt\/rust\/bin' | sudo tee -a \/etc\/profile.d\/rust.sh<\/code><\/pre>\n\n\n\n

Step 5<\/strong>: Configure the current shell by running the following command.<\/p>\n\n\n\n

$ source \/etc\/profile\n$ echo $RUSTUP_HOME\n$ echo $PATH<\/code><\/pre>\n\n\n\n

Now let’s confirm the installation by running the following command.<\/p>\n\n\n\n

$ rustc --version\n\nOutput\nrustc 1.53.0<\/code><\/pre>\n\n\n\n

Write Your First Rust Program<\/h2>\n\n\n\n

Let’s write a simple rust program to display text to screen.<\/p>\n\n\n\n

$ mkdir ~\/projects\n$ cd ~\/projects\n$ mkdir hello_world\n$ cd hello_world<\/code><\/pre>\n\n\n\n

Create a new file with the .rs<\/code> extension.<\/p>\n\n\n\n

$ sudo nano hello_world.rs<\/code><\/pre>\n\n\n\n

Add the following function to the file.<\/p>\n\n\n\n

fn main() {\n    println!("Hello, world!");\n}<\/code><\/pre>\n\n\n\n

Compile and run the program.<\/p>\n\n\n\n

$ rustc hello_world.rs \n$ .\/hello_world<\/code><\/pre>\n\n\n\n

Here’s your output.<\/p>\n\n\n\n

Hello, world!<\/code><\/pre>\n\n\n\n

That’s how to install Rust on Debian 11 using the install script. We have prepared a guide where you can install Rust on Ubuntu 20.04<\/a> using apt package manager.<\/p>\n","protected":false},"excerpt":{"rendered":"

This is the tutorial where you will learn how to install Rust on Debian 11 Linux system. We will be using the terminal and a non-root user with sudo privileges….<\/p>\n","protected":false},"author":1,"featured_media":11711,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,27,16,18],"tags":[111,183,350,424,433,449,471,515,526,544,545,591],"yoast_head":"\nUse This Script to Install Rust on Debian 11 Linux System<\/title>\n<meta name=\"description\" content=\"In this tutorial, we show how to install Rust on Debian 11 Linux systems using the installer script for this systems programming language\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use This Script to Install Rust on Debian 11 Linux System\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we show how to install Rust on Debian 11 Linux systems using the installer script for this systems programming language\" \/>\n<meta property=\"og:url\" content=\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/\" \/>\n<meta property=\"og:site_name\" content=\"Brightwhiz.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/brightwhiz\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-20T22:11:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-20T22:11:20+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Bright\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:site\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Bright\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/\"},\"author\":{\"name\":\"Michael Bright\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\"},\"headline\":\"How to Install Rust on Debian 11 Using Installer Script\",\"datePublished\":\"2022-01-20T22:11:18+00:00\",\"dateModified\":\"2022-01-20T22:11:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/\"},\"wordCount\":212,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg\",\"keywords\":[\"C++\",\"Debian\",\"Libraries\",\"Open Source\",\"Optimization\",\"Performance\",\"Programming\",\"Rust\",\"Security\",\"Software development\",\"Software Engineering\",\"Tools\"],\"articleSection\":[\"Articles\",\"Guides\",\"How To\",\"Programming\",\"Technology\",\"Tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/\",\"url\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/\",\"name\":\"Use This Script to Install Rust on Debian 11 Linux System\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg\",\"datePublished\":\"2022-01-20T22:11:18+00:00\",\"dateModified\":\"2022-01-20T22:11:20+00:00\",\"description\":\"In this tutorial, we show how to install Rust on Debian 11 Linux systems using the installer script for this systems programming language\",\"breadcrumb\":{\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg\",\"width\":1280,\"height\":680,\"caption\":\"Install Rust on Debian 11\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/local.brightwhiz\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Rust on Debian 11 Using Installer Script\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/local.brightwhiz\/#website\",\"url\":\"http:\/\/local.brightwhiz\/\",\"name\":\"Brightwhiz.com\",\"description\":\"Best Tech guides, Tutorials, and News\",\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/local.brightwhiz\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/local.brightwhiz\/#organization\",\"name\":\"Brightwhiz\",\"url\":\"http:\/\/local.brightwhiz\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"width\":706,\"height\":135,\"caption\":\"Brightwhiz\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/brightwhiz\/\",\"https:\/\/x.com\/brightwhizmag\",\"https:\/\/instagram.com\/bright_whiz\/\",\"https:\/\/www.pinterest.com\/sobbayi\/\",\"https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\",\"name\":\"Michael Bright\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"caption\":\"Michael Bright\"},\"sameAs\":[\"https:\/\/sobbayi.com\"],\"url\":\"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Use This Script to Install Rust on Debian 11 Linux System","description":"In this tutorial, we show how to install Rust on Debian 11 Linux systems using the installer script for this systems programming language","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/","og_locale":"en_US","og_type":"article","og_title":"Use This Script to Install Rust on Debian 11 Linux System","og_description":"In this tutorial, we show how to install Rust on Debian 11 Linux systems using the installer script for this systems programming language","og_url":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/","og_site_name":"Brightwhiz.com","article_publisher":"https:\/\/www.facebook.com\/brightwhiz\/","article_published_time":"2022-01-20T22:11:18+00:00","article_modified_time":"2022-01-20T22:11:20+00:00","og_image":[{"width":1280,"height":680,"url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg","type":"image\/jpeg"}],"author":"Michael Bright","twitter_card":"summary_large_image","twitter_creator":"@brightwhizmag","twitter_site":"@brightwhizmag","twitter_misc":{"Written by":"Michael Bright","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#article","isPartOf":{"@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/"},"author":{"name":"Michael Bright","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32"},"headline":"How to Install Rust on Debian 11 Using Installer Script","datePublished":"2022-01-20T22:11:18+00:00","dateModified":"2022-01-20T22:11:20+00:00","mainEntityOfPage":{"@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/"},"wordCount":212,"commentCount":0,"publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"image":{"@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg","keywords":["C++","Debian","Libraries","Open Source","Optimization","Performance","Programming","Rust","Security","Software development","Software Engineering","Tools"],"articleSection":["Articles","Guides","How To","Programming","Technology","Tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/","url":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/","name":"Use This Script to Install Rust on Debian 11 Linux System","isPartOf":{"@id":"http:\/\/local.brightwhiz\/#website"},"primaryImageOfPage":{"@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage"},"image":{"@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg","datePublished":"2022-01-20T22:11:18+00:00","dateModified":"2022-01-20T22:11:20+00:00","description":"In this tutorial, we show how to install Rust on Debian 11 Linux systems using the installer script for this systems programming language","breadcrumb":{"@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#primaryimage","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2022\/01\/Install-Rust-on-Debian-1.jpg","width":1280,"height":680,"caption":"Install Rust on Debian 11"},{"@type":"BreadcrumbList","@id":"http:\/\/local.brightwhiz\/how-to-install-rust-on-debian-11-using-installer-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/local.brightwhiz\/"},{"@type":"ListItem","position":2,"name":"How to Install Rust on Debian 11 Using Installer Script"}]},{"@type":"WebSite","@id":"http:\/\/local.brightwhiz\/#website","url":"http:\/\/local.brightwhiz\/","name":"Brightwhiz.com","description":"Best Tech guides, Tutorials, and News","publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/local.brightwhiz\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/local.brightwhiz\/#organization","name":"Brightwhiz","url":"http:\/\/local.brightwhiz\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","width":706,"height":135,"caption":"Brightwhiz"},"image":{"@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/brightwhiz\/","https:\/\/x.com\/brightwhizmag","https:\/\/instagram.com\/bright_whiz\/","https:\/\/www.pinterest.com\/sobbayi\/","https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ"]},{"@type":"Person","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32","name":"Michael Bright","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","caption":"Michael Bright"},"sameAs":["https:\/\/sobbayi.com"],"url":"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/"}]}},"_links":{"self":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/11703"}],"collection":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/comments?post=11703"}],"version-history":[{"count":0,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/11703\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media\/11711"}],"wp:attachment":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media?parent=11703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/categories?post=11703"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/tags?post=11703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}