I needed a lock nut while working on my mini-implements and as I started to make it, I thought maybe someone here had never done this before.
You can use a vise or a hammer. If you use a vice, make sure you have a good grip on the edge. If you use a hammer, hold it firmly with a good pair of pliers (no pliers in pic so you can see better). Either way, you are applying a lot of force, and the nut can fly to the farthest corner of your shop if it slips.