Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Update system
- sudo apt update
- #Install screen
- sudo apt install screen
- #Create new screen session
- screen -S session_name
- #List all active sessions
- screen -ls
- #Re-attach to active session
- screen -r session_name
- #Kill screen session
- screen -S session_name -X quit
- #Launch screen session with logging
- screen -L -S session_name
- #Open screen config
- cd
- nano ~/.screenrc
- #Increase scroll buffer size
- #Just add this sctring to config and save(Ctrl-X-Y-Enter)
- defscrollback 5000
- --------------
- #To write logs to specific file
- #Press
- CTRL+A+:
- #enter command
- logfile /root/screenlog.log
- #Press again
- CTRL+A+:
- #enter command
- log on
- --------------
- #Useful commands inside screen
- Ctrl+A+d - Detach from ongoing screen(process will go on, session will stay)
- Ctrl+A+K - Kill ongoing screen(session will be terminated)
- Ctrl+A+H - Enable logging from the inside of session
- Ctrl+A+[ - Enable scroll mode, scroll with PgUp and PgDown keys (esc/Q to quit scrollig)
- Ctrl+A+: - Enter command mode in screen
- IMPORTANT! When entering commands below consider register of the letters, use SHIFT bottom to enter upper-register lettes.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement