I'm using (Screen) in terminal to leave my twitter bot running. However I am having trouble accessing these instances again. It's simply saying "Command not found" despite it clearly saying it's detached.

Anyone got any ideas what might be wrong?

UPDATE: To get rid of all unresponsive or dead sockets use screen -wipe

enter image description here

  • 1
    do not post pictures of text - paste text
    – Milliways
    Dec 30, 2019 at 4:06
  • Hello Milliways, why is that? It's the same thing. Jan 1, 2020 at 2:43
  • 2
    You can not copy code from a picture! It is also difficult to read (at least for those of us with vision problems),
    – Milliways
    Jan 1, 2020 at 2:48
  • 1
    You are on Unix now and unix guys communicate their programming issues on the internet from the beginning. So they like to quote and copy and paste parts of messages. This all cannot be done with images. Text inserts are the message itself and do not use external sources with links. That's also better for handling the message (forward, copy, backup etc.). Not using images if not necessary is a part of learning Unix ;-)
    – Ingo
    Jan 1, 2020 at 20:20
  • @MarkClifford There is nothing unfriendly/unkind in Milliway's remark, this is a very normal consideration, although in this case (where no code is involved) it doesn't matter much. WRT "difficult to read" you should be able to zoom that image with the browser. The ones that are really bad are literally photographs taken of a screen.
    – goldilocks
    Jan 2, 2020 at 16:49

2 Answers 2


You have to use the full command as instructed on the line starting with 'Type', not just the session ID


screen -r 1652.pts-0.raspberrypi
  • Oh so I have to type "screen -r" as well. Jan 1, 2020 at 2:45
  • 1
    @MarkClifford correct
    – Dirk
    Jan 1, 2020 at 11:53

This is happening because you have started screen several times, and it doesn't know which of the two sessions you want to resume. If you need several virtual consoles, you can create multiple consoles inside one screen session. This is done by hitting Ctrl+A then c to create a new console, and Ctrl+A then n/p to switch to next/previous one. A console can be closed by typing exit in it as usual.

Also note that you only need to specify the session ID when reattaching to one of multiple sessions, e.g.

screen -r 1706

would be sufficient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.