Did you know that you can split/divide your Azure Cloud Console Shell into multiple panes?
No? Well, yes you can very well do so. See the screenshot from my Azure Subscription in the feature Image above.
This ability is not explicitly documented anywhere by Microsoft (yet), but I discovered it because of my Inquisitiveness and common sense.
The trick here is to utilize Tmux, which is the terminal multiplexer in Unix/Linux. It is a command-line tool that allows us to divide a console/terminal window into multiple panes, and render the output of a shell and/or tool in each pane as well as switch inputs between each pane.
Tmux relies on a Unix/Linux feature called Pseudo Terminals (PTY) that are attached to a process running a shell/tool, and which virtualize the behaviours of a terminal. A physical terminal (TTY) can be attached to any PTY (or more than one in the case of Tmux).
Tmux attaches each pane it contains to a separate PTY, allowing a single console/terminal to render the output of several Unix/Linux tools in their own pane within the terminal/console.
In Azure Cloud Console, Tmux is already pre-installed OOTB, which makes using it no problem. You just need to issue the tmux command on the Console, and can then use the below listed key combinations for splitting it into vertical/horizontal panes.
If you want to close any specific pane, just navigate to that pane, and issue exit command to close that particular pane.
Following are the standard key combinations you should use to split the terminal/console (just like in Unix/Linux) and navigate between panes:
- Split the current pane vertically – [CTRL B] + [%]
- Split current pane horizontally – [CTRL B] + [“]
- Navigate between panes – [CTRL B] + [Arrow-key | P | N]
The ability to multi-split the terminal/console is not limited only to the Azure Cloud Console. It was extended by Microsoft to Windows 10 based WSL (Windows Subsystem for Linux) from build 14361 onwards. This means that you can use the same approach to split your terminal/console for all WSL based Linux distros you are using on your Windows 10 machine.
See the screenshot below from my Windows 10 machine (Fall Creator’s Update). This shows the multi-split Terminal/Console for Ubuntu on WSL. Approach used here for splitting into panes is exactly same, but you will first need to install Tmux (Install for Ubuntu on WSL using: sudo apt install tmux)
Hope you found this blog post useful. If you have any queries/feedback, please feel free to mention in the comments section below.