The code examples in the book are MIT License. It's only that you can't make money from reselling the book *text* itself. You can use all of the knowledge and source code in anything you like, commercial or otherwise.
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn