In emacs, I can create a shell using M-xshell. But how can I create multiple shell?

I did

  1. M-xshellRET
  2. C-x52
  3. M-xshellRET

It gives me back to shell in Step #1. How can I create multiple independent shell?


One way is to rename your shell buffers:

  1. M-xshell
  2. M-xrename-bufferRETsh1RET
  3. M-xshell

Now you have 2 shell windows, one named "sh1" and the other "*shell*".



(shell &optional BUFFER)
If BUFFER exists but shell process is not running, make new shell.
If BUFFER exists and shell process is running, just switch to BUFFER.
  • M-xshellRET :: Create a new shell or switch to an existing shell.

  • C-uM-xshellRET :: Ask for a buffer name, create a new shell if necessary and switch to that buffer.

An alternative is to use term.el with multiterm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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