Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 often have projects for which I need multiple terminal windows open at different locations, and setting up my workspace each time I want to work on this project takes a long time, so I'd like to be able to automate it with a script.

I've only been able to get as far as this:

xterm -hold -e "cd SOMEDIRECTORY && DO STUFF"

But the problem with that is that it just executes the command and doesn't allow me to do anything else in that window. I'd like to be able to have the window open up to a certain directory, execute some commands there, and then allow me to do my own thing in that directory. How can I achieve this?

share|improve this question
xterm -e "SOME COMMANDS; bash"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.