> For the complete documentation index, see [llms.txt](https://breskulpeak.gitbook.io/nodeguidebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://breskulpeak.gitbook.io/nodeguidebook/mainnet/altheal1/useful-commands.md).

# Useful commands

### Service operations  <a href="#service-operations" id="service-operations"></a>

Check logs

```bash
sudo journalctl -u althea -f
```

Start service

```bash
sudo systemctl start althea
```

Stop service

```bash
sudo systemctl stop althea
```

Restart service

```bash
sudo systemctl restart althea
```

Check service status

```bash
sudo systemctl status althea
```

Reload services

```bash
sudo systemctl daemon-reload
```

Enable Service

```bash
sudo systemctl enable althea
```

Disable Service

```bash
sudo systemctl disable althea
```

Node info

```bash
althea status 2>&1 | jq
```

Your node peer

```bash
echo $(althea tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.althea/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

```

### Key management <a href="#key-management" id="key-management"></a>

Add New Wallet

```bash
althea keys add $WALLET
```

Restore executing wallet

```bash
althea keys add $WALLET --recover
```

List All Wallets

```bash
althea keys list
```

Delete wallet

```bash
althea keys delete $WALLET
```

Check Balance

```bash
althea q bank balances $WALLET_ADDRESS 
```

Export Key (save to wallet.backup)

```bash
althea keys export $WALLET
```

View EVM Prived Key

```bash
althea keys unsafe-export-eth-key $WALLET
```

Import Key (restore from wallet.backup)

```bash
althea keys import $WALLET wallet.backup
```

### Tokens <a href="#tokens" id="tokens"></a>

**WITHDRAW REWARDS FROM ALL VALIDATORS**

```
althea tx distribution withdraw-all-rewards --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**WITHDRAW COMMISSION AND REWARDS FROM YOUR VALIDATOR**

```
althea tx distribution withdraw-rewards $(althea keys show wallet --bech val -a) --commission --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**DELEGATE TOKENS TO YOURSELF**

```
althea tx staking delegate $(althea keys show wallet --bech val -a) 1000000aalthea --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**DELEGATE TOKENS TO VALIDATOR**

```
althea tx staking delegate <TO_VALOPER_ADDRESS> 1000000aalthea --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**REDELEGATE TOKENS TO ANOTHER VALIDATOR**

```
althea tx staking redelegate $(althea keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000aalthea --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**UNBOND TOKENS FROM YOUR VALIDATOR**

```
althea tx staking unbond $(althea keys show wallet --bech val -a) 1000000aalthea --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**SEND TOKENS TO THE WALLET**

```
althea tx bank send wallet <TO_WALLET_ADDRESS> 1000000aalthea --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

### Governance <a href="#governance" id="governance"></a>

**LIST ALL PROPOSALS**

```
althea query gov proposals
```

**VIEW PROPOSAL BY ID**

```
althea query gov proposal 1
```

**VOTE ‘YES’**

```
althea tx gov vote 1 yes --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**VOTE ‘NO’**

```
althea tx gov vote 1 no --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**VOTE ‘ABSTAIN’**

```
althea tx gov vote 1 abstain --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

**VOTE ‘NOWITHVETO’**

```
althea tx gov vote 1 NoWithVeto --from wallet --chain-id althea_258432-1 --gas-adjustment 1.4 --gas auto --gas-prices 0.002aalthea -y
```

### Validator operations <a href="#validator-operations" id="validator-operations"></a>

Create New Validator

```bash
althea tx staking create-validator \
  --amount 1000000aalthea \
  --from <yourwallet> \
  --commission-max-change-rate "0.1" \
  --commission-max-rate "0.2" \
  --commission-rate "0.1" \
  --min-self-delegation "1" \
  --pubkey  $(althea tendermint show-validator) \
  --moniker $yourMONIKER \
  --chain-id althea_258432-1 \
  --identity="" \
  --details="" \
  --website="" -y
```

Edit Existing Validator

```bash
althea tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "" \
--from $WALLET \
--chain-id althea_258432-1 \
--gas auto --gas-adjustment 1.5 \
-y 
```

Validator info

```bash
althea status 2>&1 | jq
```

Validator Details

```bash
althea q staking validator $(althea keys show $WALLET --bech val -a) 
```

Jailing info

```bash
althea q slashing signing-info $(althea tendermint show-validator) 
```

Slashing parameters

```bash
althea q slashing params 
```

Unjail validator

```bash
althea tx slashing unjail --from $WALLET --chain-id althea_258432-1 --gas auto --gas-adjustment 1.5 -y 
```

Active Validators List

```bash
althea q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 
```

Check Validator key

```bash
[[ $(althea q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(arkhd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
```

Signing info

```bash
althea q slashing signing-info $(althea tendermint show-validator) 

```

**REMOVE NODE**<br>

```
cd $HOME
sudo systemctl stop althea .service
sudo systemctl disable althea .service
sudo rm /etc/systemd/system/althea .service
sudo systemctl daemon-reload
rm -f $(which althea)
rm -rf $HOME/.althea
rm -rf $HOME/althea
```
