{"id":2311,"date":"2017-12-08T07:13:00","date_gmt":"2017-12-08T07:13:00","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2311"},"modified":"2022-04-24T04:20:34","modified_gmt":"2022-04-24T04:20:34","slug":"useful-command-for-process-and-jobs-in-unix-linux","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/useful-command-for-process-and-jobs-in-unix-linux\/","title":{"rendered":"Linux Tutorials: ps commands examples"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Useful Command for Process and Jobs in Unix\/Linux<\/strong><\/p>\n<p>List out all background Job running in machine i.e. list current jobs<br \/>\n&gt; jobs<\/p>\n<p>How to sent Job into Background ie background the suspended job<br \/>\n&gt; bg<\/p>\n<p>How to run background jobs on foreground<\/p>\n<p>1. Find out the job number using &#8220;jobs&#8221; command<br \/>\n2. Type follwoing fg %jobnumber<\/p>\n<p>Whats the differnce between control c and control z in Linux<\/p>\n<p>^C &#8211; kill the job running in the foreground<br \/>\n^Z &#8211; suspend the job running in the foreground<\/p>\n<p>To kill a suspended or background process<br \/>\n&gt; kill %jobnumber<\/p>\n<p>To kill a job running in the foreground<br \/>\n&gt; sleep 100<br \/>\n^C<\/p>\n<p>List out all background job running by each user<br \/>\nps -u<\/p>\n<p>To see every process on the system using standard syntax:<br \/>\n&gt; ps -ef<\/p>\n<p>To see every process on the system using BSD syntax:<br \/>\n&gt; ps ax<\/p>\n<p>To print a process tree:<br \/>\n&gt; ps -ejH<\/p>\n<p>To get info about threads:<br \/>\n&gt; ps -eLf<\/p>\n<p>To see every process running as root (real &amp; effective ID) in user format:<br \/>\n&gt; ps -U root -u root u<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @<a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\"> twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Useful Command for Process and Jobs in Unix\/Linux List out all background Job running in machine i.e. list current jobs &gt; jobs How to sent Job&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[454],"tags":[333],"class_list":["post-2311","post","type-post","status-publish","format-standard","hentry","category-shell-script","tag-command"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2311"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2311\/revisions"}],"predecessor-version":[{"id":29684,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2311\/revisions\/29684"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}