Since it is cedar It needs to be fastened with stainless steel nails or otherwise you will have issues with the tannins in the cedar. It will bleed gray if galvanized nails are used.
I would do this by hand to keep from cracking the siding, but if you want to use a nail gun, you will need a siding nail gun. The framing gun you have pictured will not be nice to the siding, it will set the nails way too deep. 2" nails will hold what you need as long as you have OSB or plywood subsiding. If your house is older and has 3/4" 1X laid diagonally it will work too. In any case nail into the studs. Set all your joints on the studs as well. Some folk set a piece of flashing under the joint, over the lower piece to redirect any water from getting too far into the joints. Tar paper strips have worked in the past as well but it was a very heavy grade of paper, 30lb felt at least.
To minimize splitting keep the nails about 1" up from the bottom, the lap of siding should be about 1 1/4", do not nail above the top of the lower piece for it will readily crack the siding. At least with hand nailing it is prone to, perhaps not so much with a nail gun.
Again I always nailed this by hand and if a piece cracked, it was cut shorter to eliminate the crack, which is a PITA, so that's why the hand nailing, for once a nail gun's trigger is pulled, what's done is done. Good or bad....