how to read a file from terminal code example Example 1: how to open a file using terminal open ~/Desktop/filename.txt Example 2: terminal read file cat <path/your_file>