terminate screen monitoring serial port

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












13















I am using screen /dev/tty-MyDevice to look at traffic on my serial port.



Pressing Ctrl+D does not cause the screen to terminate.



What I have to do in order to terminate it?










share|improve this question




























    13















    I am using screen /dev/tty-MyDevice to look at traffic on my serial port.



    Pressing Ctrl+D does not cause the screen to terminate.



    What I have to do in order to terminate it?










    share|improve this question


























      13












      13








      13


      5






      I am using screen /dev/tty-MyDevice to look at traffic on my serial port.



      Pressing Ctrl+D does not cause the screen to terminate.



      What I have to do in order to terminate it?










      share|improve this question
















      I am using screen /dev/tty-MyDevice to look at traffic on my serial port.



      Pressing Ctrl+D does not cause the screen to terminate.



      What I have to do in order to terminate it?







      gnu-screen serial-port serial-console






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 15 '17 at 17:22









      phk

      4,03252153




      4,03252153










      asked Jan 24 '15 at 23:45









      Walrus the CatWalrus the Cat

      200238




      200238




















          4 Answers
          4






          active

          oldest

          votes


















          17














          Use the screen quit command (normally ctrl-A ).






          share|improve this answer

























          • Ctrl+a Ctrl+-, yields a blank screen, Ctrl+a Ctrl+c yields a new screen, which Ctrl+D then is able to exit like all other screens I've encountered before this.

            – Walrus the Cat
            Jan 25 '15 at 0:55






          • 2





            Oops, markdown turned my "ctrl-" into "ctrl-". Fixed.

            – aecolley
            Jan 25 '15 at 1:04







          • 8





            It worked as Ctrl-a (that is Ctrl-a and then plain without ctrl). Strange that the link provided includes a Ctrl for the .

            – niels
            Jul 4 '16 at 13:06











          • This kind of works, but when connecting to a qemu serial pty this really kills it. That means I can't reconnect to it after that. With picocom, I can easily terminate the serial connection and reconnect later.

            – maxschlepzig
            Mar 7 '18 at 15:04


















          6














          Though aecolley's answer usually works then it did not work for me (could be because of Icelandic keyboard and Icelandic locale, but somehow doubt it). When in that situation then you can go to a different console and execute screen -ls and take note of the screen session number, the output should be something like this:



          There is a screen on:
          6254.tty2.hostname (Attached)
          1 Socket in /var/run/screen/S-root


          The screen session number her is then 6254.



          Then you can issue the following command to close that screen session: screen -X -S 6254 quit






          share|improve this answer






























            6














            I run all my terminals inside a screen, and also sometimes use screen to connect to serial. If you screen /dev/ttyUSB0 inside screen, you'll just get a new window in your current session, not a new child screen.



            In this case, press Ctrl-A k to kill only the current window rather than the entire screen process and your other windows with it. This is the kill window command.






            share|improve this answer






























              0














              For me the issue turned out to be that I had inadvertently logged out of the Linux user account, and not the system I was controlling through the serial port. Once I logged back in, all of the normal screen commands such as Ctrl+a, k began working again.



              Beyond that, if you can open a new screen window (Ctrl+a, c), another TTY (Ctrl+Alt+F1..12, or an SSH session, then you can run pkill screen or kill <PID of screen>.






              share|improve this answer






















                Your Answer








                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "106"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f180900%2fterminate-screen-monitoring-serial-port%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                17














                Use the screen quit command (normally ctrl-A ).






                share|improve this answer

























                • Ctrl+a Ctrl+-, yields a blank screen, Ctrl+a Ctrl+c yields a new screen, which Ctrl+D then is able to exit like all other screens I've encountered before this.

                  – Walrus the Cat
                  Jan 25 '15 at 0:55






                • 2





                  Oops, markdown turned my "ctrl-" into "ctrl-". Fixed.

                  – aecolley
                  Jan 25 '15 at 1:04







                • 8





                  It worked as Ctrl-a (that is Ctrl-a and then plain without ctrl). Strange that the link provided includes a Ctrl for the .

                  – niels
                  Jul 4 '16 at 13:06











                • This kind of works, but when connecting to a qemu serial pty this really kills it. That means I can't reconnect to it after that. With picocom, I can easily terminate the serial connection and reconnect later.

                  – maxschlepzig
                  Mar 7 '18 at 15:04















                17














                Use the screen quit command (normally ctrl-A ).






                share|improve this answer

























                • Ctrl+a Ctrl+-, yields a blank screen, Ctrl+a Ctrl+c yields a new screen, which Ctrl+D then is able to exit like all other screens I've encountered before this.

                  – Walrus the Cat
                  Jan 25 '15 at 0:55






                • 2





                  Oops, markdown turned my "ctrl-" into "ctrl-". Fixed.

                  – aecolley
                  Jan 25 '15 at 1:04







                • 8





                  It worked as Ctrl-a (that is Ctrl-a and then plain without ctrl). Strange that the link provided includes a Ctrl for the .

                  – niels
                  Jul 4 '16 at 13:06











                • This kind of works, but when connecting to a qemu serial pty this really kills it. That means I can't reconnect to it after that. With picocom, I can easily terminate the serial connection and reconnect later.

                  – maxschlepzig
                  Mar 7 '18 at 15:04













                17












                17








                17







                Use the screen quit command (normally ctrl-A ).






                share|improve this answer















                Use the screen quit command (normally ctrl-A ).







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Oct 21 '17 at 12:51









                lumio

                1034




                1034










                answered Jan 25 '15 at 0:46









                aecolleyaecolley

                1,712811




                1,712811












                • Ctrl+a Ctrl+-, yields a blank screen, Ctrl+a Ctrl+c yields a new screen, which Ctrl+D then is able to exit like all other screens I've encountered before this.

                  – Walrus the Cat
                  Jan 25 '15 at 0:55






                • 2





                  Oops, markdown turned my "ctrl-" into "ctrl-". Fixed.

                  – aecolley
                  Jan 25 '15 at 1:04







                • 8





                  It worked as Ctrl-a (that is Ctrl-a and then plain without ctrl). Strange that the link provided includes a Ctrl for the .

                  – niels
                  Jul 4 '16 at 13:06











                • This kind of works, but when connecting to a qemu serial pty this really kills it. That means I can't reconnect to it after that. With picocom, I can easily terminate the serial connection and reconnect later.

                  – maxschlepzig
                  Mar 7 '18 at 15:04

















                • Ctrl+a Ctrl+-, yields a blank screen, Ctrl+a Ctrl+c yields a new screen, which Ctrl+D then is able to exit like all other screens I've encountered before this.

                  – Walrus the Cat
                  Jan 25 '15 at 0:55






                • 2





                  Oops, markdown turned my "ctrl-" into "ctrl-". Fixed.

                  – aecolley
                  Jan 25 '15 at 1:04







                • 8





                  It worked as Ctrl-a (that is Ctrl-a and then plain without ctrl). Strange that the link provided includes a Ctrl for the .

                  – niels
                  Jul 4 '16 at 13:06











                • This kind of works, but when connecting to a qemu serial pty this really kills it. That means I can't reconnect to it after that. With picocom, I can easily terminate the serial connection and reconnect later.

                  – maxschlepzig
                  Mar 7 '18 at 15:04
















                Ctrl+a Ctrl+-, yields a blank screen, Ctrl+a Ctrl+c yields a new screen, which Ctrl+D then is able to exit like all other screens I've encountered before this.

                – Walrus the Cat
                Jan 25 '15 at 0:55





                Ctrl+a Ctrl+-, yields a blank screen, Ctrl+a Ctrl+c yields a new screen, which Ctrl+D then is able to exit like all other screens I've encountered before this.

                – Walrus the Cat
                Jan 25 '15 at 0:55




                2




                2





                Oops, markdown turned my "ctrl-" into "ctrl-". Fixed.

                – aecolley
                Jan 25 '15 at 1:04






                Oops, markdown turned my "ctrl-" into "ctrl-". Fixed.

                – aecolley
                Jan 25 '15 at 1:04





                8




                8





                It worked as Ctrl-a (that is Ctrl-a and then plain without ctrl). Strange that the link provided includes a Ctrl for the .

                – niels
                Jul 4 '16 at 13:06





                It worked as Ctrl-a (that is Ctrl-a and then plain without ctrl). Strange that the link provided includes a Ctrl for the .

                – niels
                Jul 4 '16 at 13:06













                This kind of works, but when connecting to a qemu serial pty this really kills it. That means I can't reconnect to it after that. With picocom, I can easily terminate the serial connection and reconnect later.

                – maxschlepzig
                Mar 7 '18 at 15:04





                This kind of works, but when connecting to a qemu serial pty this really kills it. That means I can't reconnect to it after that. With picocom, I can easily terminate the serial connection and reconnect later.

                – maxschlepzig
                Mar 7 '18 at 15:04













                6














                Though aecolley's answer usually works then it did not work for me (could be because of Icelandic keyboard and Icelandic locale, but somehow doubt it). When in that situation then you can go to a different console and execute screen -ls and take note of the screen session number, the output should be something like this:



                There is a screen on:
                6254.tty2.hostname (Attached)
                1 Socket in /var/run/screen/S-root


                The screen session number her is then 6254.



                Then you can issue the following command to close that screen session: screen -X -S 6254 quit






                share|improve this answer



























                  6














                  Though aecolley's answer usually works then it did not work for me (could be because of Icelandic keyboard and Icelandic locale, but somehow doubt it). When in that situation then you can go to a different console and execute screen -ls and take note of the screen session number, the output should be something like this:



                  There is a screen on:
                  6254.tty2.hostname (Attached)
                  1 Socket in /var/run/screen/S-root


                  The screen session number her is then 6254.



                  Then you can issue the following command to close that screen session: screen -X -S 6254 quit






                  share|improve this answer

























                    6












                    6








                    6







                    Though aecolley's answer usually works then it did not work for me (could be because of Icelandic keyboard and Icelandic locale, but somehow doubt it). When in that situation then you can go to a different console and execute screen -ls and take note of the screen session number, the output should be something like this:



                    There is a screen on:
                    6254.tty2.hostname (Attached)
                    1 Socket in /var/run/screen/S-root


                    The screen session number her is then 6254.



                    Then you can issue the following command to close that screen session: screen -X -S 6254 quit






                    share|improve this answer













                    Though aecolley's answer usually works then it did not work for me (could be because of Icelandic keyboard and Icelandic locale, but somehow doubt it). When in that situation then you can go to a different console and execute screen -ls and take note of the screen session number, the output should be something like this:



                    There is a screen on:
                    6254.tty2.hostname (Attached)
                    1 Socket in /var/run/screen/S-root


                    The screen session number her is then 6254.



                    Then you can issue the following command to close that screen session: screen -X -S 6254 quit







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Feb 29 '16 at 12:50









                    ojsojs

                    636410




                    636410





















                        6














                        I run all my terminals inside a screen, and also sometimes use screen to connect to serial. If you screen /dev/ttyUSB0 inside screen, you'll just get a new window in your current session, not a new child screen.



                        In this case, press Ctrl-A k to kill only the current window rather than the entire screen process and your other windows with it. This is the kill window command.






                        share|improve this answer



























                          6














                          I run all my terminals inside a screen, and also sometimes use screen to connect to serial. If you screen /dev/ttyUSB0 inside screen, you'll just get a new window in your current session, not a new child screen.



                          In this case, press Ctrl-A k to kill only the current window rather than the entire screen process and your other windows with it. This is the kill window command.






                          share|improve this answer

























                            6












                            6








                            6







                            I run all my terminals inside a screen, and also sometimes use screen to connect to serial. If you screen /dev/ttyUSB0 inside screen, you'll just get a new window in your current session, not a new child screen.



                            In this case, press Ctrl-A k to kill only the current window rather than the entire screen process and your other windows with it. This is the kill window command.






                            share|improve this answer













                            I run all my terminals inside a screen, and also sometimes use screen to connect to serial. If you screen /dev/ttyUSB0 inside screen, you'll just get a new window in your current session, not a new child screen.



                            In this case, press Ctrl-A k to kill only the current window rather than the entire screen process and your other windows with it. This is the kill window command.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 9 '17 at 19:59









                            arantiusarantius

                            17615




                            17615





















                                0














                                For me the issue turned out to be that I had inadvertently logged out of the Linux user account, and not the system I was controlling through the serial port. Once I logged back in, all of the normal screen commands such as Ctrl+a, k began working again.



                                Beyond that, if you can open a new screen window (Ctrl+a, c), another TTY (Ctrl+Alt+F1..12, or an SSH session, then you can run pkill screen or kill <PID of screen>.






                                share|improve this answer



























                                  0














                                  For me the issue turned out to be that I had inadvertently logged out of the Linux user account, and not the system I was controlling through the serial port. Once I logged back in, all of the normal screen commands such as Ctrl+a, k began working again.



                                  Beyond that, if you can open a new screen window (Ctrl+a, c), another TTY (Ctrl+Alt+F1..12, or an SSH session, then you can run pkill screen or kill <PID of screen>.






                                  share|improve this answer

























                                    0












                                    0








                                    0







                                    For me the issue turned out to be that I had inadvertently logged out of the Linux user account, and not the system I was controlling through the serial port. Once I logged back in, all of the normal screen commands such as Ctrl+a, k began working again.



                                    Beyond that, if you can open a new screen window (Ctrl+a, c), another TTY (Ctrl+Alt+F1..12, or an SSH session, then you can run pkill screen or kill <PID of screen>.






                                    share|improve this answer













                                    For me the issue turned out to be that I had inadvertently logged out of the Linux user account, and not the system I was controlling through the serial port. Once I logged back in, all of the normal screen commands such as Ctrl+a, k began working again.



                                    Beyond that, if you can open a new screen window (Ctrl+a, c), another TTY (Ctrl+Alt+F1..12, or an SSH session, then you can run pkill screen or kill <PID of screen>.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Jan 24 at 22:42









                                    Drew ChapinDrew Chapin

                                    4671612




                                    4671612



























                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f180900%2fterminate-screen-monitoring-serial-port%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown






                                        Popular posts from this blog

                                        How to check contact read email or not when send email to Individual?

                                        Displaying single band from multi-band raster using QGIS

                                        How many registers does an x86_64 CPU actually have?