Tech & Work

Tech Tip: Learn how to resume suspended jobs

Have you ever needed to check something while you were compiling a program on a remote computer using SSH? The most obvious solution is to start another terminal on your local machine and open a separate SSH connection to the remote machine. However, the most obvious solution is hardly the most convenient.

Instead of initiating a new connection, simply press [Ctrl]Z in your current terminal. This keyboard combination suspends the current job and drops you back to the command prompt. From here, you can perform your other task with a fraction of the effort and time involved to fire up another connection to the remote machine.

If a job is suspended, you can do two things. When you're compiling information or running a task that doesn't require your attention, you can resume the job but place it in the background by typing bg at the command prompt. This frees up your command prompt for you to accomplish other work.

However, if you need to pay attention to the job you've suspended, you can resume it in the foreground by typing fg at the command prompt. It's possible to run multiple jobs at the same time. To see what jobs are currently running, type jobs at the command prompt.

Editor's Picks

Free Newsletters, In your Inbox