Accounts play a central role bitcoin datadir mac Ethereum. Here we focus on externally owned accounts, which will be referred to simply as accounts.
This generic notion of account subsuming both externally owned accounts and contracts is justified in that these entities are so called state objects. These entities have a state: accounts have balance and contracts have both balance and contract storage. The state of all accounts is the state of the Ethereum network which is updated with every block and which the network really needs to reach a consensus about. Accounts use public key cryptography to sign transaction so that the EVM can securely validate the identity of a transaction sender. Every account is defined by a pair of keys, a private key and public key. Accounts are indexed by their address which is derived from the public key by taking the last 20 bytes. Keyfiles are JSON text files which you can open and view in any text editor.
Make sure you backup your keyfiles regularly! Creating a key is tantamount to creating an account. Of course your new account will not contain any Ether. But it’ll be yours and you can be certain that without your key and your password, nobody else can ever access it.
It is safe to transfer the entire directory or any individual keyfile between Ethereum nodes. Note that in case you are adding keyfiles to your node from a different node, the order of accounts may change. So make sure you do not rely or change the index in your scripts or code snippets. Remember your passwords and :ref:`backup your keyfiles `. In order to send transactions from an account, including sending ether, you must have BOTH the keyfile and the password.
Be absolutely sure to have a copy of your keyfile AND remember the password for that keyfile, and store them both as securely as possible. Your new account is locked with a password. The data in the file consists of the raw bytes of the password optionally followed by a single newline. It is a bad idea to save your password to file or expose it in any other way. The order of accounts when listing, is lexicographic, but as a consequence of the timestamp format, it is actually order of creation. The console allows you to interact with your local node by issuing commands. This shows that you have no accounts.