Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run emacs as separate process from terminal

When I run the emacs text editor the process does not return so I cannot use the terminal which is obviously the default behavior.

I cannot find the switch or command in the man but I know it is something very simple.

How can I run emacs as a separate process so I can continue to use the terminal without opening a second one?

like image 511
ojhawkins Avatar asked Dec 20 '22 02:12

ojhawkins


1 Answers

You can start any program in the background by appending an ampersand to the command, emacs &.

There's a whole framework for working with backgrounded processes, see for example man jobs, disown, fg, bg, and try Ctrl-Z on a running process, which will suspend it and give you the terminal, allowing you to resume that process either in the foreground or background at your pleasure. Normally when your shell closes, all those programs will end, disown allows you to tell a program to keep running after you end your session.

like image 57
Dan Avatar answered Dec 30 '22 17:12

Dan