Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to see a log or history of previous iTerm2 sessions?

Is there a log of recent terminal sessions at all? Or anyway I can see what was written to console before I last quit?

like image 967
Mascros Avatar asked Jan 30 '16 17:01

Mascros


People also ask

What is Shell integration in iTerm2?

Shell Integration is a feature exclusive to iTerm2 that uses knowledge about your shell prompt to help you navigate from one shell prompt to another, record your command history, suggest most used directories, helps you re-run commands, download files from remote hosts with a click, upload files to remote hosts with ...

How do you save Iterm commands?

If Preferences>General>Save copy/paste history and command history to disk is enabled, then command history will be preserved across runs of iTerm2 (up to 200 commands per user/hostname).

How do you increase the number of lines in iTerm2?

If you open up the Preferences > Profiles page for iTerm2 and edit the profile you're currently using (this is probably “Default”) you can increase the scrollback. Under the Terminal section you can adjust the number of scrollback lines to a higher number or just enable “Unlimited scrollback” if you want it all.


1 Answers

There is the option to save a log of your session to a file, however, by default this isn't done.

To activate the session logs, go to iTerm2 Preferences (⌘,), select the "Profiles" tab, then the "Session" tab. Under "Miscellaneous" you can specify a folder where log files for your sessions shall be saved in the future.

screenshot with the preferences you need to adapt

Edit:

These session logs can become quite big, so you might want to have a look from time to time to not clutter your drive.

like image 53
TabeaKischka Avatar answered Oct 11 '22 18:10

TabeaKischka