How to Use Linux Screen Commands and Shortcuts (Quick Guide)

Photo by Joshua Aragon on Unsplash

Screen is a very powerful tool to keep a process running in the background while retaining the ability to log out and log back in anytime to check on the output.

Annoyingly I keep forgetting the commands to use screen effectively so here’s a quick reference guide of commands and shortcuts for myself and maybe others.

Commands

To start a screen session:

$ screen -S <command>

To list existing screen sessions:

$ screen -ls

To reconnect to a screen session:

$ screen <session_name>

To reconnect to a still attached screen session:

$ screen -rd <session_name>

Shortcuts

To detach a screen session: ctrl + a + d

To open a new screen session while inside screen: ctrl + a + c

To switch back to the previous screen session: ctrl + a + p

To switch to the next screen session: ctrl + a + n

I write about Laravel, PHP, and web development related articles.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Eating Elephants

How web browsing works

The World Around GNU/Linux

Recipe #6: Track your C-Ratio on Synthetix

The Easiest Way to Access Your Windows Desktop Through Apple Devices

What the COO Should Look for in an ERP System?

Flutter State Management by Example

Image result for state management flutter

Elasticsearch — The Trouble with Nested Documents

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jian Jye

Jian Jye

I write about Laravel, PHP, and web development related articles.

More from Medium

Useful Linux Commands for Developers

Ordinary linux command

解決 linux send mail 會變成副檔名ATT00001.bin

Linux Commands On Fingertips