exit tmux window without quitting the Terminal program

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











up vote
52
down vote

favorite
12












OK I'm new to this. I installed tmux to run a several days experiment. After typing tmux new -s name I got a new window with green banner at the bottom. I compile and run java program. Now I do not know how to exit the window (while leave it running). The bash (or whatever) cursor is not responding because the java program is still running. My solution so far is to quit the Terminal program completely and reopen it again. Any ideas on how to quit the tmux window without exiting the whole Terminal program?










share|improve this question

















  • 2




    man tmux | less -p detach
    – jasonwryan
    Dec 16 '14 at 3:47














up vote
52
down vote

favorite
12












OK I'm new to this. I installed tmux to run a several days experiment. After typing tmux new -s name I got a new window with green banner at the bottom. I compile and run java program. Now I do not know how to exit the window (while leave it running). The bash (or whatever) cursor is not responding because the java program is still running. My solution so far is to quit the Terminal program completely and reopen it again. Any ideas on how to quit the tmux window without exiting the whole Terminal program?










share|improve this question

















  • 2




    man tmux | less -p detach
    – jasonwryan
    Dec 16 '14 at 3:47












up vote
52
down vote

favorite
12









up vote
52
down vote

favorite
12






12





OK I'm new to this. I installed tmux to run a several days experiment. After typing tmux new -s name I got a new window with green banner at the bottom. I compile and run java program. Now I do not know how to exit the window (while leave it running). The bash (or whatever) cursor is not responding because the java program is still running. My solution so far is to quit the Terminal program completely and reopen it again. Any ideas on how to quit the tmux window without exiting the whole Terminal program?










share|improve this question













OK I'm new to this. I installed tmux to run a several days experiment. After typing tmux new -s name I got a new window with green banner at the bottom. I compile and run java program. Now I do not know how to exit the window (while leave it running). The bash (or whatever) cursor is not responding because the java program is still running. My solution so far is to quit the Terminal program completely and reopen it again. Any ideas on how to quit the tmux window without exiting the whole Terminal program?







terminal tmux






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 16 '14 at 3:16









seteropere

369135




369135







  • 2




    man tmux | less -p detach
    – jasonwryan
    Dec 16 '14 at 3:47












  • 2




    man tmux | less -p detach
    – jasonwryan
    Dec 16 '14 at 3:47







2




2




man tmux | less -p detach
– jasonwryan
Dec 16 '14 at 3:47




man tmux | less -p detach
– jasonwryan
Dec 16 '14 at 3:47










2 Answers
2






active

oldest

votes

















up vote
110
down vote



accepted










Detach from currently attached session



Session



Ctrl+ b d or Ctrl+ b :detach



Screen



Ctrl+ a Ctrl+ d or Ctrl+ a :detach






share|improve this answer





























    up vote
    8
    down vote













    The previous answers are incomplete, I believe. What :detach does is to shut down the viewports that are displaying tmux activity. However, tmux itself is still running in the background as you can see by running ps:



    myuser 1799 0.0 0.0 2500052 4632 ?? Ss 21Feb16 0:48.39 tmux new-session -s Dev



    In fact, even if you quit terminal and start it up again, any tmux processes are STILL running in the background.



    To actually kill the tmux process itself, you have to do:



    tmux kill-session [-t session_name]



    or simply:



    kill -9 1799






    share|improve this answer


















    • 5




      Imho, it would make more sense to comment about some answer's deficiencies under that particular answer and leave your post as a complete and contained answer without requiring readers to find out which answers are previous and then analyse them.
      – techraf
      Mar 2 '16 at 14:59










    • I think OP specifically wanted the background process (java, in his case) to continue running, so killing it would be counter-productive. More interesting would be to re-attach later to the detached process with tmux attach-session.
      – ThomasH
      Mar 27 at 15:46











    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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f174440%2fexit-tmux-window-without-quitting-the-terminal-program%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    110
    down vote



    accepted










    Detach from currently attached session



    Session



    Ctrl+ b d or Ctrl+ b :detach



    Screen



    Ctrl+ a Ctrl+ d or Ctrl+ a :detach






    share|improve this answer


























      up vote
      110
      down vote



      accepted










      Detach from currently attached session



      Session



      Ctrl+ b d or Ctrl+ b :detach



      Screen



      Ctrl+ a Ctrl+ d or Ctrl+ a :detach






      share|improve this answer
























        up vote
        110
        down vote



        accepted







        up vote
        110
        down vote



        accepted






        Detach from currently attached session



        Session



        Ctrl+ b d or Ctrl+ b :detach



        Screen



        Ctrl+ a Ctrl+ d or Ctrl+ a :detach






        share|improve this answer














        Detach from currently attached session



        Session



        Ctrl+ b d or Ctrl+ b :detach



        Screen



        Ctrl+ a Ctrl+ d or Ctrl+ a :detach







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 16 '14 at 4:46









        HalosGhost

        3,57592035




        3,57592035










        answered Dec 16 '14 at 3:57









        Ruban Savvy

        4,34051839




        4,34051839






















            up vote
            8
            down vote













            The previous answers are incomplete, I believe. What :detach does is to shut down the viewports that are displaying tmux activity. However, tmux itself is still running in the background as you can see by running ps:



            myuser 1799 0.0 0.0 2500052 4632 ?? Ss 21Feb16 0:48.39 tmux new-session -s Dev



            In fact, even if you quit terminal and start it up again, any tmux processes are STILL running in the background.



            To actually kill the tmux process itself, you have to do:



            tmux kill-session [-t session_name]



            or simply:



            kill -9 1799






            share|improve this answer


















            • 5




              Imho, it would make more sense to comment about some answer's deficiencies under that particular answer and leave your post as a complete and contained answer without requiring readers to find out which answers are previous and then analyse them.
              – techraf
              Mar 2 '16 at 14:59










            • I think OP specifically wanted the background process (java, in his case) to continue running, so killing it would be counter-productive. More interesting would be to re-attach later to the detached process with tmux attach-session.
              – ThomasH
              Mar 27 at 15:46















            up vote
            8
            down vote













            The previous answers are incomplete, I believe. What :detach does is to shut down the viewports that are displaying tmux activity. However, tmux itself is still running in the background as you can see by running ps:



            myuser 1799 0.0 0.0 2500052 4632 ?? Ss 21Feb16 0:48.39 tmux new-session -s Dev



            In fact, even if you quit terminal and start it up again, any tmux processes are STILL running in the background.



            To actually kill the tmux process itself, you have to do:



            tmux kill-session [-t session_name]



            or simply:



            kill -9 1799






            share|improve this answer


















            • 5




              Imho, it would make more sense to comment about some answer's deficiencies under that particular answer and leave your post as a complete and contained answer without requiring readers to find out which answers are previous and then analyse them.
              – techraf
              Mar 2 '16 at 14:59










            • I think OP specifically wanted the background process (java, in his case) to continue running, so killing it would be counter-productive. More interesting would be to re-attach later to the detached process with tmux attach-session.
              – ThomasH
              Mar 27 at 15:46













            up vote
            8
            down vote










            up vote
            8
            down vote









            The previous answers are incomplete, I believe. What :detach does is to shut down the viewports that are displaying tmux activity. However, tmux itself is still running in the background as you can see by running ps:



            myuser 1799 0.0 0.0 2500052 4632 ?? Ss 21Feb16 0:48.39 tmux new-session -s Dev



            In fact, even if you quit terminal and start it up again, any tmux processes are STILL running in the background.



            To actually kill the tmux process itself, you have to do:



            tmux kill-session [-t session_name]



            or simply:



            kill -9 1799






            share|improve this answer














            The previous answers are incomplete, I believe. What :detach does is to shut down the viewports that are displaying tmux activity. However, tmux itself is still running in the background as you can see by running ps:



            myuser 1799 0.0 0.0 2500052 4632 ?? Ss 21Feb16 0:48.39 tmux new-session -s Dev



            In fact, even if you quit terminal and start it up again, any tmux processes are STILL running in the background.



            To actually kill the tmux process itself, you have to do:



            tmux kill-session [-t session_name]



            or simply:



            kill -9 1799







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 2 '16 at 14:59

























            answered Mar 2 '16 at 14:45









            JESii

            21024




            21024







            • 5




              Imho, it would make more sense to comment about some answer's deficiencies under that particular answer and leave your post as a complete and contained answer without requiring readers to find out which answers are previous and then analyse them.
              – techraf
              Mar 2 '16 at 14:59










            • I think OP specifically wanted the background process (java, in his case) to continue running, so killing it would be counter-productive. More interesting would be to re-attach later to the detached process with tmux attach-session.
              – ThomasH
              Mar 27 at 15:46













            • 5




              Imho, it would make more sense to comment about some answer's deficiencies under that particular answer and leave your post as a complete and contained answer without requiring readers to find out which answers are previous and then analyse them.
              – techraf
              Mar 2 '16 at 14:59










            • I think OP specifically wanted the background process (java, in his case) to continue running, so killing it would be counter-productive. More interesting would be to re-attach later to the detached process with tmux attach-session.
              – ThomasH
              Mar 27 at 15:46








            5




            5




            Imho, it would make more sense to comment about some answer's deficiencies under that particular answer and leave your post as a complete and contained answer without requiring readers to find out which answers are previous and then analyse them.
            – techraf
            Mar 2 '16 at 14:59




            Imho, it would make more sense to comment about some answer's deficiencies under that particular answer and leave your post as a complete and contained answer without requiring readers to find out which answers are previous and then analyse them.
            – techraf
            Mar 2 '16 at 14:59












            I think OP specifically wanted the background process (java, in his case) to continue running, so killing it would be counter-productive. More interesting would be to re-attach later to the detached process with tmux attach-session.
            – ThomasH
            Mar 27 at 15:46





            I think OP specifically wanted the background process (java, in his case) to continue running, so killing it would be counter-productive. More interesting would be to re-attach later to the detached process with tmux attach-session.
            – ThomasH
            Mar 27 at 15:46


















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f174440%2fexit-tmux-window-without-quitting-the-terminal-program%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

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

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay