ConEmu - Improve your Windows console experience

Use ConEmu in windows for a better console experience for Win and Linux

ConEmu

You love unix but also love windows ?

I always prefered the Windows GUI and window management but cannot think of living without linux shell capabilities.

The easy answer would be : “Just launch putty or mobaxterm from a windows host and end of the game or install cygwin”. It’s true that you can do this, and mobaxterm is a really nice tools that is pretty nice when using X11 forwarding. I might write something about it later.

My set up with Conemu is pretty simple : My host is a windows 10 OS with virtualbox installed. I have a virtualized ubuntu workstation with all my forensics tools installed and standard utilities launch on my Window workstation.

ConEmu allow me to use my standard windows tools, use cygwin commands and with a hotkey directly launch a ssh connexion with my virtualized environement.

My virtualized environement share a folder with my host so that i can work on a file on my host and with my VM.

Pretty simple but working fine for me.

First download and install a simple instance of ConEmu. ConEmu official website

Then download and install cygwin and install the openssh package. Cygwin official website

In “Search” look for the openssh package.

Cygwin openssh

Wait for install…

Launch ConEmu.

You will be directly welcome with a standard windows cmd. The following shortcut allow you to split your current cmd. Ctrl + Shift + O Ctrl + Shift + E

Close the active pane: Win + Delete

By default to navigate between panes you will need to use the “Apps” key. It’s not a commonly used key it’s located here on standard keyboards :

Apps key

So related shortcut (as in the official documentation about panes) : Cycle switche visible split-panes: Apps+Tab, Apps+Shift+Tab. Put focus to nearest pane: Apps+Up, Apps+Down, Apps+Left, Apps+Right. Move splitter (resize panes): Apps+Shift+Up, Apps+Shift+Down, Apps+Shift+Left, Apps+Shift+Right.

Now lets use ConEmu for SSH connexion. First we are just going to create a new tab with the ssh connexion. After that we are going to create a shortcut (task in ConEmu vocabulary) that open a new pane with the ssh connexion.

Go into the settings ( Win + Alt + P or Settings in the menu or even right click in the taskbar at the bottom).

Go into Startup > Tasks Create a new task, set a name and also set desired shortcut.

Then just put the path of the desired executable. Here it’s ssh.exe, i added the username and ip of my virtualhost here :

c:\cygwin64\bin\ssh.exe root@192.168.56.101

If you installed cygwin somewhere else just change the path.

Here is my setting : Create a new task

Now when you use your shortcut it’s going to open a new tab in ConEmu asking for the password of your ssh session.

Ok but what we want to split the screen to have a Windows cmd & Linux shell.

To do this we will create a new task. Do exactly the same as the first example but here is the command line to set in the command block under Startup > Task.

cmd.exe /k "C:\cygwin64\bin\ssh.exe root@192.168.56.101" -cur_console:s

We are invoking the cmd.exe and at the end of the command precise that we want to split the screen. Here is my settings :

Create a new task split

More will follow about customization of that tools but at least you can start with a little something.

What can I do next ?

Pretty simple things can be done with this tools. You can for example invoke a python shell pretty easily for development purposes by creating a new task :

cmd.exe /k "C:\Python27\python.exe" -cur_console:s

If something can be improve please feel free to share !

Written on April 3, 2018