During my web development, I usually need to run different terminal applications, like webpack, node server, etc. As Windows command prompt does not support tabs, I had to open multiple command prompts, which is very ineffective. This is not a problem for Mac / Linux users, as their consoles support programs like
Fortunately, now Windows 10 allows you to run a Linux subsystem inside windows. Once enabled, one can install a Linux distribution such as Ubuntu and can run Linux command line programs inside Windows (with some limitation though). With this, I can split my terminals into multiple parts as below.
Setting up Split screen terminals in Windows
Follow the steps to get this setup in Windows 10.
- Go to
Settings -> Update & Security -> For Developersand enable
Developer Mode. Click Yes in the alert box.
- Once you enable Developer Mode, now go to:
Control Panel -> Programs -> Turn Windows features on or off. Search for
Windows Subsystem for Linuxand enable it. This will install necessary components in your system. You may have to restart your system.
- After you restart, go to
Microsoft Storeand search for
Ubuntu. Install this app.
Ubuntuis installed in your system, open it (just search for it in start menu). When it opens for the first time, it will download necessary files and will ask you to create a username and a password. This does not need to match your Windows password. Remember this username and password as this will be the
rootuser and needed to install anything inside Ubuntu.
- Now you are inside Ubuntu land. You can run linux command line applications such as vi, git, apt-get, etc.
sudo apt-get install tmux. This will install the terminal multiplexer application tmux.
tmuxinstalled, now run
Now you can run any tmux command. For example, to split the terminal screen vertically, press
Ctrl + b and
%. And to split screen horizontally, press
Ctrl + b and
Bonus: Making your boring terminal to look awesome - ohmyzsh
The default bash terminal is good. But it is not that good without ohmyzsh - a framework to install themes and plugins in your terminal. Let’s set this up.
- Inside Ubuntu terminal, run
sudo apt-get install zsh.
zshis installed, switch to it by running
- Now go to http://ohmyz.sh/ and follow their instructions to install
- Once it is installed, just close and reopen the Ubuntu. When
ohmyzshinstalled, it would have setup
zshas your default terminal.
- Open zsh profile by running
vi ~/.zshrcand update any theme you want in
ZSH_THEMEoptions. You can see the list of themes in here: https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ohmyzsh theme is ys. What’s yours?