dfx ping
Use the dfx ping command to check connectivity between a local computer and an Internet Computer network provider.
This command enables you to verify that you can connect to a specific Internet Computer network and that the remote network services are running.
Note that you can only run this command from within the project directory structure.
For example, if your project name is hello_world, your current working directory must be the hello_world top-level project directory or one of its subdirectories.
Flags
You can use the following optional flags with the dfx ping command.
| Flag | Description |
|---|---|
|
Displays usage information. |
|
Displays version information. |
Arguments
You can specify the following argument for the dfx ping command.
| Argument | Description |
|---|---|
provider |
Specifies the network provider URL that you want to use. |
Examples
You can use the dfx ping command to check whether the Internet Computer is currently available at a specific network address by running a command similar to the following:
dfx ping https://testgw.dfinity.network
If the Internet Computer is running on the specified network provider address, the command returns output similar to the following:
{
"ic_api_version": "0.8"
}