Can I give away the shares of a private company (limited by shares) when I die?
This would largely depend on the company's constitution and if there are any special buy-sell / shareholders / founders agreement etc. The agreements might bound the owner's shares to certain conditions such as making them non-transferrable. The company's corporate secretary should have this information.
Assuming there are no other contracts and it follows the "default" model constitution, then yes, you can give the shares accordingly.
That being said, business legacy wise it may not be feasible. The people whom you care about may not necessarily be the best person to run the company, or even interested in continuing to run the business in the first place.
Coming from the perspective of a company ourselves (getArrange.com), we have seen cases where a company goes bust when the founder passes on. We can understand you have worked really hard for your loved ones, and they should be getting something out of it for your hardwork. Looking more long-term, a company as a whole might want to consider other financial instruments to ensure an optimum outcome for both your loved ones AND the company.