Linux and other UNIX-based systems come bundled with a tool called 'timeout' that lets us set a timeout for any command being run.
This video teaches you how to use the timeout command effectively to set timeout to any shell command on Linux command line.