It depends on the distribution. For the most part Linux license is free (or free-ish). There are some Linux distributions for which you need to pay for (RHEL, SUSE). If you are asking for personal use, you can just download the software and support the OS yourself. If it is for an organization, you have to decide if you want to go it alone or if you need a vendor to fall back to.