How to Change the Root Password

You need to use ec2-user to ssh to the instance created by Amazon Linux version of Amimoto.
So you have to use sudo command when you need the root authority.
If you don’t like using the sudo command every time you need, you can set up the root password and be able to use the su command.

After logging in as ec2-user, you can change the root password as below:

$ sudo passwd

Using the password changed here, now you can be a root user with the su command.

$ su -
password:    ← enter the password.
#