---

How to save terminal output to a file under Linux/Unix

How do I save the terminal output to a file when using BASH/KSH/CSH/TCSH under Linux, macOS, *BSD or Unix-like operating systems?