To follow gun safety rules, always treat every gun like it’s loaded, even if you know it isn’t. Never point a gun at someone else, and keep your firearms away from children at all times.
For a shotgun or a rifle, thread the cable lock through the ejection port and out of the loading port. If you’re locking up a revolver, thread the cable through the barrel if possible. If not, thread the cable through 2 chambers in the cylinder instead. You can also thread the cable around the frame.
Make sure that the cable lock is secure by tugging on the locking mechanism after you lock it. If the cable releases and opens up, try locking it again. Some cable locks have a 3-digit combo instead of a key. If yours has a combination lock, simply scramble the numbers to lock it.