Installing RUST in Ubuntu 22.04 LTS

How to install RUST in Ubuntu

First run the update command

				
					sudo apt get update
				
			

Now run the following command to install latest RUST

				
					sudo apt install rustc
				
			

Check the installation with the following command.

				
					rustc --version
				
			

This should give you the version of RUST which is installed in your system

Let’s add RUST to your system path.

Add the following line to your bash profile 

vi ~/.bashrc

Then add the below line to it, save it and re-open a new shell.

				
					export PATH="$HOME/.cargo/bin:$PATH"
				
			

How to update RUST

You can update RUST using the rustup command.

				
					rustup update

				
			

How to specifically install a particular version of RUST

Use the following command 

				
					rustup install 1.58
				
			

How to UnInstall RUST from Ubuntu

To uninstall RUST from apt  package manager. Use the below command

				
					sudo apt remove rustc
				
			

To remove RUST completely from the system

				
					rustup self uninstall
				
			

Share

Facebook
Twitter
Pinterest
LinkedIn

Follow us on

Related Posts

You may also like