{"id":91061,"date":"2019-03-20T08:00:57","date_gmt":"2019-03-20T08:00:57","guid":{"rendered":"https:\/\/fedoramagazine.org\/?p=22409"},"modified":"2019-03-20T08:00:57","modified_gmt":"2019-03-20T08:00:57","slug":"4-cool-terminal-multiplexers","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2019\/03\/20\/4-cool-terminal-multiplexers\/","title":{"rendered":"4 cool terminal multiplexers"},"content":{"rendered":"<p>The Fedora OS is comfortable and easy for lots of users. It has a stunning desktop that makes it easy to get everyday tasks done. Under the hood is all the power of a Linux system, and the terminal is the easiest way for power users to harness it. By default terminals are simple and somewhat limited. However, a <em>terminal multiplexer<\/em> allows you to turn your terminal into an even more incredible powerhouse. This article shows off some popular terminal multiplexers and how to install them.<\/p>\n<p> <span id=\"more-22409\"><\/span> <\/p>\n<p>Why would you want to use one? Well, for one thing, it lets you logout of your system while <em>leaving your terminal session undisturbed<\/em>. It&#8217;s incredibly useful to logout of your console, secure it, travel somewhere else, then remotely login with SSH and continue where you left off. Here are some utilities to check out.<\/p>\n<p>One of the oldest and most well-known terminal multiplexers is <em>screen.<\/em> However, because the code is no longer maintained, this article focuses on more recent apps. (&#8220;Recent&#8221; is relative &#8212; some of these have been around for years!)<\/p>\n<h2>Tmux<\/h2>\n<p>The <em>tmux<\/em> utility is one of the most widely used replacements for <em>screen.<\/em> It has a highly configurable interface. You can program tmux to start up specific kinds of sessions based on your needs. You&#8217;ll find a lot more about tmux in this article published earlier:<\/p>\n<figure class=\"wp-block-embed is-type-rich is-provider-fedora-magazine\">\n<div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"AOTxgovebe\"><p><a href=\"https:\/\/fedoramagazine.org\/use-tmux-more-powerful-terminal\/\">Use tmux for a more powerful terminal<\/a><\/p><\/blockquote>\n<\/div>\n<\/figure>\n<p>Already a tmux user? You might like <a href=\"https:\/\/fedoramagazine.org\/4-tips-better-tmux-sessions\/\">this additional article on making your tmux sessions more effective<\/a>.<\/p>\n<p>To install tmux, use the <em>sudo<\/em> command along with <em>dnf<\/em>, since you&#8217;re probably in a terminal already:<\/p>\n<pre class=\"wp-block-preformatted\">$ sudo dnf install tmux<br \/><\/pre>\n<p>To start learning, run the <em>tmux<\/em> command. A single pane window starts with your default shell. Tmux uses a <em>modifier key<\/em> to signal that a command is coming next. This key is <strong>Ctrl+B<\/strong> by default. If you enter <strong>Ctrl+B, C<\/strong> you&#8217;ll create a new window with a shell in it.<\/p>\n<p>Here&#8217;s a hint: Use <strong>Ctrl+B, ?<\/strong> to enter a help mode that lists all the keys you can use. To keep things simple, look for the lines starting with <em>bind-key -T prefix<\/em> at first. These are keys you can use right after the modifier key to configure your tmux session. You can hit <strong>Ctrl+C<\/strong> to exit the help mode back to tmux.<\/p>\n<p>To completely exit tmux, use the standard <em>exit<\/em> command or <em>Ctrl+D<\/em> keystroke to exit all the shells.<\/p>\n<h2>Dvtm<\/h2>\n<p>You might have recently seen the Magazine article on <a href=\"https:\/\/fedoramagazine.org\/lets-try-dwm-dynamic-window-manger\/\">dwm, a dynamic window manager<\/a>. Like dwm, <em>dvtm<\/em> is for tiling window management &#8212; but in a terminal. It&#8217;s designed to adhere to the legacy UNIX philosophy of &#8220;do one thing well&#8221; &#8212; in this case managing windows in a terminal.<\/p>\n<p>Installing dvtm is easy as well. However, if you want the logout functionality mentioned earlier, you&#8217;ll also need the <em>abduco<\/em> package which handles session management for dvtm.<\/p>\n<pre class=\"wp-block-preformatted\">$ sudo dnf install dvtm abduco<\/pre>\n<p>The dvtm utility has many keystrokes already mapped to allow you to manage windows in the terminal. By default, it uses <strong>Ctrl+G<\/strong> as its modifier key. This keystroke tells dvtm that the following character is going to be a command it should process. For instance, <strong>Ctrl+G, C<\/strong> creates a new window and <strong>Ctrl+G, X<\/strong> removes it.<\/p>\n<p>For more information on using dvtm, check out the dvtm <a href=\"http:\/\/www.brain-dump.org\/projects\/dvtm\/#why\">home page<\/a> which includes numerous tips and get-started information.<\/p>\n<h2>Byobu<\/h2>\n<p>While <em>byobu<\/em> isn&#8217;t truly a multiplexer on its own &#8212; it wraps <em>tmux<\/em> or even the older <em>screen<\/em> to add functions &#8212; it&#8217;s worth covering here too. Byobu makes terminal multiplexers better for novices, by adding a help menu and window tabs that are slightly easier to navigate.<\/p>\n<p>Of course it&#8217;s available in the Fedora repos as well. To install, use this command:<\/p>\n<pre class=\"wp-block-preformatted\">$ sudo dnf install byobu<\/pre>\n<p>By default the <em>byobu<\/em> command runs <em>screen<\/em> underneath, so you might want to run <em>byobu-tmux<\/em> to wrap <em>tmux<\/em> instead. You can then use the <strong>F9<\/strong> key to open up a help menu for more information to help you get started.<\/p>\n<h2>Mtm<\/h2>\n<p>The <em>mtm<\/em> utility is one of the smallest multiplexers you&#8217;ll find. In fact, it&#8217;s only about 1000 lines of code! You might find it helpful if you&#8217;re in a limited environment such as old hardware, a minimal container, and so forth. To get started, you&#8217;ll need a couple packages.<\/p>\n<pre class=\"wp-block-preformatted\">$ sudo dnf install git ncurses-devel make gcc<\/pre>\n<p> Then clone the repository where mtm lives:<\/p>\n<pre class=\"wp-block-preformatted\">$ git clone https:\/\/github.com\/deadpixi\/mtm.git<\/pre>\n<p>Change directory into the <em>mtm<\/em> folder and build the program:<\/p>\n<pre class=\"wp-block-preformatted\">$ make<\/pre>\n<p>You might receive a few warnings, but when you&#8217;re done, you&#8217;ll have the very small <em>mtm<\/em> utility. Run it with this command:<\/p>\n<pre class=\"wp-block-preformatted\">$ .\/mtm<\/pre>\n<p>You can find all the documentation for the utility <a href=\"https:\/\/github.com\/deadpixi\/mtm\">on its GitHub page<\/a>.<\/p>\n<p>These are just some of the terminal multiplexers out there. Got one you&#8217;d like to recommend? Leave a comment below with your tips and enjoy building windows in your terminal!<\/p>\n<hr class=\"wp-block-separator\" \/>\n<p><em>Photo by&nbsp;<\/em><a href=\"https:\/\/unsplash.com\/photos\/48yI_ZyzuLo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\"><em>Michael<\/em><\/a><em>&nbsp;on&nbsp;<a href=\"https:\/\/unsplash.com\/search\/photos\/windows?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Fedora OS is comfortable and easy for lots of users. It has a stunning desktop that makes it easy to get everyday tasks done. Under the hood is all the power of a Linux system, and the terminal is the easiest way for power users to harness it. By default terminals are simple and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[45,61,46,47],"class_list":["post-91061","post","type-post","status-publish","format-standard","hentry","category-fedora-os","tag-fedora","tag-fedora-project-community","tag-magazine","tag-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/91061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=91061"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/91061\/revisions"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=91061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=91061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=91061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}