I have the same situation on 2022-08-16.
To get the available accounts, I use the npx hardhat node
command.
The command sequence I performed was:
$ npx hardhat --version
2.10.1
$ npx hardhat accounts
Error HH303: Unrecognized task accounts
For more info go to https://hardhat.org/HH303 or run Hardhat with --show-stack-traces
$ npx hardhat node
Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/
Accounts
========
WARNING: These accounts, and their private keys, are publicly known.
Any funds sent to them on Mainnet or any other live network WILL BE LOST.
Account #0: 0xf39Fd6e51a...ffFb92266 (10000 ETH)
Private Key: 0xac0974bec39a1...478cbed5efcae784d7bf4f2ff80
Account #1: 0x70997970C51812...b50e0d17dc79C8 (10000 ETH)
Private Key: 0x59c6995e998f97a5a...9dc9e86dae88c7a8412f4603b6b78690d
.
.
.