Which f stop for landscape photography should you use?

Knowing which f stop to use for landscape photography makes all the difference between images that are sharp from foreground to back and full of detail, and photos that have limited depth of field.