Speaking of bike racks, let’s go over how to properly lock a bicycle. When bikes are properly locked they are much less likely to be stolen.
Metal U-locks are also stronger than cable locks and much more of a deterrent to bicycle thieves.
You want to lock your bike by the front triangle of the frame (top tube, down tube, etc.) to something solid and secure, that cannot be easily broken or ungrounded; preferably a bike rack. If possible, you should lock up your front wheel with the frame. For whatever reason, thieves are much more likely to take the front wheel then the back so this is just another precaution.
You never want to lock just the wheel, wheels can be easily removed and thief can take the rest of your bike.
You never want to lock up the fork, front wheels are easily removed and then a thief can take your entire bike.
Cable locks through the wheels are never a bad idea either, especially when locking your bike in questionable areas or over long periods of time.