Norway - Similar to many European countries, owning a gun requires a certifiable reason to do so, which basically means hunting or target shooting. Loads of guns here, as there’s a lot of moose and deer. Obtaining and owning a hunting rifle requires skill tests and a theoretical exam, and you need to be part of a hunting group.
ARs are banned for obvious reasons. The only exception is for people who are army reservists who are (were?) allowed to store their service weapon at home, if they have proper secure storage options available. This may have changed since I was a reservist myself, but those were the rules in 2007 at least.
Pistols are legal for target shooting, but with strict background checks and so forth. Plus you have to be part of a target shooting club. Getting a pistol is generally harder than a rifle, as a means of preventing pistols from ending up on the streets. Gun voilence happens, but it is extremely rare, and mostly tied to gangs and/or organized crime. Except from this asshole in 2011.
Carrying permit for guns is pretty much none existent. To/from hunting or shooting range.
Self defense is not a valid reason for obtaining and carrying a gun. You don’t really need it either. The only exception is Svalbard where is is possible due to polar bears. And even then, you can’t be an idiot about it; a few years ago this dumbass got permanently banned from the Svalbard territory after intentionally provoking a polar bear, then shooting it, claiming self defense.
“Git is to github what porn is to pornhub”