Unix/Linux

screen 사용법

steloflute 2021. 8. 18. 22:33

shell - Access local console via SSH - Server Fault

 

Access local console via SSH

I am searching for a way to interact with a local console via SSH - just as you would do with an directly connected keyboard. In my particular case I got a debian server (console only, no X system)

serverfault.com

  • Using "screen" is the way to go
  • start by typing screen
  • type your command
  • press CTRL+A d (to exit the screen)
  • this will detach the screen from your current session.
  • once you log back to your server, you can type : screen -ls to see the list of active screens
  • reattach the screen by using the command : screen -r <id of the screen>

그냥 screen -r 하면 최근 화면으로 간다.

local console 출력을 보고 싶을 때 screen을 대용으로 쓰면 된다.