yavarin.tech

Ah, fellow terminal tinkerers! If you’re seeking to unleash the arcane powers of the command line and amplify your productivity, look no further! Enter TMUX, the mystical terminal multiplexer that can split, organize, and manage multiple terminal sessions like a boss wizard. In this enchanting TMUX 101 guide, we’ll embark on an adventure to unravel its secrets, cast potent commands, and conjure the art of multitasking like true terminal sorcerers.

What is TMUX?

Imagine a universe where you can wield multiple terminal sessions within a single window, hopping between worlds with lightning speed. That’s TMUX! This terminal sorcery reigns supreme on Unix-like systems, empowering you to multitask like a digital wizard. Whether you’re wrangling code, monitoring arcane processes, or venturing into remote realms, TMUX is your trusty spellbook.

The Incantation of Installation:

Fear not, the path to TMUX power is swift! Invoke your package manager like a seasoned warlock:

# On Linux:
apt install tmux  # or yum, dnf, pacman, etc.

# On macOS (with Homebrew):
brew install tmux

# On Windows (with WSL or Cygwin):
sudo apt install tmux  # or your package manager

Begin Your Mystical Journey:

yavarin.tech
  1. Embrace the Realm of TMUX: With a flourish of your fingers, summon TMUX into existence:
tmux
  1. The Scroll of Basic Commands:
    • Want to go home? just type exit. (this will not save your sessions)
    • Stealthily detach: Ctrl+b d (vanish into the shadows) (what you have done to the environment waits for you to come back)
    • List the open sessions: tmux ls
    • Reveal yourself: tmux attach -t <session_name>/<session-number> (return to your previous realm)

Windows and Panes: Unveiling Your Arsenal:

  1. The Manifestation of Windows:
    • Conjure a new window: Ctrl+b c (create anew!)
    • Traverse between windows: Ctrl+b n (next) and Ctrl+b p (previous) You can use the numbers to jump right into the window you want.
  2. Unleashing the Power of Panes:
    • Horizontal Split: Ctrl+b % (divine division!)
    • Vertical Split: Ctrl+b " (for a symphony of panes!)
  3. Navigating Panes: Teleport with Finesse:
    • Glide to different panes: Ctrl+b arrow_key (a dance of traversal)
  4. Change the window name: CTRL+b ,
  5. Reshape the panes with grace:
    • Make the current pane full screen: Ctrl+b z and hit it it again to go back.
    • Risize the window to your liking: Ctrl+b C-<arrow_key>

Customizing the Arcane Arts of TMUX:

Craft your TMUX incantations by tweaking the configuration file (~/.tmux.conf). Infuse it with keybindings, spells, and bewitching plugins to suit your sorcery style. Documents

Enchanting Tips and Tricks:

yavarin.tech
  • Master the Copy-Paste Rune: Ctrl+b [ (copy mode), navigate with arrow keys, and Enter to copy. To conjure a paste, Ctrl+b ].
  • Channel Your Sessions: Preserve your arcane knowledge with tmux save-buffer and tmux source-file.

Conclusion:

With the sacred knowledge of TMUX at your fingertips, you’re now a terminal alchemist, bending the realms of multitasking to your will! Venture forth and practice the art of terminal sorcery with delight. The more you explore its enchantments and hidden features, the more you’ll become a true TMUX wizard. Embrace the magic, and may your terminal journey be filled with geeky joy! Happy terminal spellcasting! 🧙‍♂️✨