---
title: "How to control the jobs with shell?"
author: "RobertLeeJesus"
date: "2008-07-27T17:16:34Z"
tags: []
slug: "how-to-control-the-jobs-with-shell"
draft: false
lastmod: "2008-07-27T17:16:34Z"
id: 220160
url: "https://hidefromall.iteye.com/blog/220160"
---

There are 3 commands to contol jobs.

1\. Ctrl + Z  
2\. bg & fg  
3\. kill  
4\. jobs

For example,

1\. robert@debianlaptop:~$ emacs

\[1]+  Stopped                 emacs

2\. robert@debianlaptop:~$ fg %1  
emacs

\[1]+  Stopped                 emacs

. robert@debianlaptop:~$ bg %1  
\[1]+ emacs &

3\. robert@debianlaptop:~$ jobs  
\[1]+  Running                 emacs &

4\. robert@debianlaptop:~$ kill %1