Skip to content

Instantly share code, notes, and snippets.

@kosyfrances
Last active January 7, 2016 08:53
Show Gist options
  • Save kosyfrances/704e7c9b6924292a3a89 to your computer and use it in GitHub Desktop.
Save kosyfrances/704e7c9b6924292a3a89 to your computer and use it in GitHub Desktop.
Setting up and launching an Amazon EC2 ubuntu instance.

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizeable computing capacity—literally, servers in Amazon's data centers—that you use to build and host your software systems.

If you are new to Amazon EC2. First set up using this link. http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html

Then launch and connect to your new instance using this http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html

If you need to create a nonroot user, here’s how:

# these commands must be run as root
root@server:$ useradd -m -s /bin/bash elspeth # add user named elspeth
# -m creates a home folder, -s sets elspeth to use bash by default root@server:$ usermod -a -G sudo elspeth # add elspeth to the sudoers group root@server:$ passwd elspeth # set password for elspeth
root@server:$ su - elspeth # switch-user to being elspeth!
elspeth@server:$

Name your own user whatever you like! You might need to use sudo. (Copied from Test Driven Development with Python book)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment