cd cardano-node
cabal clean
cabal update
git fetch --all --tags
git checkout tags/1.18.0
cabal build all
cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.18.0/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/
cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-1.18.0/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/
and verify correct version with:
cardano-node --version
cardano-cli --version