Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When sshing to a host, the screen is cleared at exit, which makes it impossible to review recent output. This behavior seems to be set system-wide in /etc/zlogout. How can zsh be configured to not clear the screen at logout?

Related question: How to prevent clearing of terminal output when I "exit" an SSH session?

share|improve this question

The system-wide /etc/zlogout file can be overridden by adding the following to .zlogout:

setopt norcs

The norcs option signifies that zsh should not read any subsequent rc files, which includes /etc/zlogout. And since /etc/zlogout is the last processed rc file, the norcs option does not have any side effect when specified in .zlogout.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .