How to save macOS Terminal outputs as text file

If you want to save the output of all the commands and their results for the current session in a text file on the macOS, you can do that by simply pressing Command + S keys, this will open a prompt that will ask you where you want to save the file to.

You can achieve the same by going to the Terminal menu > Shell > Export text as... option.

If you do not want to save the complete text of the console, then just select the text you want to save and press Command + S or go to Menu > Shell > Export Selected text as...

macOS Terminal Export Text to File
macOS Terminal Export Text to File

Have Questions? Post them here!

Recent Posts:

Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.