Overview

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? Updating the Ubuntu Linux AWS instance involves a few simple commands:

Fetches the list of available updates:

Copy to Clipboard
Installs the updates:
Copy to Clipboard
Cleans up /var/cache/apt/archives:
Copy to Clipboard
Removes old kernels:
Copy to Clipboard
Reboots the EC2 instance:
Copy to Clipboard
Although this is quick, we can do better. If a .bash_aliases file is created, it will be processed by .bashrc file upon reboot. Therefore, this is a good place to combine all of these commands into a single alias. To create the .bash_aliases file, enter the following:
Copy to Clipboard
Add this line, which is which is a concatenation of the previous commands, then save file:
Copy to Clipboard
Reboot instance:
Copy to Clipboard
Now, to update Linux, type:
Copy to Clipboard

Other Tips

I will continue to add to this collection of AWS EC2 tips as I discover them!