kill a screen session












47














I'm trying to kill a screen session. I noticed a lot of other related questions, but none of those answers are working for me. I am trying to kill the following session:



screen -ls
There is a screen on:
23520.pts-6.porkypig (09/30/2013 02:49:47 PM) (Detached)
1 Socket in /var/run/screen/S-root.

screen -r 23520.pts-6.porkypig


Now I am in the session. According to the documentation:



http://www.gnu.org/software/screen/manual/screen.html#Quit



I am supposed to press "control a" and then "control ". I do that and nothing happens.



Another solution said to press Ctrl+a and type :quit. However, again it doesn't do anything. In fact, pressing control+a, absolutely nothing happens afterwards except a message "No Other Window"










share|improve this question
























  • in screen v4.x, to kill all sessions, ps aux | grep "SCREEN" | awk '{print $2}' | xargs kill
    – Fredrick Gauss
    Nov 28 '14 at 7:33






  • 1




    For the record, you can just do screen -r porkypig or screen -r 23520, rather than having to include the full string. Screen names are supposed to make things easier, not more complicated.
    – Mikkel
    Sep 26 '16 at 14:52
















47














I'm trying to kill a screen session. I noticed a lot of other related questions, but none of those answers are working for me. I am trying to kill the following session:



screen -ls
There is a screen on:
23520.pts-6.porkypig (09/30/2013 02:49:47 PM) (Detached)
1 Socket in /var/run/screen/S-root.

screen -r 23520.pts-6.porkypig


Now I am in the session. According to the documentation:



http://www.gnu.org/software/screen/manual/screen.html#Quit



I am supposed to press "control a" and then "control ". I do that and nothing happens.



Another solution said to press Ctrl+a and type :quit. However, again it doesn't do anything. In fact, pressing control+a, absolutely nothing happens afterwards except a message "No Other Window"










share|improve this question
























  • in screen v4.x, to kill all sessions, ps aux | grep "SCREEN" | awk '{print $2}' | xargs kill
    – Fredrick Gauss
    Nov 28 '14 at 7:33






  • 1




    For the record, you can just do screen -r porkypig or screen -r 23520, rather than having to include the full string. Screen names are supposed to make things easier, not more complicated.
    – Mikkel
    Sep 26 '16 at 14:52














47












47








47


15





I'm trying to kill a screen session. I noticed a lot of other related questions, but none of those answers are working for me. I am trying to kill the following session:



screen -ls
There is a screen on:
23520.pts-6.porkypig (09/30/2013 02:49:47 PM) (Detached)
1 Socket in /var/run/screen/S-root.

screen -r 23520.pts-6.porkypig


Now I am in the session. According to the documentation:



http://www.gnu.org/software/screen/manual/screen.html#Quit



I am supposed to press "control a" and then "control ". I do that and nothing happens.



Another solution said to press Ctrl+a and type :quit. However, again it doesn't do anything. In fact, pressing control+a, absolutely nothing happens afterwards except a message "No Other Window"










share|improve this question















I'm trying to kill a screen session. I noticed a lot of other related questions, but none of those answers are working for me. I am trying to kill the following session:



screen -ls
There is a screen on:
23520.pts-6.porkypig (09/30/2013 02:49:47 PM) (Detached)
1 Socket in /var/run/screen/S-root.

screen -r 23520.pts-6.porkypig


Now I am in the session. According to the documentation:



http://www.gnu.org/software/screen/manual/screen.html#Quit



I am supposed to press "control a" and then "control ". I do that and nothing happens.



Another solution said to press Ctrl+a and type :quit. However, again it doesn't do anything. In fact, pressing control+a, absolutely nothing happens afterwards except a message "No Other Window"







gnu-screen






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 21 '18 at 9:30









mature

1,704524




1,704524










asked Oct 9 '13 at 21:35









JohnMerlinoJohnMerlino

2,129163960




2,129163960












  • in screen v4.x, to kill all sessions, ps aux | grep "SCREEN" | awk '{print $2}' | xargs kill
    – Fredrick Gauss
    Nov 28 '14 at 7:33






  • 1




    For the record, you can just do screen -r porkypig or screen -r 23520, rather than having to include the full string. Screen names are supposed to make things easier, not more complicated.
    – Mikkel
    Sep 26 '16 at 14:52


















  • in screen v4.x, to kill all sessions, ps aux | grep "SCREEN" | awk '{print $2}' | xargs kill
    – Fredrick Gauss
    Nov 28 '14 at 7:33






  • 1




    For the record, you can just do screen -r porkypig or screen -r 23520, rather than having to include the full string. Screen names are supposed to make things easier, not more complicated.
    – Mikkel
    Sep 26 '16 at 14:52
















in screen v4.x, to kill all sessions, ps aux | grep "SCREEN" | awk '{print $2}' | xargs kill
– Fredrick Gauss
Nov 28 '14 at 7:33




in screen v4.x, to kill all sessions, ps aux | grep "SCREEN" | awk '{print $2}' | xargs kill
– Fredrick Gauss
Nov 28 '14 at 7:33




1




1




For the record, you can just do screen -r porkypig or screen -r 23520, rather than having to include the full string. Screen names are supposed to make things easier, not more complicated.
– Mikkel
Sep 26 '16 at 14:52




For the record, you can just do screen -r porkypig or screen -r 23520, rather than having to include the full string. Screen names are supposed to make things easier, not more complicated.
– Mikkel
Sep 26 '16 at 14:52










8 Answers
8






active

oldest

votes


















59














first you need to re attach to the screen session
screen -r 23520 as you have done. Then press ctrl + a and then a capital K and press y when it asks if you really want to kill the session






share|improve this answer



















  • 1




    This works if there is a problem with a process running inside the screen, but not if there is a problem with screen itself. That is the case 99% of the time, and has the added benefit of only affecting a single window within the screen rather than terminating all windows.
    – Mikkel
    Sep 26 '16 at 14:51



















32














You can quit that screen without attaching to it. First, find its session:



$ screen -ls


and then quit it:



$ screen -XS [session # you want to quit] quit





share|improve this answer



















  • 1




    This was pretty simple. You can simplify it even more by combining the -X -S with -XS
    – AJ.
    Nov 10 '16 at 3:34






  • 2




    You should give credit to innaM answer if you copy it
    – Martin Thoma
    May 1 '17 at 14:47





















7














This will kill all the detached screens:




screen -ls | grep detached | cut -d. -f1 | awk '{print $1}' | xargs kill


This will kill all screens, attached or detached




screen -ls | grep pts | cut -d. -f1 | awk '{print $1}' | xargs kill





share|improve this answer































    7














    So with all those official suggestions, lets just go for something easier, and just as effective, and kind of more straight forward.



    pkill screen



    Who wants to go into an unknown and un-needed screen just to press in a couple commands that most might barely remember? This avoids going into it at all, and kills it straight off.



    Plus, if you have more than one, this will take them all in one fell swoop.






    share|improve this answer

















    • 1




      Note that this will kill all running screens, which may or may not be what you want.
      – Mikkel
      Sep 26 '16 at 14:57










    • Not a good choice. I've been doing it for some time. Sometimes it causes bad behaviors (e.g. logging out from your user account immediately). Also, as @Mikkel mentioned, it could cause to close all your screens, which would not be what you want. Sometimes you need to keep running some (e.g. some are running by system) and stop some other screens.
      – MAChitgarha
      Sep 4 '18 at 5:14



















    2














    I encountered this problem when updating screen. The screen command would hang when attempting to reattach the session, regardless of how many -D or -R I added to the command. However, screen -ls conveniently provides the pid of the session, allowing you to intervene using the following:



    10:42 user ~ $ screen -ls
    There is a screen on:
    5730.my_screen (Detached)
    1 Socket in /tmp/screens/S-user.

    10:42 user ~ $ sudo kill 5730

    10:43 user ~ $ screen -ls
    No Sockets found in /tmp/screens/S-user.


    (This is similar to Brian Thomas's answer, but his will kill all running screen sessions, which may not be what you want if you have multiple screens open but only one misbehaving.)






    share|improve this answer





















    • After 6 hours breaking my head all over internet... yours was the only answer that worked. Thanks mate!
      – kRazzy R
      Sep 30 '17 at 6:43



















    1














    Like you, I wanted to kill my screen session and found the documentation unhelpful. Convinced that there must be a keyboard shortcut, I found that
    ctrl + a then

    works



    I then get the prompt:
    "Really quit and kill all your windows [yn]"



    I am not sure why the documentation says ctrl + a then ctrl + . That doesn't do anything for me.






    share|improve this answer





























      0














      You can find the process id of the attached running screen. I found it same as the session id which you can get by command:
      screen -ls

      And you can use following command to kill that process:
      kill [sessionId] or
      sudo kill [sessionId]

      You can kill the screen even if it is attached on some other terminal window.






      share|improve this answer





























        -1














        Just press Ctrl+D and it's terminated.






        share|improve this answer























        • I don't think this works for the OP.
          – Mark Yisri
          Nov 27 '16 at 15:21










        • The question is 3 years old and the OP hasn't signed on for almost 18 months so it's a wasted answer for the OP at least.
          – WinEunuuchs2Unix
          Nov 27 '16 at 17:12











        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        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: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        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%2faskubuntu.com%2fquestions%2f356006%2fkill-a-screen-session%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        8 Answers
        8






        active

        oldest

        votes








        8 Answers
        8






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        59














        first you need to re attach to the screen session
        screen -r 23520 as you have done. Then press ctrl + a and then a capital K and press y when it asks if you really want to kill the session






        share|improve this answer



















        • 1




          This works if there is a problem with a process running inside the screen, but not if there is a problem with screen itself. That is the case 99% of the time, and has the added benefit of only affecting a single window within the screen rather than terminating all windows.
          – Mikkel
          Sep 26 '16 at 14:51
















        59














        first you need to re attach to the screen session
        screen -r 23520 as you have done. Then press ctrl + a and then a capital K and press y when it asks if you really want to kill the session






        share|improve this answer



















        • 1




          This works if there is a problem with a process running inside the screen, but not if there is a problem with screen itself. That is the case 99% of the time, and has the added benefit of only affecting a single window within the screen rather than terminating all windows.
          – Mikkel
          Sep 26 '16 at 14:51














        59












        59








        59






        first you need to re attach to the screen session
        screen -r 23520 as you have done. Then press ctrl + a and then a capital K and press y when it asks if you really want to kill the session






        share|improve this answer














        first you need to re attach to the screen session
        screen -r 23520 as you have done. Then press ctrl + a and then a capital K and press y when it asks if you really want to kill the session







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 9 '15 at 20:23









        Drakonas

        32




        32










        answered Oct 9 '13 at 22:25









        Jacob MinshallJacob Minshall

        93699




        93699








        • 1




          This works if there is a problem with a process running inside the screen, but not if there is a problem with screen itself. That is the case 99% of the time, and has the added benefit of only affecting a single window within the screen rather than terminating all windows.
          – Mikkel
          Sep 26 '16 at 14:51














        • 1




          This works if there is a problem with a process running inside the screen, but not if there is a problem with screen itself. That is the case 99% of the time, and has the added benefit of only affecting a single window within the screen rather than terminating all windows.
          – Mikkel
          Sep 26 '16 at 14:51








        1




        1




        This works if there is a problem with a process running inside the screen, but not if there is a problem with screen itself. That is the case 99% of the time, and has the added benefit of only affecting a single window within the screen rather than terminating all windows.
        – Mikkel
        Sep 26 '16 at 14:51




        This works if there is a problem with a process running inside the screen, but not if there is a problem with screen itself. That is the case 99% of the time, and has the added benefit of only affecting a single window within the screen rather than terminating all windows.
        – Mikkel
        Sep 26 '16 at 14:51













        32














        You can quit that screen without attaching to it. First, find its session:



        $ screen -ls


        and then quit it:



        $ screen -XS [session # you want to quit] quit





        share|improve this answer



















        • 1




          This was pretty simple. You can simplify it even more by combining the -X -S with -XS
          – AJ.
          Nov 10 '16 at 3:34






        • 2




          You should give credit to innaM answer if you copy it
          – Martin Thoma
          May 1 '17 at 14:47


















        32














        You can quit that screen without attaching to it. First, find its session:



        $ screen -ls


        and then quit it:



        $ screen -XS [session # you want to quit] quit





        share|improve this answer



















        • 1




          This was pretty simple. You can simplify it even more by combining the -X -S with -XS
          – AJ.
          Nov 10 '16 at 3:34






        • 2




          You should give credit to innaM answer if you copy it
          – Martin Thoma
          May 1 '17 at 14:47
















        32












        32








        32






        You can quit that screen without attaching to it. First, find its session:



        $ screen -ls


        and then quit it:



        $ screen -XS [session # you want to quit] quit





        share|improve this answer














        You can quit that screen without attaching to it. First, find its session:



        $ screen -ls


        and then quit it:



        $ screen -XS [session # you want to quit] quit






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 14 '18 at 4:15

























        answered Jul 5 '14 at 9:25









        shgnIncshgnInc

        1,20331623




        1,20331623








        • 1




          This was pretty simple. You can simplify it even more by combining the -X -S with -XS
          – AJ.
          Nov 10 '16 at 3:34






        • 2




          You should give credit to innaM answer if you copy it
          – Martin Thoma
          May 1 '17 at 14:47
















        • 1




          This was pretty simple. You can simplify it even more by combining the -X -S with -XS
          – AJ.
          Nov 10 '16 at 3:34






        • 2




          You should give credit to innaM answer if you copy it
          – Martin Thoma
          May 1 '17 at 14:47










        1




        1




        This was pretty simple. You can simplify it even more by combining the -X -S with -XS
        – AJ.
        Nov 10 '16 at 3:34




        This was pretty simple. You can simplify it even more by combining the -X -S with -XS
        – AJ.
        Nov 10 '16 at 3:34




        2




        2




        You should give credit to innaM answer if you copy it
        – Martin Thoma
        May 1 '17 at 14:47






        You should give credit to innaM answer if you copy it
        – Martin Thoma
        May 1 '17 at 14:47













        7














        This will kill all the detached screens:




        screen -ls | grep detached | cut -d. -f1 | awk '{print $1}' | xargs kill


        This will kill all screens, attached or detached




        screen -ls | grep pts | cut -d. -f1 | awk '{print $1}' | xargs kill





        share|improve this answer




























          7














          This will kill all the detached screens:




          screen -ls | grep detached | cut -d. -f1 | awk '{print $1}' | xargs kill


          This will kill all screens, attached or detached




          screen -ls | grep pts | cut -d. -f1 | awk '{print $1}' | xargs kill





          share|improve this answer


























            7












            7








            7






            This will kill all the detached screens:




            screen -ls | grep detached | cut -d. -f1 | awk '{print $1}' | xargs kill


            This will kill all screens, attached or detached




            screen -ls | grep pts | cut -d. -f1 | awk '{print $1}' | xargs kill





            share|improve this answer














            This will kill all the detached screens:




            screen -ls | grep detached | cut -d. -f1 | awk '{print $1}' | xargs kill


            This will kill all screens, attached or detached




            screen -ls | grep pts | cut -d. -f1 | awk '{print $1}' | xargs kill






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Sep 6 '14 at 13:59









            Adaephon

            3,00511724




            3,00511724










            answered Sep 6 '14 at 10:12









            user324207user324207

            7111




            7111























                7














                So with all those official suggestions, lets just go for something easier, and just as effective, and kind of more straight forward.



                pkill screen



                Who wants to go into an unknown and un-needed screen just to press in a couple commands that most might barely remember? This avoids going into it at all, and kills it straight off.



                Plus, if you have more than one, this will take them all in one fell swoop.






                share|improve this answer

















                • 1




                  Note that this will kill all running screens, which may or may not be what you want.
                  – Mikkel
                  Sep 26 '16 at 14:57










                • Not a good choice. I've been doing it for some time. Sometimes it causes bad behaviors (e.g. logging out from your user account immediately). Also, as @Mikkel mentioned, it could cause to close all your screens, which would not be what you want. Sometimes you need to keep running some (e.g. some are running by system) and stop some other screens.
                  – MAChitgarha
                  Sep 4 '18 at 5:14
















                7














                So with all those official suggestions, lets just go for something easier, and just as effective, and kind of more straight forward.



                pkill screen



                Who wants to go into an unknown and un-needed screen just to press in a couple commands that most might barely remember? This avoids going into it at all, and kills it straight off.



                Plus, if you have more than one, this will take them all in one fell swoop.






                share|improve this answer

















                • 1




                  Note that this will kill all running screens, which may or may not be what you want.
                  – Mikkel
                  Sep 26 '16 at 14:57










                • Not a good choice. I've been doing it for some time. Sometimes it causes bad behaviors (e.g. logging out from your user account immediately). Also, as @Mikkel mentioned, it could cause to close all your screens, which would not be what you want. Sometimes you need to keep running some (e.g. some are running by system) and stop some other screens.
                  – MAChitgarha
                  Sep 4 '18 at 5:14














                7












                7








                7






                So with all those official suggestions, lets just go for something easier, and just as effective, and kind of more straight forward.



                pkill screen



                Who wants to go into an unknown and un-needed screen just to press in a couple commands that most might barely remember? This avoids going into it at all, and kills it straight off.



                Plus, if you have more than one, this will take them all in one fell swoop.






                share|improve this answer












                So with all those official suggestions, lets just go for something easier, and just as effective, and kind of more straight forward.



                pkill screen



                Who wants to go into an unknown and un-needed screen just to press in a couple commands that most might barely remember? This avoids going into it at all, and kills it straight off.



                Plus, if you have more than one, this will take them all in one fell swoop.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 19 '16 at 4:05









                Brian ThomasBrian Thomas

                21526




                21526








                • 1




                  Note that this will kill all running screens, which may or may not be what you want.
                  – Mikkel
                  Sep 26 '16 at 14:57










                • Not a good choice. I've been doing it for some time. Sometimes it causes bad behaviors (e.g. logging out from your user account immediately). Also, as @Mikkel mentioned, it could cause to close all your screens, which would not be what you want. Sometimes you need to keep running some (e.g. some are running by system) and stop some other screens.
                  – MAChitgarha
                  Sep 4 '18 at 5:14














                • 1




                  Note that this will kill all running screens, which may or may not be what you want.
                  – Mikkel
                  Sep 26 '16 at 14:57










                • Not a good choice. I've been doing it for some time. Sometimes it causes bad behaviors (e.g. logging out from your user account immediately). Also, as @Mikkel mentioned, it could cause to close all your screens, which would not be what you want. Sometimes you need to keep running some (e.g. some are running by system) and stop some other screens.
                  – MAChitgarha
                  Sep 4 '18 at 5:14








                1




                1




                Note that this will kill all running screens, which may or may not be what you want.
                – Mikkel
                Sep 26 '16 at 14:57




                Note that this will kill all running screens, which may or may not be what you want.
                – Mikkel
                Sep 26 '16 at 14:57












                Not a good choice. I've been doing it for some time. Sometimes it causes bad behaviors (e.g. logging out from your user account immediately). Also, as @Mikkel mentioned, it could cause to close all your screens, which would not be what you want. Sometimes you need to keep running some (e.g. some are running by system) and stop some other screens.
                – MAChitgarha
                Sep 4 '18 at 5:14




                Not a good choice. I've been doing it for some time. Sometimes it causes bad behaviors (e.g. logging out from your user account immediately). Also, as @Mikkel mentioned, it could cause to close all your screens, which would not be what you want. Sometimes you need to keep running some (e.g. some are running by system) and stop some other screens.
                – MAChitgarha
                Sep 4 '18 at 5:14











                2














                I encountered this problem when updating screen. The screen command would hang when attempting to reattach the session, regardless of how many -D or -R I added to the command. However, screen -ls conveniently provides the pid of the session, allowing you to intervene using the following:



                10:42 user ~ $ screen -ls
                There is a screen on:
                5730.my_screen (Detached)
                1 Socket in /tmp/screens/S-user.

                10:42 user ~ $ sudo kill 5730

                10:43 user ~ $ screen -ls
                No Sockets found in /tmp/screens/S-user.


                (This is similar to Brian Thomas's answer, but his will kill all running screen sessions, which may not be what you want if you have multiple screens open but only one misbehaving.)






                share|improve this answer





















                • After 6 hours breaking my head all over internet... yours was the only answer that worked. Thanks mate!
                  – kRazzy R
                  Sep 30 '17 at 6:43
















                2














                I encountered this problem when updating screen. The screen command would hang when attempting to reattach the session, regardless of how many -D or -R I added to the command. However, screen -ls conveniently provides the pid of the session, allowing you to intervene using the following:



                10:42 user ~ $ screen -ls
                There is a screen on:
                5730.my_screen (Detached)
                1 Socket in /tmp/screens/S-user.

                10:42 user ~ $ sudo kill 5730

                10:43 user ~ $ screen -ls
                No Sockets found in /tmp/screens/S-user.


                (This is similar to Brian Thomas's answer, but his will kill all running screen sessions, which may not be what you want if you have multiple screens open but only one misbehaving.)






                share|improve this answer





















                • After 6 hours breaking my head all over internet... yours was the only answer that worked. Thanks mate!
                  – kRazzy R
                  Sep 30 '17 at 6:43














                2












                2








                2






                I encountered this problem when updating screen. The screen command would hang when attempting to reattach the session, regardless of how many -D or -R I added to the command. However, screen -ls conveniently provides the pid of the session, allowing you to intervene using the following:



                10:42 user ~ $ screen -ls
                There is a screen on:
                5730.my_screen (Detached)
                1 Socket in /tmp/screens/S-user.

                10:42 user ~ $ sudo kill 5730

                10:43 user ~ $ screen -ls
                No Sockets found in /tmp/screens/S-user.


                (This is similar to Brian Thomas's answer, but his will kill all running screen sessions, which may not be what you want if you have multiple screens open but only one misbehaving.)






                share|improve this answer












                I encountered this problem when updating screen. The screen command would hang when attempting to reattach the session, regardless of how many -D or -R I added to the command. However, screen -ls conveniently provides the pid of the session, allowing you to intervene using the following:



                10:42 user ~ $ screen -ls
                There is a screen on:
                5730.my_screen (Detached)
                1 Socket in /tmp/screens/S-user.

                10:42 user ~ $ sudo kill 5730

                10:43 user ~ $ screen -ls
                No Sockets found in /tmp/screens/S-user.


                (This is similar to Brian Thomas's answer, but his will kill all running screen sessions, which may not be what you want if you have multiple screens open but only one misbehaving.)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 26 '16 at 14:47









                MikkelMikkel

                288210




                288210












                • After 6 hours breaking my head all over internet... yours was the only answer that worked. Thanks mate!
                  – kRazzy R
                  Sep 30 '17 at 6:43


















                • After 6 hours breaking my head all over internet... yours was the only answer that worked. Thanks mate!
                  – kRazzy R
                  Sep 30 '17 at 6:43
















                After 6 hours breaking my head all over internet... yours was the only answer that worked. Thanks mate!
                – kRazzy R
                Sep 30 '17 at 6:43




                After 6 hours breaking my head all over internet... yours was the only answer that worked. Thanks mate!
                – kRazzy R
                Sep 30 '17 at 6:43











                1














                Like you, I wanted to kill my screen session and found the documentation unhelpful. Convinced that there must be a keyboard shortcut, I found that
                ctrl + a then

                works



                I then get the prompt:
                "Really quit and kill all your windows [yn]"



                I am not sure why the documentation says ctrl + a then ctrl + . That doesn't do anything for me.






                share|improve this answer


























                  1














                  Like you, I wanted to kill my screen session and found the documentation unhelpful. Convinced that there must be a keyboard shortcut, I found that
                  ctrl + a then

                  works



                  I then get the prompt:
                  "Really quit and kill all your windows [yn]"



                  I am not sure why the documentation says ctrl + a then ctrl + . That doesn't do anything for me.






                  share|improve this answer
























                    1












                    1








                    1






                    Like you, I wanted to kill my screen session and found the documentation unhelpful. Convinced that there must be a keyboard shortcut, I found that
                    ctrl + a then

                    works



                    I then get the prompt:
                    "Really quit and kill all your windows [yn]"



                    I am not sure why the documentation says ctrl + a then ctrl + . That doesn't do anything for me.






                    share|improve this answer












                    Like you, I wanted to kill my screen session and found the documentation unhelpful. Convinced that there must be a keyboard shortcut, I found that
                    ctrl + a then

                    works



                    I then get the prompt:
                    "Really quit and kill all your windows [yn]"



                    I am not sure why the documentation says ctrl + a then ctrl + . That doesn't do anything for me.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Feb 15 '18 at 21:35









                    lizplizp

                    111




                    111























                        0














                        You can find the process id of the attached running screen. I found it same as the session id which you can get by command:
                        screen -ls

                        And you can use following command to kill that process:
                        kill [sessionId] or
                        sudo kill [sessionId]

                        You can kill the screen even if it is attached on some other terminal window.






                        share|improve this answer


























                          0














                          You can find the process id of the attached running screen. I found it same as the session id which you can get by command:
                          screen -ls

                          And you can use following command to kill that process:
                          kill [sessionId] or
                          sudo kill [sessionId]

                          You can kill the screen even if it is attached on some other terminal window.






                          share|improve this answer
























                            0












                            0








                            0






                            You can find the process id of the attached running screen. I found it same as the session id which you can get by command:
                            screen -ls

                            And you can use following command to kill that process:
                            kill [sessionId] or
                            sudo kill [sessionId]

                            You can kill the screen even if it is attached on some other terminal window.






                            share|improve this answer












                            You can find the process id of the attached running screen. I found it same as the session id which you can get by command:
                            screen -ls

                            And you can use following command to kill that process:
                            kill [sessionId] or
                            sudo kill [sessionId]

                            You can kill the screen even if it is attached on some other terminal window.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 21 '18 at 7:18









                            SiddhantSiddhant

                            1




                            1























                                -1














                                Just press Ctrl+D and it's terminated.






                                share|improve this answer























                                • I don't think this works for the OP.
                                  – Mark Yisri
                                  Nov 27 '16 at 15:21










                                • The question is 3 years old and the OP hasn't signed on for almost 18 months so it's a wasted answer for the OP at least.
                                  – WinEunuuchs2Unix
                                  Nov 27 '16 at 17:12
















                                -1














                                Just press Ctrl+D and it's terminated.






                                share|improve this answer























                                • I don't think this works for the OP.
                                  – Mark Yisri
                                  Nov 27 '16 at 15:21










                                • The question is 3 years old and the OP hasn't signed on for almost 18 months so it's a wasted answer for the OP at least.
                                  – WinEunuuchs2Unix
                                  Nov 27 '16 at 17:12














                                -1












                                -1








                                -1






                                Just press Ctrl+D and it's terminated.






                                share|improve this answer














                                Just press Ctrl+D and it's terminated.







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Nov 27 '16 at 21:17









                                David Foerster

                                27.9k1364110




                                27.9k1364110










                                answered Nov 27 '16 at 14:46









                                aminamin

                                1




                                1












                                • I don't think this works for the OP.
                                  – Mark Yisri
                                  Nov 27 '16 at 15:21










                                • The question is 3 years old and the OP hasn't signed on for almost 18 months so it's a wasted answer for the OP at least.
                                  – WinEunuuchs2Unix
                                  Nov 27 '16 at 17:12


















                                • I don't think this works for the OP.
                                  – Mark Yisri
                                  Nov 27 '16 at 15:21










                                • The question is 3 years old and the OP hasn't signed on for almost 18 months so it's a wasted answer for the OP at least.
                                  – WinEunuuchs2Unix
                                  Nov 27 '16 at 17:12
















                                I don't think this works for the OP.
                                – Mark Yisri
                                Nov 27 '16 at 15:21




                                I don't think this works for the OP.
                                – Mark Yisri
                                Nov 27 '16 at 15:21












                                The question is 3 years old and the OP hasn't signed on for almost 18 months so it's a wasted answer for the OP at least.
                                – WinEunuuchs2Unix
                                Nov 27 '16 at 17:12




                                The question is 3 years old and the OP hasn't signed on for almost 18 months so it's a wasted answer for the OP at least.
                                – WinEunuuchs2Unix
                                Nov 27 '16 at 17:12


















                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • 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%2faskubuntu.com%2fquestions%2f356006%2fkill-a-screen-session%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

                                Quarter-circle Tiles

                                build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                                Mont Emei