user4372: According to the docs,

cardano-cli and other Cardano software components need to know where the node socket file is located. We saved it to the path $HOME/cardano/db/node.socket in the previous example. The components read the shell environment variable CARDANO_NODE_SOCKET_PATH to find this.

It seems like this node socket file is specific to either the testnet or the mainnet, not both. Are you supposed to change the CARDANO_NODE_SOCKET_PATH environment variable every time you want to use the CLI tools with a different network?

user157: It uses the same environment variable. I've not needed to change the node socket when I switch between testnet or mainnet.

4372: <p>According to <a href="https://developers.cardano.org/docs/get-started/running-cardano#querying-the-cardano-blockchain" rel="nofollow noreferrer">the docs</a>,</p>
<blockquote>
<p>cardano-cli and other Cardano software components need to know where the node socket file is located. We saved it to the path $HOME/cardano/db/node.socket in the previous example. The components read the shell environment variable CARDANO_NODE_SOCKET_PATH to find this.</p>
</blockquote>
<p>It seems like this node socket file is specific to either the testnet or the mainnet, not both. Are you supposed to change the <code>CARDANO_NODE_SOCKET_PATH</code> environment variable every time you want to use the CLI tools with a different network?</p>
 157: <p>It uses the same environment variable. I've not needed to change the node socket when I switch between testnet or mainnet.</p>
