Create an Account

Install the Aptos CLI if you haven't.

After installing the CLI binary, create and fund an account on the Aptos blockchain.


Start a new terminal and run the following command to initialize a new local account:


aptos init

You will see output asking to choose a network:


Choose network from [devnet, testnet, mainnet, local, custom | defaults to devnet]

Press return to accept the default devnet network or specify the network of your choosing:


No network given, using devnet...

See and respond to the prompt for your private key by accepting the default to create a new or by entering an existing key:


Enter your private key as a hex literal (0x...) [Current: None | No input: Generate new key (or keep one if present)]


Assuming you elected to create a new, you will see:


No key given, generating key...
Account f486f98dc913695297edf071747a13e94ac4c2addab795aa83c8720c28412ccd doesn't exist, creating it and funding it with 100000000 Octas
Account f486f98dc913695297edf071747a13e94ac4c2addab795aa83c8720c28412ccd funded successfully
---
Aptos CLI is now set up for account 0xf486f98dc913695297edf071747a13e94ac4c2addab795aa83c8720c28412ccd as profile default! Run `aptos --help` for more information about commands
{
"Result": "Success"
}

You can check the account balance on explorer

Example

The account address in the above output 0xf486f98dc913695297edf071747a13e94ac4c2addab795aa83c8720c28412ccd is your new account and is aliased as the profile default. This account address will be different for you as it is generated randomly.

From now on, either default or 0xa345dbfb0c94416589721360f207dcc92ecfe4f06d8ddc1c286f569d59721e5a are used interchangeably in this document. Of course, substitute your own address as needed.

Now fund this account by running this command:


aptos account fund-with-faucet --account default

You will see output resembling:


{
"Result": "Added 100000000 Octas to account f486f98dc913695297edf071747a13e94ac4c2addab795aa83c8720c28412ccd"
}