How to Record and Replay Linux Terminal Sessions using script and scriptreplay Commands

In this guide we are going to look at how to use a script and scriptreplay commands in Linux that can help you to record commands and their output printed on your terminal during a given session.