Right-Hand Rule for Magnetic Field by Current in a Wire
Conventional Current and Magnetic Flux Flow:
Conventional current flow is defined as going from the positive terminal to the negative terminal (electron flow is from negative to positive). Conventional magnetic field flux leaves the north end of a magnet and reenters the south end.
The Right-Hand Rule Defined:
Grab the wire in your right hand with the thumb pointing in the direction of current flow (DC or instantaneous if AC). The curl of the other four fingers indicates the direction of the magnetic field around the wire.
Note on the drawing to the right that the purple arrows outside the coil all point in the same direction, while the green arrow running through the inside of the coil points in the opposite direction. They represent the direction of the magnetic flux lines when the DC current is fed through the coil in the direction indicated by the yellow arrows.
Compare the drawing with the photo at the left and see that the north end of the compass needle points in the same direction as the purple arrows shown above (the "E" and "W" markings can be seen on compass dial, with north end of arrow pointing toward bottom of photo). This is the direction of the magnetic field lines outside the coil.
Now look at the photo at the lower left and notice how the fingers of the right hand is wrapped around a wire, with the thumb pointing in the direction of current flow. The position of the wire is the same as any of the coil wires on the bottom part of the coil, so it can be seen that the magnetic field is curling clockwise around the wire (as viewed from the right end of the wire). The fingers wrap in the same direction as the field lines shown the drawing, that is, coming out of the photo underneath the coil, and going back into the photo as the pass through the center of the coil. Since the magnetic field lines are entering the near end of the coil, it is by convention the south end of the coil.
The drawing to the lower right illustrates how the Earth's geographical north pole is actually a magnetic south pole, and vice-versa. That explains why the magnetic north end of a the compass needle points to the Earth's geographic pole, which is a south magnetic pole. Confusing enough for you?
The test setup uses a multi-turn coil of 30 gauge insulated magnet wire being fed with a 150 mA direct current. Looking at the photos, the wire is wrapped CW around the spool. The negative supply is connected at the lower left and the positive wire is connected to the upper left. It is suspended in a holding fixture at a distance far enough from nearby metal objects so as to not significantly affect the magnetic field in the test area. An official USMC navigational compass is placed underneath the charged coil to obtain a magnetic field direction indication. When the current is turned off, the compass needle swings about 45° CCW to point to the Earth's geographic north (magnetic south).