Put a tray under it and open and shut it real fast. If water comes out, it’s a water line. If you hear hissing and smell rotten eggs, it’s a gas line. ¯\_(ツ)_/¯
(Chances are you’re not gonna blow yourself up with a fraction of a second’s worth of gas leaking out, but for legal reasons this comment is a joke.)
good luck if you break it
If it opens but not closing anymore you have a problem. This can happen with old valves.
If that happens, shut off the main and open the windows.
Or, shut off the main first. And do a proper inspection.
Why risk it? Don’t fuck with pipes if you dont know what you’re doing?
Utilities and electric usually require electricians and plumbers. And even though it might be common sense to you, the idiot who burned the house down thought it was too. It’s why there’s code, it’s idiotproof. Each code is written in blood.