Outils pour utilisateurs

Outils du site


issue125:tutoriel2

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
issue125:tutoriel2 [2017/10/01 18:56] – créée auntieeissue125:tutoriel2 [2017/10/11 11:26] (Version actuelle) auntiee
Ligne 1: Ligne 1:
-If you work a lot in GNU/Linux command-line or in a terminal emulator, as a programmer or system administrator, then you will realize soon that the usage of the mouse is slowing you down in your daily work. The command-line usage, without any desktop environment, is limited to only one window. In a desktop environment, the terminal emulator provides more screens, but it needs a mouse to navigate.+**If you work a lot in GNU/Linux command-line or in a terminal emulator, as a programmer or system administrator, then you will realize soon that the usage of the mouse is slowing you down in your daily work. The command-line usage, without any desktop environment, is limited to only one window. In a desktop environment, the terminal emulator provides more screens, but it needs a mouse to navigate.
  
-The so-called tmux application brings us a flexible, productive, mouse-free, terminal environment. This can be your new IDE (Integrated Development Environment) without any GUI (Graphical User Interface). The name of the tmux application refers to the words "terminal multiplexer". This tool contains separate windows (like tabs in a text editor), and/or different horizontal or vertical panes inside a window. The windows are great to run different programs/scripts in parallel; the panes are great to run two or more programs on the same screen. The whole environment is managed via the keyboard.+The so-called tmux application brings us a flexible, productive, mouse-free, terminal environment. This can be your new IDE (Integrated Development Environment) without any GUI (Graphical User Interface). The name of the tmux application refers to the words "terminal multiplexer". This tool contains separate windows (like tabs in a text editor), and/or different horizontal or vertical panes inside a window. The windows are great to run different programs/scripts in parallel; the panes are great to run two or more programs on the same screen. The whole environment is managed via the keyboard.**
  
-The picture shows my tmux with my own configuration. Currentlyit has one window with three panes (one vertical on the left and two horizontals on the right)The left one runs a “vim”the right top one runs the “htop” applicationand the right bottom one runs a pure “zsh” shellAll the programs are running in parallel and can be seen at the same time. Can you imagine a better working environment? For exampleif you are a web developeryou can run the editor, the database, and the console at the same time on one screen. And navigation between them can be achieved by just the keyboard – without using the mouse at all.+Si vous travaillez beaucoup dans GNU/Linux en ligne de commande ou dans un émulateur de terminalcomme programmeur ou administrateur système, vous réaliserez bientôt que l'usage de la souris vous ralentit dans votre travail quotidienL'usage de la ligne de commandesans environnement de bureauest limité à une seule fenêtreDans un environnement de bureaul'émulateur de terminal fournit plus d'écransmais la navigation nécessite une souris.
  
-Tmux uses a server-client model which has a great benefit. When we start tmux, a new session is opened on the serverWhen we leave the application (this is called "detach"), the session remains open in the background together with the running windows/panes/programs/scriptsLater on, we can join this session again (this is called "attach"), and we are able to continue the work where we leftAdditionally, we can detach from the session on workstation_A, and we can reattach on workstation_B over ssh as wellThis feature is similar to the one used in the GNU-Screen program.+L'application appelée tmux apporte un environnement de terminal soupleproductif et sans sourisCe peut être votre nouvel environnement de développement intégré (IDE) sans aucun interface graphique (GUI). Le nom de l'application tmux se réfère à « terminal multiplexer » (multiplexeur de terminal). cet outil contient des fenêtres séparées (comme les onglets dans un éditeur de texte), et/ou différents panneaux horizontaux ou verticaux dans une fenêtreLes fenêtres sont géniales pour faire tourner différents programmes/scripts en parallèle ; les panneaux sont géniaux pour faire tourner deux programmes ou plus dans le même écranTout l'environnement est géré à partir du clavier.
  
-An additional benefit is that it can be used either in a graphical environment inside terminal emulator, or in pure console mode. The memory footprint is also very impressive; it needs only 3-4 MB memory per session/window which is important when you use an old computer. Tmux is licensed under BSD.+**The picture shows my tmux with my own configuration. Currently, it has one window with three panes (one vertical on the left and two horizontals on the right). The left one runs a “vim”, the right top one runs the “htop” application, and the right bottom one runs a pure “zsh” shell. All the programs are running in parallel and can be seen at the same time. Can you imagine a better working environment? For example, if you are a web developer, you can run the editor, the database, and the console at the same time on one screen. And navigation between them can be achieved by just the keyboard – without using the mouse at all. 
 + 
 +Tmux uses a server-client model which has a great benefit. When we start tmux, a new session is opened on the server. When we leave the application (this is called "detach"), the session remains open in the background together with the running windows/panes/programs/scripts. Later on, we can join this session again (this is called "attach"), and we are able to continue the work where we left. Additionally, we can detach from the session on workstation_A, and we can reattach on workstation_B over ssh as well. This feature is similar to the one used in the GNU-Screen program.** 
 + 
 +L'image montre mon tmux avec ma propre configuration. Actuellement, il a une fenêtre découpée en trois panneaux (un vertical sur la gauche et deux horizontaux sur la droite). « yim » tourne dans celui de gauche, l'application « htop » tourne dans celui du haut à droite et, dans celui du bas à droite, tourne le shell « zsh ». Tous les programmes tournent en parallèle et peuvent être vus en même temps. Pouvez-vous imaginer un meilleur environnement de travail ? Par exemple, si vous êtes un développeur Web, vous pouvez faire tourner l'éditeur, la base de données et la console en même temps sur un seul écran. Et la navigation entre eux peut se faire avec le clavier seul - sans utiliser la souris. 
 + 
 +tmux utilise un modèle client-serveur qui a un grand intérêt. Quand nous démarrons tmux, une nouvelle session est ouverte sur le serveur. Quand nous quittons l'application (ce qui est appelé « détacher »), la session reste ouverte en arrière-plan ainsi que les fenêtres/panneaux/programmes/scripts actifs. Plus tard, nous pouvons rejoindre la session (c'est appelé « attacher ») en reprenant le travail là où nous l'avons laissé. En plus, nous pouvons détacher la session de la station de travail A tout en la rattachant à la station de travail B sous ssh. Cette fonctionnalité est similaire à celle utilisée dans le programme GNU-screen. 
 + 
 +**An additional benefit is that it can be used either in a graphical environment inside terminal emulator, or in pure console mode. The memory footprint is also very impressive; it needs only 3-4 MB memory per session/window which is important when you use an old computer. Tmux is licensed under BSD.
  
 The official website is: https://tmux.github.io/ The official website is: https://tmux.github.io/
Ligne 17: Ligne 25:
 Installation of tmux Installation of tmux
  
-There are two ways to use tmux on your machine: (a) use the package manager or (b) build from source from github. Be advised that version 2.2 or higher has to be used at the time of reading this article series, earlier versions can have configuration incompatibilities or missing features. Personally, I use both Debian 8 (jessie) stable and Xubuntu 16.04 LTS, and their repositories contain the old version 1.9/2.1, so I have preferred to download the source code and compile it by myself.+There are two ways to use tmux on your machine: (a) use the package manager or (b) build from source from github. Be advised that version 2.2 or higher has to be used at the time of reading this article series, earlier versions can have configuration incompatibilities or missing features. Personally, I use both Debian 8 (jessie) stable and Xubuntu 16.04 LTS, and their repositories contain the old version 1.9/2.1, so I have preferred to download the source code and compile it by myself.**
  
-The tool has dependencies as well, be sure that the needed packages are available on your system: GCC compiler, libevent and ncurses. Let’s get them:+Un avantage supplémentaire est qu'il peut être utilisé, soit en environnement graphique dans un émulateur de terminal, soit en mode console pur. L'emprise dans la mémoire est assez impressionnante ; il n'a besoin que de 3-4 Mo de mémoire par session/fenêtre, ce qui est important quand vous utilisez un vieil ordinateur. tmux est sous licence BSD. 
 + 
 +Le site officiel est : https://tmux.github.io/ 
 + 
 +Le code source est disponible sur github: https://github.com/tmux/tmux 
 + 
 +La dernière publication tourne sur OpenBSD, FreeBSD, NetBSD, Linux, OS X et Solaris. 
 + 
 +Installation de tmux 
 + 
 +Il y a deux façons d'utiliser tmux sur votre machine : (a) utiliser le gestionnaire de logiciels ou (b) le construire à partir des sources présentes sur github. Sachez que les versions 2.2 et suivantes doivent être utilisées au moment où vous lisez cet article ; les versions précédentes peuvent avoir des incompatibilités de configuration ou des fonctionnalités manquantes. Personnellement, j'utilise Debian 8 (jessie) et Xubuntu 16.04 LTS et leurs dépôts contiennent la vieille version 1.9/2.1 ; aussi, j'ai préféré télécharger le code source et le compiler moi-même. 
 + 
 +**The tool has dependencies as well, be sure that the needed packages are available on your system: GCC compiler, libevent and ncurses. Let’s get them:
  
 sudo apt install build-essential libevent-dev libcnurses5-dev sudo apt install build-essential libevent-dev libcnurses5-dev
  
-Tmux can be downloaded from its main web page or directly from github. The latest version is 2.4, available since April 20, 2017. Type the following commands in terminal:+Tmux can be downloaded from its main web page or directly from github. The latest version is 2.4, available since April 20, 2017. Type the following commands in terminal:**
  
 +L'outil a aussi des dépendances ; assurez-vous que le paquets nécessaires sont disponibles sur votre système : le compilateur GCC, libevent et ncurses.  Pour les obtenir :
  
 +sudo apt install build-essential libevent-dev libcnurses5-dev
  
-cd ~+tmux peut être téléchargé depuis sa page Web principale ou directement depuis github. La 2.4 est la dernière version, disponible depuis le 20 avril 2017. Tapez les commandes suivantes dans un terminal : 
 + 
 + 
 +**cd ~
  
 wget https://github.com/tmux/tmux/releases/download/2.4/tmux-2.4.tar.gz wget https://github.com/tmux/tmux/releases/download/2.4/tmux-2.4.tar.gz
Ligne 55: Ligne 80:
 tmux tmux
  
-After executing the start command, the following screen will be shown:+After executing the start command, the following screen will be shown:**
  
-What you see (below) is an opened tmux "session" (labeled with "[0]" in the status bar) with one active window (labeled with "0:zsh*" in the status bar). It seems similar to a normal terminal or console, every command can be executed in the same way. Additionally, the screen has an informal status bar which has a configurable layout. Quitting from tmux is also very easy:+ 
 +cd ~ 
 + 
 +wget https://github.com/tmux/tmux/releases/download/2.4/tmux-2.4.tar.gz 
 + 
 +tar -zxvf tmux-2.4.tar.gz 
 + 
 +cd tmux-2.4 
 + 
 +./configure 
 + 
 +make 
 + 
 +sudo make install 
 + 
 +cd .. 
 + 
 +rm -rf tmux-2.4/ tmux-2.4.tar.gz 
 + 
 +De façon à vous assurer que l'installation s'est bien passée, vérifiez la version de tmux nouvellement ajouté : 
 + 
 +tmux –V 
 + 
 +tmux 2.4 
 + 
 +Démarrer tmux est très simple ; dans un terminal/console : 
 + 
 +tmux 
 + 
 +Après exécution de la commande start, vous verrez l'écran suivant : 
 + 
 + 
 + 
 +**What you see (below) is an opened tmux "session" (labeled with "[0]" in the status bar) with one active window (labeled with "0:zsh*" in the status bar). It seems similar to a normal terminal or console, every command can be executed in the same way. Additionally, the screen has an informal status bar which has a configurable layout. Quitting from tmux is also very easy:
  
 exit exit
  
-This will terminate the current tmux session.+This will terminate the current tmux session.**
  
-Conclusion+Ce que vous voyez (ci-dessous) est une « session » tmux ouverte (étiquetée avec « [0] » dans la barre de statut) avec une fenêtre active (étiquetée « 0:zsh* » dans la barre de statut). Ça semble identique à un terminal (ou une console) normal ; chaque commande peut être exécutée de la même manière. En plus, l'écran a une barre de statut informelle dont la disposition est configurable. Quitter tmux est aussi très facile : 
 + 
 +exit 
 + 
 +Ceci terminera la session tmux en cours. 
 + 
 +**Conclusion
  
 This article covers the first steps to become a daily tmux user. Hopefully, it was enough to draw attention to this impressive tool. The next chapters will bring us the detailed usage of sessions, windows and panes. Later on, we are going to dig into the configuration of tmux. Get Productive! Get tmux! This article covers the first steps to become a daily tmux user. Hopefully, it was enough to draw attention to this impressive tool. The next chapters will bring us the detailed usage of sessions, windows and panes. Later on, we are going to dig into the configuration of tmux. Get Productive! Get tmux!
Ligne 70: Ligne 134:
 tmux = start the program tmux = start the program
 tmux -V = get the version of tmux tmux -V = get the version of tmux
-exit = terminate the program+exit = terminate the program** 
 + 
 +Conclusion 
 + 
 +Cet article présente les premiers pas pour devenir un utilisateur quotidien de tmux. Avec un peu de chance, c'était suffisant pour attirer le regard sur cet outil impressionnant. Dans les prochains chapitres nous verrons l'usage détaillé des sessions, fenêtres et panneaux. Par la suite, nous rentrerons dans la configuration de tmux. Soyez productif ! Choisissez tmux ! 
 + 
 +Référence des commandes 
 +tmux = lancer du programme 
 +tmux -V = connaître la version de tmux 
 +exit = terminer le programme 
 + 
issue125/tutoriel2.1506876997.txt.gz · Dernière modification : 2017/10/01 18:56 de auntiee