I know of at least four possibilities:
- eshell
- term
- ansi-term
- shell
What's the complete list of tools built-in to emacs to launch a shell, and what benefits and drawbacks do they offer?
I know of at least four possibilities:
What's the complete list of tools built-in to emacs to launch a shell, and what benefits and drawbacks do they offer?
M-x shell
is the standard interface to OS's shell. On linux, it calls bash (or whatever your default), on Windows, it calls cmd.exe. M-x shell
is the most frequently used.
M-x eshell
is a shell written in emacs lisp entirely. It has a syntax similar to bash, but is integrated with elisp well. e.g. you can eval elisp code right there. Eshell is especially useful on Windows when you don't have cygwin etc installed.
M-x term
and M-x ansi-term
are terminal emulations, much like gnome-terminal, xterm, etc. The main difference to M-x shell
is that, in eshell
or shell
, keys are still emacs keys, but in term
, emacs keys doesn't work. But, the advantage is that you can run ssh, vim, or any command that are text-UI based, which won't work in M-x eshell
or M-x shell
.
term
and ansi-term
used to be different packages, but now they are 2 different commands in the same file term.el. I haven't used them much. You can find a more detailed answer about this on emacs wiki.
There is some more information on my blog.