Both, if you get a developer license for Unity, so you can develop for the 3DS, you can only release your 3ds game on the Nintendo E-Shop.
If you release your game for Linux and then run it on a 3ds you are probably fine, hence you don't have a license, but I don't think that the 3ds can run...