Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between shell and eshell in emacs?

What is the difference between eshell (M-x eshell) and shell (M-x shell) in emacs. Both seems to work same but when i try to run su command or sudo command in eshell then it create a buffer named tramp/su root:localhost. but don't do the work which i want to do as super user.

like image 622
MutantMahesh Avatar asked Jan 18 '12 17:01

MutantMahesh


People also ask

Is Emacs its own shell?

Emacs comes with its own shell (as in, like bash or zsh ) written in entirely in Emacs-Lisp. The shell, named Eshell, is a feature-rich replacement for your standard-fare shells like bash with the added bonus of working on any platform Emacs runs on.

How do you cancel Eshell?

To exit the shell when a foreground process has completed: Type exit or <EscChar-D>. Scroll past all the output data (or use an autoscroll function key if you have customized a function key to do that), and exit.

How do I stop Emacs shell?

Killing Emacs means terminating the Emacs program. To do this, type C-x C-c ( save-buffers-kill-terminal ). A two-character key sequence is used to make it harder to type by accident. If there are any modified file-visiting buffers when you type C-x C-c , Emacs first offers to save these buffers.

How do I open a new shell in Emacs?

C-u M-x shell will do it. It will prompt for a name for the new shell, just hit return for the default (which will be something like *shell*<2> . Also works with eshell.


1 Answers

In short eshell is a shell emulator (written in Emacs-Lisp), while shell is an interface to sh or whatever (external) system shell you're using.

eshell should behave like most "Bourne-style" shells that you're familiar with, but does not have the external dependency that shell has. Thus, it can be run on any system that runs emacs.

like image 131
harpo Avatar answered Sep 19 '22 11:09

harpo