issue216:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue216:c_c [2025/04/28 08:09] – d52fr | issue216:c_c [2025/04/29 16:22] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | As promised in the last issue, we move over to tmux. We can fall into the house with the door. Type: sudo apt install tmux - if you do not have it, and open a terminal and type: tmux. Unlike screen, we immediately see something has changed. We have an info bar at the bottom, with the session number, what’s in it, and machine name and the time. | + | **As promised in the last issue, we move over to tmux. We can fall into the house with the door. Type: sudo apt install tmux - if you do not have it, and open a terminal and type: tmux. Unlike screen, we immediately see something has changed. We have an info bar at the bottom, with the session number, what’s in it, and machine name and the time. |
Type: | Type: | ||
Ligne 7: | Ligne 7: | ||
This is another one of those man pages that use C-b for CTRL+b. Speaking of, as not to be confused with screen, that uses C-a as the control key. Because it is CTRL+b, I suggest you start using the control key on the right. (We can change it, but for now I’m sticking with the defaults.) Check your version with tmux -V - if it is in the 3.xx range, we should be good. Older versions have their own quirks. Lets avoid 1.xx and 2.xx. | This is another one of those man pages that use C-b for CTRL+b. Speaking of, as not to be confused with screen, that uses C-a as the control key. Because it is CTRL+b, I suggest you start using the control key on the right. (We can change it, but for now I’m sticking with the defaults.) Check your version with tmux -V - if it is in the 3.xx range, we should be good. Older versions have their own quirks. Lets avoid 1.xx and 2.xx. | ||
- | What I like about tmux is that help is at your fingertips. Please hit: CTRL+b then press ? - and you should be treated to boatloads of key combos. Quit out of that with q, and type ping 127.0.0.1 < | + | What I like about tmux is that help is at your fingertips. Please hit: CTRL+b then press ? - and you should be treated to boatloads of key combos. Quit out of that with q, and type ping 127.0.0.1 < |
- | At the bottom in the information bar, you should see a star next to the “screen” you are in. You can see I’m in screen “2” (see image bottom right). | + | Comme promis dans le dernier numéro, passons à tmux. On peut accéder à une maison par la porte. Tapez : sudo apt install tmux (si vous ne l'avez pas), ouvrez un terminal et tapez : tmux. Contrairement à screen, on voit immédiatement que quelque chose a changé. On a une barre d' |
+ | |||
+ | Tapez : | ||
+ | |||
+ | man tmux | ||
+ | |||
+ | Voici une page de ces manuels qui utilise C-b pour CTRL+b. À ce propos, ne pas confondre avec screen qui utilise C-a comme touche de contrôle. Comme c'est CTRL+b, je vous suggère d' | ||
+ | |||
+ | Ce que j' | ||
+ | |||
+ | |||
+ | **At the bottom in the information bar, you should see a star next to the “screen” you are in. You can see I’m in screen “2” (see image bottom right). | ||
Remember, the screens (windows) together are a session. | Remember, the screens (windows) together are a session. | ||
Ligne 17: | Ligne 28: | ||
Where screen had CTRL+a and “ , tmux has CTRL+b and w to do the same thing, and the arrow keys work here too. Also unlike screen, you not only have an asterisk next to the current window, but you also have a “-” next to the last used window. CTRL+b and l again, if you did not figure it out before. | Where screen had CTRL+a and “ , tmux has CTRL+b and w to do the same thing, and the arrow keys work here too. Also unlike screen, you not only have an asterisk next to the current window, but you also have a “-” next to the last used window. CTRL+b and l again, if you did not figure it out before. | ||
- | Like with Tilix, we can split windows into “panes” or just more “windows”, | + | Like with Tilix, we can split windows into “panes” or just more “windows”, |
- | If you wish to DJ, then you need CRTL+b and CTRL+o (It should “rotate” clockwise). | + | En bas dans la barre d' |
+ | |||
+ | N' | ||
+ | |||
+ | En parlant d' | ||
+ | |||
+ | Là où screen utilisait CTRL+a et « », tmux utilise CTRL+b et w pour faire la même chose, et les touches fléchées fonctionnent également ici. De plus, contrairement à screen, vous avez non seulement un astérisque à côté de la fenêtre actuelle, mais aussi un « - » à côté de la dernière fenêtre utilisée. Ctrl+b et l, si vous ne l' | ||
+ | |||
+ | Comme avec Tilix, nous pouvons diviser les fenêtres en « panneaux » ou simplement en plusieurs « fenêtres », | ||
+ | |||
+ | |||
+ | **If you wish to DJ, then you need CRTL+b and CTRL+o (It should “rotate” clockwise). | ||
If you have not been following along, please follow along now. You see, there is this “top” derivative named btop. It can be installed with: | If you have not been following along, please follow along now. You see, there is this “top” derivative named btop. It can be installed with: | ||
Ligne 35: | Ligne 57: | ||
Sweet, now you know. This is a silly one to remember, so I had you do it yourselves. | Sweet, now you know. This is a silly one to remember, so I had you do it yourselves. | ||
- | To rip that window out and chuck it against the wall, requires violence! You guessed it, CTRL+b and ! - and the window will stand on its own and the pane it was in, would have disappeared. Go ahead and try that now. | + | To rip that window out and chuck it against the wall, requires violence! You guessed it, CTRL+b and ! - and the window will stand on its own and the pane it was in, would have disappeared. Go ahead and try that now.** |
- | Tmux also has a privacy screen. If there is something you do not want others to see, simply press CTRL+b and t in that pane, and it should be covered, but beware, any key will dispel it. To close panes, we use: CTRL+b and x - but you need to confirm, just be aware of that, don’t just press enter. | + | Si vous souhaitez faire le DJ, vous aurez besoin de Ctrl+b et de Ctrl+o (la rotation devrait se faire dans le sens des aiguilles d'une montre). |
+ | |||
+ | Si vous n'avez pas suivi, suivez-moi maintenant. Vous voyez, il existe un dérivé de « top » appelé btop. Il peut être installé avec : | ||
+ | |||
+ | sudo apt install btop | ||
+ | |||
+ | Pourquoi est-ce nécessaire ? | ||
+ | |||
+ | Pour résoudre ce problème, nous devons utiliser le panneau de redimensionnement. Ctrl+b puis Échap+flèche haut. | ||
+ | |||
+ | Voyons maintenant si vous pouvez résoudre le problème, maintenant que vous savez comment. (Nous en parlerons plus tard, ce qui me semble problématique avec tmux.) | ||
+ | |||
+ | Quelque chose comme l' | ||
+ | |||
+ | Super, maintenant vous savez. C'est une chose idiote à retenir, alors je vous ai demandé de le faire vous-mêmes. | ||
+ | |||
+ | Arracher cette fenêtre et la balancer contre le mur demande de la violence ! Vous l'avez deviné, Ctrl+b et ! et la fenêtre se tiendra toute seule et le panneau dans lequel elle se trouvait aura disparu. Allez-y, essayez maintenant. | ||
+ | |||
+ | |||
+ | **Tmux also has a privacy screen. If there is something you do not want others to see, simply press CTRL+b and t in that pane, and it should be covered, but beware, any key will dispel it. To close panes, we use: CTRL+b and x - but you need to confirm, just be aware of that, don’t just press enter. | ||
Detaching from a session in tmux is: CTRL+b then d - or simply typing tmux detach. | Detaching from a session in tmux is: CTRL+b then d - or simply typing tmux detach. | ||
Ligne 49: | Ligne 90: | ||
Attaching to a session requires only the session number, so the syntax is: | Attaching to a session requires only the session number, so the syntax is: | ||
- | tmux attach -t <session name/ | + | tmux attach -t <session name/ |
- | I usually only have one, so I just type tmux attach (I really appreciate the alternatives of tmux attach/ | + | Tmux dispose également d'un écran de confidentialité. Si vous ne souhaitez pas que d' |
+ | |||
+ | Se déconnecter d'une session dans tmux se fait : Ctrl+b puis d ; ou simplement en tapant tmux detach. | ||
+ | |||
+ | Pour voir les autres sessions, tapez : tmux ls ; si vous êtes dans une session tmux, vous pouvez obtenir la liste des sessions avec Ctrl+b puis s. | ||
+ | |||
+ | Il est important de garder à l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | tmux attach -t < | ||
+ | |||
+ | |||
+ | **I usually only have one, so I just type tmux attach (I really appreciate the alternatives of tmux attach/ | ||
Speaking of connecting to session numbers, just like on screen, we can rename the session: CTRL+b and $ and you have to remove the “0” already there. Keep in mind that only the first 7 characters are displayed so typing in “Japan_jump_server_session” will display only as Japan_ (Honestly, the only time I have renamed sessions was during training, I prefer the short numbers as it is less typing). | Speaking of connecting to session numbers, just like on screen, we can rename the session: CTRL+b and $ and you have to remove the “0” already there. Keep in mind that only the first 7 characters are displayed so typing in “Japan_jump_server_session” will display only as Japan_ (Honestly, the only time I have renamed sessions was during training, I prefer the short numbers as it is less typing). | ||
Ligne 61: | Ligne 115: | ||
As of version 3.3 of tmux, what still irks me is that when I physically resize a terminal, it does it lopsided. You may have figured that out with our btop example. Which brings me to tilix. Oops, just realised I have already gone over our 1000 word limit, we can continue in the next issue. | As of version 3.3 of tmux, what still irks me is that when I physically resize a terminal, it does it lopsided. You may have figured that out with our btop example. Which brings me to tilix. Oops, just realised I have already gone over our 1000 word limit, we can continue in the next issue. | ||
- | Any complaints, misc@fullcirclemagazine.org | + | Any complaints, misc@fullcirclemagazine.org** |
+ | |||
+ | Je n'en ai généralement qu'un, donc je tape simplement « tmux attach » (j' | ||
+ | |||
+ | En parlant de connexion aux numéros de session, comme à l' | ||
+ | |||
+ | Vous pouvez également supprimer des sessions par leur nom : | ||
+ | |||
+ | tmux kill-session -t < | ||
+ | |||
+ | Depuis la version 3.3 de tmux, ce qui m' | ||
+ | |||
+ | Pour toute réclamation, |
issue216/c_c.1745820553.txt.gz · Dernière modification : 2025/04/28 08:09 de d52fr