Sotnik or Sotnyk (, , ) was a military rank among the Cossack starshyna (officers), Strelets Troops (17th century) in Muscovy and Imperial Cossack cavalry (since 1826), the Ukrainian Insurgent Army, the Ukrainian Galician Army, and the Ukrainian People's Army.