Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I used to execute the jobs command I got a list of running processes with their respective process-ID, but in Ubuntu lucid lynx this doesn't seem to be working. Anyone have a solution?

share|improve this question

migrated from stackoverflow.com Jun 15 '10 at 13:31

This question came from our site for professional and enthusiast programmers.

    
Try sleep 15 & jobs -l and you should see an entry listed for the sleep command running in the background. After 15 seconds issue another jobs -l and it will be gone (at some point after pressing enter at the prompt you'll get a "Done" message). –  Dennis Williamson Jun 16 '10 at 4:36
add comment

1 Answer

jobs displays the status of jobs in the current session (ie. those launched from the terminal you are currently in) only. To get a list of all running processes, try ps -e.

If what you want is jobs but make it output PIDs, run jobs -l.

share|improve this answer
    
jobs -l doesn't seem to be working. ps -e does generate output –  Tom Schuermans Jun 15 '10 at 13:31
1  
if jobs -l doesn't do anything, that means you have no process currently running in the terminal where you are typing jobs -l. What exactly is the behavior you want? –  houbysoft Jun 15 '10 at 13:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.