Hello and welcome.
Linux is a kernel. Most people unfortunately call the OS just “Linux” but
this is a mistake which some intentionally make and spread. We call it
“GNU/Linux” to attribute the GNU project which started the free software
movement, is the first project to build towards a fully free operating system
and it is (specifically, GNU software) a big part of modern GNU/Linux
distributions. Not only free software wouldn't exist without GNU, it is built
around the principles that GNU started (the freedom to use, study, modify and
redistribute) and with many tools that are part of it (including GCC,
Coreutils, Autotools, Emacs).
I think that Trisquel fulfills your requirements. However. any typical
GNU/Linux distribution is suitable for learning how it works and for
programming (but only a few provide exclusively free software); they all
provide close to the same functionality; only policy (such as including free
software only), release cycle, user base size and its attitude, and default
configuration vary significantly. What software you use for programming, and
how you learn how the system works will make a much bigger difference.
Most of the documentation for Debian and Ubuntu is applicable to Trisquel,
because it is derived from Ubuntu. The Debian Reference provides an
acceptable overview of how the system works (I do not recommend reading it
sequentially, use it as a reference instead, as its title says).