mirror of https://github.com/tildeclub/site
48 lines
3.2 KiB
HTML
48 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="generator" content="pandoc" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
<title>tmux</title>
|
||
<link rel="stylesheet" href="/style.css">
|
||
<style type="text/css">
|
||
code{white-space: pre-wrap;}
|
||
span.smallcaps{font-variant: small-caps;}
|
||
span.underline{text-decoration: underline;}
|
||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||
</style>
|
||
<!--[if lt IE 9]>
|
||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||
<![endif]-->
|
||
</head>
|
||
<body>
|
||
<a href="/wiki/">< back to wiki home</a>
|
||
<header>
|
||
<h1 class="title">tmux</h1>
|
||
|
||
|
||
</header>
|
||
<p>TMUX IS THE BEST. Here’s a super basic primer.</p>
|
||
<p>to start a new session, type <code>tmux new -s tildemux</code>.</p>
|
||
<p>A yellow bar will appear at the bottom of your terminal. You’re now in TMUX!</p>
|
||
<p>TMUX has sessions, windows, and panes. Each of these things will have a terminal in it. If you actually typed what I told you to earlier, you’ll be in a session named <code>tildemux</code>. That session has one window, <code>0</code>. That window has one pane, also named <code>0</code>. (Computers start counting at 0, not 1.)</p>
|
||
<h2 id="windows">windows</h2>
|
||
<p>Your tmux bar should look like:</p>
|
||
<p><code>[tildemux] 0:bash*</code></p>
|
||
<p>…which means that you’re in a session named <code>tildemux</code>, which has a window <code>0</code>, running the command <code>bash</code>. <code>*</code> means that window 0 is active, and the pane running bash is currently active.</p>
|
||
<p>To create a new window within this session, type <code>PREFIX c</code>. PREFIX?!? By default, it’s <code>control-b</code>. Now you should see:</p>
|
||
<p><code>[tildemux] 0:bash- 1:bash*</code></p>
|
||
<p><code>1:bash*</code> means you’re in a pane running <code>bash</code> inside window 1. To change back to pane 0, type <code>PREFIX 0</code>. The <code>*</code> should be back on <code>0:bash</code>.</p>
|
||
<p>Run a cool interactive command, such as <code>htop</code> (to see how many of system resources we’re eating up) or <code>vim</code> (to write some awesome webpages). Your tmux status bar should update to <code>0:<name of the current process></code>. So now instead of saying <code>bash</code> it will say <code>htop</code> or <code>vim</code>.</p>
|
||
<h2 id="panes">panes</h2>
|
||
<p>Panes are great. TMUX panes let you run more than one terminal inside your one, actual terminal. To “split” a new pane, <code>PREFIX "</code>. That makes a horizontal split. You’ll notice there are now two panes open one on top of the other. <code>PREFIX %</code> makes a vertical split, for side-by-side panes. Did I mention that panes are great?</p>
|
||
<p>To move between panes in the current window, use <code>PREFIX <up,down,left,right></code>. That’s right, the arrow keys.</p>
|
||
<h2 id="more">more</h2>
|
||
<p>I not the best writer or teacher. Just google anything that doesn’t make sense.</p>
|
||
<p><a href="http://robots.thoughtbot.com/a-tmux-crash-course">Or take a look at this tmux guide</a></p>
|
||
<p>But definitely use tmux.</p>
|
||
</body>
|
||
</html>
|
||
|