Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Working with Linux ??? Quick Hacks for the Command Line

You're reading from   Working with Linux ??? Quick Hacks for the Command Line Command line power like you've never seen

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787129184
Length 222 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Bogdan Vaida Bogdan Vaida
Author Profile Icon Bogdan Vaida
Bogdan Vaida
Petru I»ôfan Petru I»ôfan
Author Profile Icon Petru I»ôfan
Petru I»ôfan
Arrow right icon
View More author details
Toc

tmux – virtual consoles, background jobs and the like

In this section, we will be looking at another great tool called tmux. Tmux comes in particularly handy when working in remote ssh sessions, because it gives you the ability to continue your work from where you left off. It can also replace some of the features in terminator, if you are working, for example, on Mac, and you can't install terminator.

To get started with tmux on Ubuntu, we first need to install it:

sudo apt install tmux
tmux – virtual consoles, background jobs and the like

Then just run the command:

tmux
tmux – virtual consoles, background jobs and the like

And you will find yourself inside a brand new virtual console:

tmux – virtual consoles, background jobs and the like

For demonstration purposes, we will open up a new tab that you can see the list of open sessions with tmux ls:

tmux – virtual consoles, background jobs and the like

Let's start a new tmux named session:

tmux new -s mysession
tmux – virtual consoles, background jobs and the like

Here we can see that opening a tmux session maintains the current directory. To list and switch tmux sessions inside tmux, hit Ctrl + B S.

We can see that we can switch to another tmux session, execute commands inside, and switch back...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime