OT: ubuntu 16.04 LTS -- bring background process to foreground


Sorry for OT. This is for ubuntu admin type of guru.
Under ubuntu 16.04, i understand
ps -u username
would bring up all the process running under that username.
ps -ef
would list all the running processes.

but what I need is to bring some of these processes running the background back to foreground.
such process could be really way down the long list. so, the
fg %{process number} command seems very inconvenient to use,
Is there another easy way to bring a specific background process to foreground such as using PID ?



fg only works if the process is on your session

jobs shows you what’s in the background.


Thanks. Joe. The ubuntu is a remote computer from a cloud service provider.
Is there any way / command that would allow me to bring a background process initiated from my previous session back to foreground from my current session?

Much appreciated.