Useful Commands

Notes on how to use a Geth Client.

All of the alias commands have been defined as aliases in ~/.bashrc wheninstalling Geth.

geth.service

geth-log            # View the geth.service logs
geth-start          # Start the geth.service
geth-stop           # Stop the geth.service
geth-restart        # Restart the geth.service
geth-status         # View the status of the geth.service
geth-version        # Check the version of Geth in use
geth-enable         # Enable the geth.service
geth-disable        # Disable the geth.service
geth-delete-data    # Delete all Geth chain data

geth-config         # Open the /etc/systemd/system/geth.service in vim
daemon-reload       # Reload any changes made to the geth.service

Geth Direct Queries

To make this easier, these commands can be executed directly from the command line without attaching the JS console.

geth-blockNumber
geth-peerCount
geth-nodeInfo

Geth JavaScript Console

Attach to the Geth JavaScript console.

Console commands.

Exit the Geth JavaScript console.

Other Useful Commands

Checks Geth is running.

Check ports can be accessed.

Checks the validator status using the validator's public address.

Check validator status using a public endpoint in a browser.

Data Locations

Geth chaindata location.

Last updated