Yes, modern freight and passenger locomotives are typically equipped with onboard restroom facilities, though the exact amenities vary depending on the age of the locomotive model, regional railway regulations, and the length of the scheduled run. On long-distance freight locomotives, modern cabs often feature compact chemical or retention toilets to ensure crew comfort during multi-hour cross-country journeys where stopping between scheduled classification yards is impractical.