Course Content
Introduction to Cloud Computing
Introduction to Cloud Computing
Basics of Working with EC2 Instance
Let's start working with the instance. As you might have gathered from the previous chapter, all the work with the instance will be done in a Linux system, and we'll manage it through the console. We'll be using the bash language to manage the instance, which you can also use to control your computer.
Let's take a look at the list of basic navigation commands in bash to understand what we'll be doing next:
Installation of Updates and Programs
We need to ensure that all required updates are installed on the system. We'll accomplish this with the following command:
After running this command, the system will begin automatically updating and installing the required components:
As you can see, in my case, there was nothing to download, and everything was already installed. However, it's strongly recommended to run this command during the initial setup of the instance to avoid future errors.
Since we own this instance and have the right to do whatever we want with it, we can safely switch to the root user.
To switch to superuser mode, use the command:`
Now, we can try running some commands on our instance.
For example, let's create a directory called test_folder
. Inside this directory, we'll create a file called README.txt
and write "This is an EC2 instance!" in it.
Our commands will look like this:
mkdir test_folder
: create a folder with the desired name;cd test_folder/
: navigate to the folder we just created;touch README.txt
: create a file with the desired name and extension;echo "This is an EC2 instance!" > README.txt
: write the desired text to the corresponding file;cat README.txt
: display the contents of the text file we created.
As a result, the following will be printed to the console:
So, we can now manage our instance through the console.
1. What command do you use to change the current directory to a specified path?
2. How would you update your system and install necessary components using the command line?
Thanks for your feedback!