# # How to delegate to P-OPS Validator using Ledger Nano S + CLI

## Download Harmony CLI tool

### 1. For Linux <a href="#id-1-for-linux" id="id-1-for-linux"></a>

Enter the following command into your shell of choice:

```
curl -LO https://harmony.one/hmycli && mv hmycli hmy && chmod +x hmy
```

If you have permission issues, enter the commands with "sudo" at the beginning, i.e. "sudo curl -LO <https://harmony.one/hmycli> && sudo mv hmycli hmy && sudo chmod +x hmy"

### 2. For MacOS <a href="#id-2-for-macos" id="id-2-for-macos"></a>

`hmy` depends on some dynamic libraries, hence we recommend using the shell wrapper. Enter there commands into your terminal:

```
curl -O https://raw.githubusercontent.com/harmony-one/go-sdk/master/scripts/hmy.shchmod u+x hmy.sh./hmy.sh -d
```

Now you can use `hmy.sh` as a wrapper over `hmy` and you should assume that all references to `hmy` in these documents refer to `hmy.sh`. For example, the command `./hmy` becomes `./hmy.sh --` .

Note that since `hmy` is not statically linked, you cannot arbitrarily move `hmy.sh` to anywhere on your filesystem like you could with a single binary.

## Interacting with Ledger to delegate to P-OPS validator <a href="#interacting-with-ledger-to-delegate-to-p-ops-validator" id="interacting-with-ledger-to-delegate-to-p-ops-validator"></a>

When using Ledger with HMY CLI, the only difference here is that you have to add parameter `--ledger`on every command.

With that in mind, you can run any other command via HMY CLI using your Ledger.

Make sure HMY CLI is being run with super user permissions when interacting with Ledger.

Below, are a few practical examples on how to interact with your Ledger device.

### 1. Displaying your Address <a href="#id-1-displaying-your-address" id="id-1-displaying-your-address"></a>

For example, if you want to show your Ledger address you would simply run:

```
./hmy keys list --ledger
```

### 2. Displaying your Balance <a href="#id-2-displaying-your-balance" id="id-2-displaying-your-balance"></a>

```
./hmy balances --node=https://api.s0.t.hmny.io <ONE-address> --ledger
```

### 3. Sending Delegation to P-OPS Validator (the address is **one1kf42rl6yg2avkjsu34ch2jn8yjs64ycn4n9wdj)** <a href="#id-3-sending-delegation-to-p-ops-validator-the-address-is-one-1-kf-42-rl-6-yg-2-avkjsu-34-ch-2-jn-8-yjs" id="id-3-sending-delegation-to-p-ops-validator-the-address-is-one-1-kf-42-rl-6-yg-2-avkjsu-34-ch-2-jn-8-yjs"></a>

```
./hmy --node="https://api.s0.t.hmny.io" staking delegate --delegator-addr <ONE_address> --validator-addr one1kf42rl6yg2avkjsu34ch2jn8yjs64ycn4n9wdj --amount 1000 --passphrase --ledger
```

For a complete reference of all commands available, please check the HMY CLI [cookbook](https://docs.harmony.one/home/wallets/harmony-cli/cookbook).
