When one group with guns wants to overthrow, or have autonomy from, the group with guns and political power. I think it's a matter of goals. If the rioters want to be treated better by the government, it's civil unrest. If they want to overthrow the government, it's civil war. I suspect the distinction is more important to people who aren't dodging bullets.
no subject