For many software developers, Amazon Web Services (AWS) and Ubuntu Linux are our world. The Ubuntu instances on AWS have exceptionally performance, have almost unbelievable reliability, and are surprisingly affordable. Establishing a server on an AWS EC2 Ubuntu instance can be a little intimidating at first to setup, configure, backup, and operate. As such, there are numerous Ubuntu Linux tips and short-cuts that one learns on this development journey. Here is my growing list:
Updates to Ubuntu
What if after accessing the AWS EC2 Ubuntu instance using SSH via terminal (mac) or PuTTY (Windows), the login result to the Ubuntu instance shows a message about pending updates similar to the login below?
Updating the Ubuntu Linux AWS instance involves a few simple commands:
Fetches the list of available updates:
Installs the updates:
Cleans up /var/cache/apt/archives:
Removes old kernels:
Reboots the EC2 instance:
Getting Information on Disk Storage and CPU Utilization
It is important to understand how much disk storage and memory is being use and how much CPU is being utilized. Here are two commands and their typical responses on an AWS EC2 ‘t2.micro‘ instance.
Provide a list of storage devices with usage information:
Provide memory usage and CPU utilization information (use ctrl-c to exit top):
I will continue to add to this collection of AWS EC2 tips as I discover them!