Your Ubuntu system will allow you to follow the exercises in _The Unix Programming Environment_ just fine, current versions of the commands used in the book still support the relevant options and features. There will be some minor variations, in particular you probably won’t be able to use the email-related commands to read your email.