I'm setting up the RPC node for Ghostnet of tezos and I'm following https://opentezos.com/deploy-a-node/installation#set-up-using-ppa-with-tezos-packages-from-serokell this tutorial and my node started syncing but when I pasted the blockhash which I got from my logs file it's not appearing on ghostnet explorer but appearing on mainnet explorer why it's happening?
I think that the instructions in the link you've given are slightly incorrect.
There is nothing wrong with the first command:
tezos-node config init --data-dir ~/tezos-ghostnet --network=ghostnet --history-mode=full
As explained there the
--network=ghostnet, if specified, configures the node to run on it (as you want), however that command also picks a non-default data directory for the node (
The issue is with the next command:
tezos-node run --rpc-addr 127.0.0.1:8732 --log-output tezos.log
because here no
--data-dir is given, so the default one is used and not the one you've just set up.
Stopping that and instead running:
tezos-node run --rpc-addr 127.0.0.1:8732 --log-output tezos.log --data-dir ~/tezos-ghostnet
should work for you.
However if you're using
tezos-packaging for Ubuntu, I'd recommend following the quick setup there which has a step-by-step utility that will guide you.
In your case (since you've added the PPA already) running these two commands is enough:
sudo apt-get install -y tezos-baking