To wire an exhaust fan to a wall switch, use this diagram. These fans usually come with a small electrical connection box welded to the side of the housing. There will be a cover on the connection box that fastens with a small screw. Open it, pop the plug out of one of the wire holes and thread a wire clamp into it.
Here two receptacles in one box are wired using the device terminals. With this arrangement, if receptacle #1 fails, receptacle #2 may also fail if failure is due to physical damage. However, if the copper tab conductors between the terminals remain intact, even if #1 stops functioning, receptacle #2 will probably still work.
Use this wiring when the source is at the fixture and you want to control the feed to both components with the same switch. Three-wire cable runs from the fan to the switch box and the source neutral is spliced to the white wire and to the fan neutral.
Use this wiring when the power source originates at the switch and you want to control both the fan and light from there. The hot source is connected directly to the bottom terminal on the switch. Two-wire cable runs from there to the ceiling fan.