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

I started screen in a directory I since deleted and every time I open a new window I get the following error:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory sh: 0: getcwd() failed: No such file or directory

Pretty understandable error! Is there a way to reset screen's default directory while it's running? I'd really rather not have to restart screen entirely, or recreate the deleted directory to appease screen.

share|improve this question
up vote 1 down vote accepted

The commandC-a:chdir /path/to/new/dir changes the working directory, and thus the directory that new windows open into.

share|improve this answer
    
Thanks! Appreciate it. – Matthew Bradley Jan 16 '14 at 23:16

You must log in to answer this question.

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