Note: Because this is an ongoing series, there is no certificate of completion available for this course.
Skill Level Intermediate
- [Instructor] One great place for experimenting with Linux in the cloud is on Google's Cloud Platform. When you visit cloud.google.com you can sign up for a free trial account which lets you use some cloud resources free of charge up to a certain limit. One nice thing about these cloud platforms is that for small workloads, like you'd use when you're learning about Linux, even if you go beyond your free credit, the cost is usually only cents per day. I've gone through the sign up process and when you complete that process, you'll need to make sure that you have a project created. To set up a small virtual machine, we'll use Compute Engine.
You'll want to find that on the left bar in the console and enable billing for it to start using it. Remember, this is billing against a credit that Google gives you, not really money at this point. Once that's set up, under VM Instances, I'll choose Create. I can set a name for my instance and I can choose which region and zone my virtual machine's in. I'll choose the Los Angeles one and keep it in Zone A. Then I can choose what machine type to make. We'll keep things fairly small here, I'll go with micro and that comes with 600 megabytes of memory.
Further down I can choose which operating system to boot. If I click Change, I'm presented with a list of options. I'll choose Ubuntu 18.04, long-term support minimal. I can also choose which type of disk to use, an SSD or a standard disk. I'll go with standard disk and keep the size at 10 gigabytes. And here I can choose to configure some other options. I won't use those for now though. I'll move down and click Create.
Once my machine's been created, I'll be able to find its external IP and I can open up a console right here in the browser. And here we go. I've got a terminal right in my browser for my machine running on Google Cloud Platform. Let's run a few commands. I'll update my software list and then I'll upgrade whatever's available.
From here I'm ready to get started. I'll click back over to the console and under Connect, I'll click Use Another SSH Client. Here I can find instructions for adding my key to this instance so I can connect from the terminal on my computer. I'll go back to my console and click on my instance. Then I'll click Edit and I'll scroll down. Here I can show and edit my SSH keys. I'll switch over to my local terminal and copy my public key.
I'll scroll down and press Save. Back on my console page, I'll copy the external IP, and switch back to my terminal. I'll write ssh and provide the username that Google pulled out of my key at the IP address and the path to my private key. And there we go.
Two ways of accessing my virtual machine in Google's Cloud.