Gnu Screen workflow management (change working directory)

I was recently asked how to change screens working directory. It took me a few minutes to realize the benefit of this as I typically have different screen sessions for different purposes. But after thinking about it for a few minutes I have been in situations where what I was doing in a screen session morphed and it would have been nice for new windows to be opened to a different working directory than where I started my session.

A few minutes of grepping around in man -a screen gave the answer.

C-a:chdir /path/to/new/dir

2 Comments

  • Thanks for posting this – and for showing up first for “gnu screen change session directory” :)
    I’ve wanted to know this since about 2008 and now I finally now :)

  • Glad you found it useful :) I don’t even remember my use case for this any-more but I do remember thinking it was a handy trick.

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha