Hello everyone.
In this video I am going to download and install Visual Studio code on Linux.
In this case I am running Ubuntu 20.0 for Ltsc.
As you can see up here on the left top corner, Visual Studio code is available for lots of Linux distributions.
So first order of business.
Absolutely.
Be sure that your compiler toolchain has already been installed and it's working.
You can check that by opening up a terminal session.
And just typing G plus plus dash dash version.
And you should get some sort of display message that says G plus plus was a version number and so forth.
If you get an error here, double check that your compiler is installed.
Go back to section two of the course and refer to the videos there where I show you how to install your
compiler toolchain on Linux.
So I'm assuming that that's installed and it's all good to go.
The next step is to actually install Visual Studio code.
Open up your favorite browser and head over to code Visual Studio and you'll see a page that looks like
this.
There are lots of distributions of Visual Studio code for Linux, so if you click over here on the download
button.
You can see we've got for debian ubuntu, red hat, fedora, all kinds of different distributions.
What I'm going to do is I'm going to make it really easy on myself.
I'm assuming that if you know Linux and if you're working with Linux, you know how to use package managers,
you know how to install software.
So what I'm going to do is I'll make it really easy on myself.
I'm going to select the Snap store.
That's going to take me another page where I could just click install over here on the right top with
this green button.
And I've got a couple of choices.
I can view it in my desktop store, which is this guy right there, my ubuntu software or I can install
snap if you like.
If you don't have snap installed, you can install it.
So I'm just going to view it in the desktop store.
I'm going to choose my application which is the Ubuntu store.
You can use Snap store if you want.
I'll just open the link and that's going to take me right here.
Let me minimize my browser window.
I don't need it anymore and now I'm just going to install just going to click install.
You put in my password.
And that's it.
Now it's installing Visual Studio code.
It's done.
So what I need to do now is basically just close up this window.
And run it.
So let me go down here and you should see Visual Studio code installed now.
There it is right here.
Click on that.
And when Visual Studio first loads up, you'll get a screen that looks something like this.
It's a getting started page with some information about opening files and so forth, and we'll do that
in a little bit.
But before we do that, we need to install an extension, the C++ extension, which will allow Visual
Studio code to work with C++.
So what we want to do is we want to come over here on the left and select these icons, this icon right
here, extensions.
You want to select that, and now you're going to get a bunch of choices.
You can see that the installed extensions are zero as I haven't installed anything, I've just installed
Visual Studio code fresh out of the box.
So there are no extensions installed.
The one we want to install is this one right here, the C C++ extension from Microsoft.
It should be under popular.
If you don't see it, you can type C++ in the search box and press enter.
And then you'll see it right away.
So if you just select that this is the one you'll know because it's this big circle with some purple,
white and black and it says C, C plus, plus Microsoft with just over 20 million downloads at the time
of this recording.
That's the one we want.
We want to select, install, and you'll see the installation proceed down here on the right.
Once it's finished.
We are good to go.
So just give it a few minutes to finish.
Don't interrupt it.
Just let it do its thing.
Okay.
So it's done.
We'll close this up.
And we will go back here to explore.
And we're good to go.
So the next thing we're going to do is we're going to create a folder.
And inside that folder, we're going to create a project which is going to include a real simple C++
program that will allow us to configure Visual Studio code so that we'll build, run and debug that
file.
So I'll see you in the next video to do that.