Elected and appointed sheriffs

Sheriffs are elected to four-year terms in 43 states, two-year terms in New Hampshire, three-year terms in New Jersey, and six-year terms in Massachusetts. In Hawaii and Rhode Island, sheriffs are appointed instead of elected. In Connecticut, sheriffs were replaced with the State Marshal System.

Source: National Sheriffs Association
Ballotpedia