Learn how to bring processes to foreground on Linux.

Asked 2 years ago, Updated 2 years ago, 48 views

Is there a way to bring the process to foreground with linux?
I would like to have the program run in the background (nohup) on the server, log out once, log in again with ssh, and then display it in the foreground.

linux

2022-09-30 21:37

1 Answers

tmux and screen are often used to run the process in the foreground state when it continues and reconnects after disconnecting.

I will write down the method using tmux.Assume the setting is the default.

Start $tmux#tmux
$ some-long-command# some time-consuming command
...outputs...

At this time, enter Ctrl-b:detachRET.You can now detach from the tmux session.

You can reconnect to tmux from tmux attach.


2022-09-30 21:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.