Is there a way to run Emacs in the background from a Linux shell?

  • Thread starter Thread starter ehrenfest
  • Start date Start date
  • Tags Tags
    Linux Shell
Click For Summary
When running Emacs from a Linux shell, it typically occupies the foreground, preventing further shell commands until Emacs is closed. To run Emacs in the background, append an ampersand (&) to the command, such as "emacs foo.txt &". Additionally, if Emacs is already running in the foreground, it can be suspended and resumed in the background using the "bg" command. For instance, after suspending the program, you can find its job number with "jobs -l" and then use "bg %<job_number>" to continue it in the background.
ehrenfest
Messages
2,001
Reaction score
1
When I open emacs from a linux shell, it always makes it run in the "foreground" so that I cannot do anything else in the shell until I close emacs. I used to know a way around this with some extra command after "$ emacs" but I forgot it. Does anyone know what I am talking about?
 
Computer science news on Phys.org
You automatically background commands by adding & behind it.

So for example "emacs foo.txt &"

Also if you suspend a program, you can resume it in the background with the command bg. Example would be

"jobs -l" outputs 512 for your emacs program, so then you run "bg %512".
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

Replies
3
Views
11K
  • · Replies 18 ·
Replies
18
Views
2K
Replies
9
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
3
Views
2K
Replies
2
Views
3K
Replies
16
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K