How to open a tmux terminal with automatically separated to 6 windows?

Multi tool use
Multi tool use

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











up vote
0
down vote

favorite
1












I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:



enter image description here



But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.







share|improve this question
























    up vote
    0
    down vote

    favorite
    1












    I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:



    enter image description here



    But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.







    share|improve this question






















      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:



      enter image description here



      But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.







      share|improve this question












      I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:



      enter image description here



      But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.









      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 25 '17 at 8:40









      Peter

      6112




      6112




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Try this:



          tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;


          Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.






          share|improve this answer



























            up vote
            0
            down vote













            The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.



            Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with



            tmuxinator start [project] -n [name]


            Here's a sample yaml file so you get the idea of what it will look like:



             - editor:
            layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
            panes:
            - vim
            - #empty, will just run plain bash
            - top


            There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.



            With tmux-resurect I don't know offhand how to automate the restore so you can start tmux with the layout already loaded (as opposed to starting and then restoring with Ctrl-R). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.



            EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux






            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',
              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%2f412911%2fhow-to-open-a-tmux-terminal-with-automatically-separated-to-6-windows%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
              0
              down vote



              accepted










              Try this:



              tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;


              Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.






              share|improve this answer
























                up vote
                0
                down vote



                accepted










                Try this:



                tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;


                Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.






                share|improve this answer






















                  up vote
                  0
                  down vote



                  accepted







                  up vote
                  0
                  down vote



                  accepted






                  Try this:



                  tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;


                  Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.






                  share|improve this answer












                  Try this:



                  tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;


                  Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 25 '17 at 10:14









                  Bhavin Chirag

                  1514




                  1514






















                      up vote
                      0
                      down vote













                      The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.



                      Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with



                      tmuxinator start [project] -n [name]


                      Here's a sample yaml file so you get the idea of what it will look like:



                       - editor:
                      layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
                      panes:
                      - vim
                      - #empty, will just run plain bash
                      - top


                      There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.



                      With tmux-resurect I don't know offhand how to automate the restore so you can start tmux with the layout already loaded (as opposed to starting and then restoring with Ctrl-R). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.



                      EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux






                      share|improve this answer


























                        up vote
                        0
                        down vote













                        The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.



                        Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with



                        tmuxinator start [project] -n [name]


                        Here's a sample yaml file so you get the idea of what it will look like:



                         - editor:
                        layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
                        panes:
                        - vim
                        - #empty, will just run plain bash
                        - top


                        There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.



                        With tmux-resurect I don't know offhand how to automate the restore so you can start tmux with the layout already loaded (as opposed to starting and then restoring with Ctrl-R). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.



                        EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux






                        share|improve this answer
























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.



                          Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with



                          tmuxinator start [project] -n [name]


                          Here's a sample yaml file so you get the idea of what it will look like:



                           - editor:
                          layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
                          panes:
                          - vim
                          - #empty, will just run plain bash
                          - top


                          There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.



                          With tmux-resurect I don't know offhand how to automate the restore so you can start tmux with the layout already loaded (as opposed to starting and then restoring with Ctrl-R). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.



                          EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux






                          share|improve this answer














                          The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.



                          Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with



                          tmuxinator start [project] -n [name]


                          Here's a sample yaml file so you get the idea of what it will look like:



                           - editor:
                          layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
                          panes:
                          - vim
                          - #empty, will just run plain bash
                          - top


                          There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.



                          With tmux-resurect I don't know offhand how to automate the restore so you can start tmux with the layout already loaded (as opposed to starting and then restoring with Ctrl-R). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.



                          EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jan 5 at 23:44









                          Community♦

                          1




                          1










                          answered Dec 25 '17 at 10:07









                          B Layer

                          3,8991525




                          3,8991525






















                               

                              draft saved


                              draft discarded


























                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412911%2fhow-to-open-a-tmux-terminal-with-automatically-separated-to-6-windows%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              pUClBLAHcVto
                              pSaQw2A6jyqyD79uHW 3bZqlgk m3At3FC6iMrTAR8 ZaVstSU2apCjCan01KKzaXpWR,8WwO1Q91u0 V3,VjvHw m6KRsQ

                              Popular posts from this blog

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

                              How many registers does an x86_64 CPU actually have?

                              Displaying single band from multi-band raster using QGIS