Can I know the background running process using "jobs" even i close the terminal in Linux?

21 Views Asked by At

When run a process in background using &, I can see it with the command "jobs".

sleep 1h &
sleep 2h &
jobs

enter image description here

However, after I close the current terminal and open a new termianl, I can't find the jobs running background using the command jobs.

Ofcouse, I can use ps aux | grep ... to check the process. But I want to know can i still use jobs to do it. So that, it will be convient to kill the job using command like kill %1.

0

There are 0 best solutions below