Q:

Record all commands

I am learning ruby and following tutorials in a book. I want to record all the commands i enter in shell( I am using zsh) . How can I do that? I should be able to stop and start recording.

A:

Use the script command
DESCRIPTION
     Script makes a typescript of everything printed on your terminal.  It is
     useful for students who need a hardcopy record of an interactive session
     as proof of an assignment, as the typescript file can be printed out
     later with lpr(1).

