Giter Site home page Giter Site logo

workshop-tmux's Introduction

workshop-tmux

this workshop is to practice tmux on a docker machine on a windows host (docker kernerl configured as linux).

Tmux Preview Image 01

1. Previous Steps

  1. init git repo for documentation.

2. Initialize docker machine

  1. add Dockerfile and docker-compose.yml files with alpine only to have a machine to connect.
  2. run docker-compose up or docker-compose up --build (this one is to rebuild the images each time you up compose e.g. add/install somenthing in your machine)

3. Connect to container using SSH

this ocassion I'm using git-bash, but we can user putty or openssh. You can skip this whole section if you use the integrated terminal on docker for windows.

  1. run ssh user@localhost -p 2222

    The authenticity of host '[localhost]:2222 ([::1]:2222)' can't be established.
    ED25519 key fingerprint is SHA256:ZmrF8ZVg5H/esEsmJIE9xHsGQkBRmswHUXzTTqp9BBU.
    This key is not known by any other names
    Are you sure you want to continue connecting (yes/no/[fingerprint])?
    • warning: if you rebuild images (docker-compose up --build) and after that you connect again to the docker-compose machine you're gonna need to update the machine information in file [path_to_user]/.ssh/known_hosts (you can just delete this file or delete those lines). If you don't this will appear
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the ED25519 key sent by the remote host is
    SHA256:vQXNMWcomdhWjvDG5mB6udfN7vezkVqI/C/s7JWI/5E.
    Please contact your system administrator.
    Add correct host key in /c/Users/moise/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /c/Users/moise/.ssh/known_hosts:7
    Host key for [localhost]:2222 has changed and you have requested strict checking.
    Host key verification failed.
  2. write answer: yes

    Warning: Permanently added '[localhost]:2222' (ED25519) to the list of known hosts.
    
    user@localhost's password:
  3. enter password: user

    Welcome to Alpine!
    
    The Alpine Wiki contains a large amount of how-to guides and general
    information about administrating Alpine systems.
    See <https://wiki.alpinelinux.org/>.
    
    You can setup the system with the command: setup-alpine
    
    You may change this message by editing /etc/motd.

4. Running Tmux inside the container

  1. run tmux to init a session.
  2. run exit to close

5. cheatsheet

https://home.brainofshawn.com/uploads/tmux.pdf

Commandline Options

  • tmux new -A -s session_name ➡ create new session
  • tmux attach -t session_name ➡ attach to session
  • tmux ls ➡ show active sessions

Control-B Commands (ctrl-b, then:)

  • D ➡ Detach Session
  • C ➡ Create Window
  • N ➡ Next Window
  • P ➡ Previous Window
  • 0-9 ➡ Go to Window
  • % ➡ Split Horizontal
  • " ➡ Split Veritical
  • Arrows ➡ Switch Pane
  • O ➡ Next Pane
  • X ➡ Close Pane/Windo

6. other Control-B Commands (ctrl-b, then:)

  • $ ➡ Rename Session
  • , ➡ Rename Window (Current Window)
  • z ➡ zoom into Panel / zoom out Panel
  • q ➡ highlight Panels numeric ids
  • q then 0-9 ➡ Go to Pane

7. other Control-B Commands (ctrl-b and at the same time:)

  • Arrows ➡ Resize Panels

8. Concepts

  • Session ➡ the parent process
  • Window ➡ live as many as you want inside the Session
  • Panel ➡ multiple division inside a Window

workshop-tmux's People

Contributors

moisesjurad0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.