As an example:
$ vim &
[1] 19133
$ bg
[1]+ vim &
[1]+ Stopped vim
$
However, I do not want vim to stop when put in the background. Is that possible? (applies for other programs such as login and telnet too)
As an example:
$ vim &
[1] 19133
$ bg
[1]+ vim &
[1]+ Stopped vim
$
However, I do not want vim to stop when put in the background. Is that possible? (applies for other programs such as login and telnet too)
Interactive processes that are sent to the background are suspended when they try to read input from the terminal. You can use a terminal multiplexer such as screen
screen -d -m vim
This create a new screen session and automatically detaches it.
Use screen -r
to reattach to it.
Cannot open your terminal '/dev/pts/1' - please check.
when doing screen -r
.
– tildearrow
Oct 07 '15 at 12:43
I do not know whether it is right or wrong if we do
ping google.com &
than it is still running but if we do
cat >abc.txt &
it is not running.Reason for this may be the process which is interactive is stopped because yo can do any thing when these process is in background so save resources
fg %1
(assuming the jon number is 1) to resume editing in the foreground.. – heemayl Oct 07 '15 at 07:36