Home Hacking Tools Tmux – An Introduction to a Hacker’s Swiss Army Knife

Tmux – An Introduction to a Hacker’s Swiss Army Knife

by Unallocated Author
Tmux logo

Tmux is a terminal multiplexer: which in lamen terms means it is able to create a number of terminals, inside a session, with the ability to install and attach multiple sessions to it. Sounds kind of overwhelming doesn’t it? Well it isn’t, let me show you.

What is Tmux?

Tmux, in the simplest of terms allows you to have multiple terminal sessions inside one terminal window, with the ability to divide your terminal screen into numerous ways. Something like this.


Tmux in action

Tmux in action

Like the look? Well so do I


Installing Tmux is fairly easy, you won’t need to compile anything manually, it’s a world recognized tool and I haven’t met one Sys Admin who doesn’t use it. It’s available on both APT (Debian), Brew (Mac) and RPM (Fedora) repositories.

Ubuntu – Debain

sudo apt install tmux


For this you have to have Homebrew preinstalled on your Mac.

brew install tmux


I am pretty you get the gist at this point.

rpm install tmux

After the installation is finished, type the following on your Terminal.


You’ll see the same terminal but this time with a green bar
running down the bottom of your screen.

This is the bare minimum interface of Tmux, but still there are some things to be explained.The [0] down at the bottom left on the screen indicates the current Tmux session you’re on. If you have multiple sessions connected, you can traverse through them and the number will change, more on this later.

Now on to the meat and bones of Tmux. The first thing to note is the prefix key, by default it ctrl+b which changes the mode of Tmux from input mode to command mode. Those commands can be either Split the screen, send you into copy paste mode and much more.

Screen Split with Tmux

Go ahead try it, press the prefix key ctrl+b and and after that shift+”, this will split the screen horizontally. Similarly, using shift+% will split the screen vertically. After you do this, your screen will be oriented like this.

Tmux in splitscreen mode

Tmux in splitscreen mode


Navigating through Windows

Now navigating through these split screen windows can be a bit daunting, of course by simply clicking on a window wouldn’t work to do that, we’ll be going back to our prefix key. Press ctrl+b and then the arrow key in whichever direction you’d like to go in, this will change the current active window.

Starting New Windows

A small terminal window inside a parent is called a pane. On the bottom left of the screen there’s a 0: bash, which means that you’re on the first window, and the name of the window is Bash. Tmux names the windows automatically which can of course changed as well. To start a new window, press, ctrl+b and tell c to start a new window. Now you’ll see 0: bash* 1:bash. The start indicates the current active window.

Note - Navigating through windows is somewhat same as panes. You press the prefix key and the window number to change the current window you're on.

Scrolling in Tmux

Type the following command on your Tmux session


too much output? isn’t it. Try scrolling through the output. Can’t can you? The scroll just displays the last commands you used. You can try two options now.

  • Using less to control the buffer.
  • Using the Tmux default method.

Less Method

less is a utility built into Linux which reads the first few lines of any file or output from a command, display’s it on the terminal to read further along, you can scroll through the buffer using arrow keys or your mouse. So this command solves our reading problem.

history | less

here we get the output of history and PIPE it into less.

Tmux Method

This is the much more preferred method and can be useful in copy and pasting as well. To scroll through the buffer using Tmux simply press the prefix key ctrl+b and [. Now you can scroll through the buffer using your mouse or your arrow keys.

Copy and Pasting in Tmux

To copy and paste in Tmux first you must drop into the scroll mode using prefix key and [. After that go to the line you’d like to copy and press ctrl+space and use the arrow keys to navigate to the point where your desired selection ends. This process selects the statement. Now to copy it press alt+w. Once you’ve copied something you’d automatically thrown out of scroll mode. To paste the copied text use the prefix key and ]. This will paste the copied text.

Note- Whatever you copy is stored inside the Tmux clipboard which in turn means that you won't be able to copy and paste from Tmux session to your browser for example.

What Bunny Rating Does it Get

Tmux is one of the best tools for any professional and power user out there. The ability to add sessions and have them saved is a huge plus for anyone who deals with a lot of server management and has to hop from one machine to another over and over again. If you’re only interested in splitting screens to better analyze files, you can try GNU Screen. I don’t start my terminal without Tmux, it can be daunting at first but learning it would be biggest favor you’ll do to yourself. I give it a full 5 bunny rating.

Want to learn more about ethical hacking?

We have a  networking hacking course that is of a similar level to OSCP, get an exclusive 95% discount HERE

Do you know of another GitHub related hacking tool?

Get in touch with us via the contact form if you would like us to look at any other GitHub ethical hacking tools.



You may also like

Latest Hacking News

Privacy Preference Center


The __cfduid cookie is used to identify individual clients behind a shared IP address and apply security settings on a per-client basis.

cookie_notice_accepted and gdpr[allowed_cookies] are used to identify the choices made from the user regarding cookie consent.

For example, if a visitor is in a coffee shop where there may be several infected machines, but the specific visitor's machine is trusted (for example, because they completed a challenge within your Challenge Passage period), the cookie allows Cloudflare to identify that client and not challenge them again. It does not correspond to any user ID in your web application, and does not store any personally identifiable information.

__cfduid, cookie_notice_accepted, gdpr[allowed_cookies]


DoubleClick by Google refers to the DoubleClick Digital Marketing platform which is a separate division within Google. This is Google’s most advanced advertising tools set, which includes five interconnected platform components.

DoubleClick Campaign Manager: the ad-serving platform, called an Ad Server, that delivers ads to your customers and measures all online advertising, even across screens and channels.

DoubleClick Bid Manager – the programmatic bidding platform for bidding on high-quality ad inventory from more than 47 ad marketplaces including Google Display Network.

DoubleClick Ad Exchange: the world’s largest ad marketplace for purchasing display, video, mobile, Search and even Facebook inventory.

DoubleClick Search: is more powerful than AdWords and used for purchasing search ads across Google, Yahoo, and Bing.

DoubleClick Creative Solutions: for designing, delivering and measuring rich media (video) ads, interactive and expandable ads.



The _ga is asssociated with Google Universal Analytics - which is a significant update to Google's more commonly used analytics service. This cookie is used to distinguish unique users by assigning a randomly generated number as a client identifier. It is included in each page request in a site and used to calculate visitor, session and campaign data for the sites analytics reports. By default it is set to expire after 2 years, although this is customisable by website owners.

The _gat global object is used to create and retrieve tracker objects, from which all other methods are invoked. Therefore the methods in this list should be run only off a tracker object created using the _gat global variable. All other methods should be called using the _gaq global object for asynchronous tracking.

_gid works as a user navigates between web pages, they can use the gtag.js tagging library to record information about the page the user has seen (for example, the page's URL) in Google Analytics. The gtag.js tagging library uses HTTP Cookies to "remember" the user's previous interactions with the web pages.

_ga, _gat, _gid