# Useful Command

{% hint style="info" %}
Add **sudo** if you're not in ROOT users.
{% endhint %}

#### Check your node status using curl

{% hint style="info" %}
Change your port if you're using custom port.
{% endhint %}

{% code overflow="wrap" %}

```javascript
curl -X GET \
     -H "X-Algo-API-Token: yourtoken" \
     "http://127.0.0.1:8080/v2/status"
```

{% endcode %}

#### Check your algorand service status

{% hint style="info" %}
In this step you will find the port you are using in the algorand node.
{% endhint %}

```
systemctl status algorand
```

#### Restart node

```
systemctl restart algorand
```

#### Check node status

```
goal node status -d /var/lib/algorand
```

#### :warning: Stop node :warning:

```
systemctl stop algorand
```

#### :warning: Delete Algorand from your server :warning:

```
apt-get remove algorand algorand-devtools
```

```
sudo rm -rf /var/lib/algorand/
```

#### Add variable

In this step if you want to use `goal node status` without using -d flags you can follow this command below.

{% code overflow="wrap" %}

```bash
echo "export ALGORAND_DATA=/var/lib/algorand" >> ~/.bash_profile
source ~/.bash_profile
```

{% endcode %}

Now you can use this command without using -d flags.

```bash
goal node status
```

I'll add more command soon, i just exploring algorand node.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.strnan.top/testnet/algorand/useful-command.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
