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.
geth-attach
Console commands.
eth.syncing // Check if Geth is syncing
eth.blockNumber // Show the current block number
eth.getTransaction("0x000...." // Get details of a specific transaction
eth.syncing.highestBlock - eth.syncing.currentBlock // Distance remaining to sync
net.listening // Report whether the Geth node is listening for inbound requests
net.peerCount // Show number of active peers
admin.peers // Show info about all peers
admin.peers[0] // Show info about specific peer
admin.nodeInfo // Show info about your own node
admin.peers.map((el) => el.network.inbound) // You should see both true and false values meaning that your node is discoverable in the P2P network. If you’re seeing only false, you probably did not publicly expose the TCP and UDP port
blockInfo() // Show information about the current block
blockInfo().totalDifficulty // Show the current block total difficulty