Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

Discussion of multiplexing terminals with tmux #249

Closed
wants to merge 13 commits into from

Conversation

drio
Copy link
Contributor

@drio drio commented Jan 23, 2014

Intended for intermediate lessons.


#### Basic usage

To start tmux we just execute its binary: ```$ tmux```, that will create a new
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A single backtick is sufficient for inline code.

@wking
Copy link
Contributor

wking commented Jan 23, 2014

On Thu, Jan 23, 2014 at 11:02:52AM -0800, David Rio Deiros wrote:

A bash/intermediate/tmux.intro.md (102)

I love terminal multiplexers, but I have a hard time imagining a boot
camp where we have time to go into detail about them. However,
@ahmadia thinks we might 1. This is a stand-alone lesson, so it
would be easy to skip on a per-workshop basis. If we decide that we
do want a tmux lesson, I'd prefer:

  • Local images, because they're easier to keep track of.
  • Links to free docs, because students shouldn't have to buy a book to
    learn their tooling.

the difficulties of controlling all the multiple processes (and its
input/output) you may be running concurrently.

[Tmux](http://tmux.sourceforge.net/) can help with that.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this statement more general?

Terminal multiplixer, like Tmux, can help with that.

@drio
Copy link
Contributor Author

drio commented Jan 23, 2014

Thanks for the feedback. I will work on these and get back to you with an updated pull request.

@gvwilson
Copy link
Contributor

My feeling is that this belongs in supplementary material, but I'll leave it up to the people wrangling the intermediate shell stuff to decide.

@gvwilson
Copy link
Contributor

Please redirect to intermediate/shell/tmux.md.

@drio
Copy link
Contributor Author

drio commented Feb 20, 2014

Thanks for the comments and suggestions, I have taken care of them. This should be ready to merge.

@wking
Copy link
Contributor

wking commented Mar 29, 2014

On Thu, Feb 20, 2014 at 07:16:22AM -0800, David Rio Deiros wrote:

Thanks for the comments and suggestions, I have taken care of
them. This should be ready to merge.

@jiffyclub's “single backtick is sufficient for inline code” meant
things like:

-By default that is: Ctrl-b.
+By default that is: Ctrl-b.

Block code should use triple tildes (see #201 and #194):

  $ tmux ls
  0: 8 windows (created Wed Dec  4 10:00:35 2013) [178x49]

I'd also avoid prompts in the inline code:

  • …its binary: $ tmux, that…
  • …its binary: tmux, that…

@drio
Copy link
Contributor Author

drio commented Mar 29, 2014

Thanks at @wking. Let me know if you see anything else otherwise this is good to go.

@wking
Copy link
Contributor

wking commented Mar 29, 2014

On Sat, Mar 29, 2014 at 10:02:58AM -0700, David Rio Deiros wrote:

Let me know if you see anything else…

There's still a:

$ tmux attach

that should be:

  $ tmux attach

@drio
Copy link
Contributor Author

drio commented Mar 29, 2014

Ok, fixed.

@wking
Copy link
Contributor

wking commented Mar 29, 2014

On Sat, Mar 29, 2014 at 12:15:04PM -0700, David Rio Deiros wrote:

Ok, fixed.

As of ffa1425 there's still a trailing backtick after attach.

@drio
Copy link
Contributor Author

drio commented Mar 30, 2014

Fixed.

@wking
Copy link
Contributor

wking commented Mar 30, 2014

Getting closer :).

  • “my unix flavors” should probably be “many *nix flavors”.
  • “by typing: PREFIX c” should probably be “by typing PREFIX c”.
  • “To split a window vertically press: PREFIX % and PREFIX " to
    split horizontally.” should probably be “Press PREFIX % to split a
    window vertically and PREFIX " to split horizontally”.
  • “some editing with,” should probably be “some editing with
    $EDITOR,”. I haven't looked at the PNG, so I'm not sure which
    editor you're using. This sentence is also inconsitent about pane
    references, with “number 0”, “number 1”, and “pane number 2”.

@gvwilson
Copy link
Contributor

On 2014-03-29 10:42 PM, W. Trevor King wrote:

  • “my unix flavors” should probably be “many *nix flavors”.
    We just say "Unix" elsewhere.

@wking
Copy link
Contributor

wking commented Mar 30, 2014

On Sun, Mar 30, 2014 at 04:24:04AM -0700, Greg Wilson wrote:

On 2014-03-29 10:42 PM, W. Trevor King wrote:

  • “my unix flavors” should probably be “many *nix flavors”.

We just say "Unix" elsewhere.

I think that's trademarked 1, and doesn't apply to Linux (and some
other mostly POSIX systems):

The Open Group requests that UNIX is always used as an adjective
followed by a generic term such as system to help avoid the creation
of a genericized trademark.

@rgaiacs
Copy link

rgaiacs commented Mar 30, 2014

@drio When I run make clean site the tmux lesson isn't build properly. If I add

---
layout: lesson
root: ../..
title: Taming the console with tmux
level: intermediate
---

at the begin of the file it build properly. (Maybe this only happens with my current version of Jekyll, 1.4.3.)

What about using ## instead of #### for the headers?

so, we use the `-s` option: `tmux new -s first` where `first` is
the name of the session.

To communicate with tmux, we use a shortcuts prefixed with a key combination.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later you use PREFIX key and you can make here a little clear what it means. What about:

To communicate with tmux, we use a shortcut prefixed with a key combination, e.g. PREFIX c that means press the prefixed followed by the c key. By default PREFIX is Ctrl-b.

@davclark
Copy link
Contributor

While it adds a layer of explanatory complexity, I tend to use byobu, which is simple to set up and comes well-configured for cloud computing work out of the box. Might you add a link to that?

@rgaiacs
Copy link

rgaiacs commented May 21, 2014

More informations about byobu: http://byobu.co/

@davclark
Copy link
Contributor

Thanks for the surprisingly polite request to post more. I see you've got a link to byobu now, but the ubuntu page provides a little more of a rationale:

https://help.ubuntu.com/14.04/serverguide/byobu.html

It starts, "One of the most useful applications for any system administrator is screen. It allows the execution of multiple shells in one terminal. To make some of the advanced screen features more user friendly, and provide some useful information about the system, the byobu package was created."

In particular, it can use screen or tmux as a backend, and currently uses tmux by default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants