> For the complete documentation index, see [llms.txt](https://service.block-pro.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://service.block-pro.net/testnet/lava/useful-commands.md).

# Useful Commands

Everyday Lava service, wallet and validator commands.

**Testnet · `lava-testnet-2`**

Commands use the `wallet` key name. Transaction examples ask for confirmation. Replace quoted address placeholders and review amounts before signing. `1 LAVA = 1,000,000 ulava`.

## Service operations

### Status

Check the systemd unit.

```bash
sudo systemctl status lavad --no-pager
```

### Logs

Follow recent logs.

```bash
sudo journalctl -u lavad -f -o cat
```

### Restart

Restart the node process.

```bash
sudo systemctl restart lavad
```

### Stop

Stop the node.

```bash
sudo systemctl stop lavad
```

### Start

Start the node.

```bash
sudo systemctl start lavad
```

### Sync status

Check height and catching\_up.

```bash
curl -fsS http://127.0.0.1:26657/status | jq '.result.sync_info'
```

### Version

Show the installed binary version.

```bash
lavad version --long
```

## Key management

### Create

Create a wallet and securely store its recovery phrase.

```bash
lavad keys add wallet
```

### Recover

Import a wallet interactively.

```bash
lavad keys add wallet --recover
```

### List

List local keys.

```bash
lavad keys list
```

### Address

Show the account address.

```bash
lavad keys show wallet -a
```

### Balance

Query token balances.

```bash
lavad query bank balances "$(lavad keys show wallet -a)"
```

## Tokens

### Send

Send 1 token to the chosen recipient.

```bash
lavad tx bank send wallet "RECIPIENT_ADDRESS" 1000000ulava --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.05ulava
```

### Delegate

Delegate 1 token to a validator.

```bash
lavad tx staking delegate "VALIDATOR_ADDRESS" 1000000ulava --from wallet --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.05ulava
```

### Withdraw rewards

Withdraw delegation rewards.

```bash
lavad tx distribution withdraw-all-rewards --from wallet --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.05ulava
```

## Validator operations

### Details

Query your validator record.

```bash
lavad query staking validator "$(lavad keys show wallet --bech val -a)"
```

### Commission and rewards

Withdraw rewards and validator commission.

```bash
lavad tx distribution withdraw-rewards "$(lavad keys show wallet --bech val -a)" --commission --from wallet --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.05ulava
```

### Unjail

Use only after correcting the cause of jailing and meeting unjail conditions.

```bash
lavad tx slashing unjail --from wallet --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.05ulava
```

## Governance

### Proposals

List governance proposals.

```bash
lavad query gov proposals
```

### Vote

Replace 123 with the proposal you have reviewed.

```bash
lavad tx gov vote 123 yes --from wallet --chain-id lava-testnet-2 --gas auto --gas-adjustment 1.5 --gas-prices 0.05ulava
```
