Setting up Ubuntu on AWS
The plain Ubuntu image that is often used with AWS is very under-configured. Here are a few things to change.
Timezone
This is annoying... the default timezone is set to UTC.
sudo dpkg-reconfigure tzdata
Swap
There is no swap configured, so lets put it on SSD ephemeral driver. By default the ephemeral drive is mounted to /mnt. The commands below will create a 5 GiG swap drive on the ephemeral drive.
sudo chmod 600 /mnt/swapfile
sudo mkswap /mnt/swapfile
sudo swapon /mnt/swapfile```
You might also want to add it to **/etc/fstab**
`/mnt/swapfile swap swap defaults 0 0`
####Hostname
Change the hostname, by default AWS assings an ugly looking hostname such as: ip-10-233-64-xxx.
`sudo pico /etc/hostname`
Remove the name add whatever you would like.
`sudo pico /etc/hosts`
Add this line: `127.0.0.1 name-from-step-1`