In other terminals I would press Ctrl+z
to suspend an application, often to then issue bg
to send it into background.
In console2 Ctrl+z
does nothing, probably because the key combination has a different meaning in Windows. But is there a way to achieve the same effect, save for 'process &'?
(I know I should use &
and it works, but sometimes I would setup shell, start an editor, begin editing, then return to the console just to find that I forgot the &
and I can't use the shell. It annoys me that I then have to either open a new shell and set it up again, or quit the editor, start it with &
and set it up again).
If you want to push a command into the background, using & at the end is an easy way to do that. This way, you can issue a command in the background and continue to use your terminal as it runs. It comes with a catch, though. Using & doesn't disconnect the command away from you; it just pushes it into the background.
Running shell command or script in background using nohup command. Another way you can run a command in the background is using the nohup command. The nohup command, short for no hang up, is a command that keeps a process running even after exiting the shell.
The fg command switches a job running in the background into the foreground. The bg command restarts a suspended job, and runs it in the background.
In Console2, ctrl-c is bound by default to copy (text) you have to press ctrl-shift-c to cancel job.
You could also try to remove the hotkey that is conflicting with ctrl+z
.
I was having trouble using ctrl+c
to cancel the execution of a script. As soon as I removed that hotkey, ctrl+c
had its default restored and I was able to cancel executions properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With