KUAS Engineering

Installing a command-line on Windows

Option 1: MobaXterm

This is a Windows application that provides a POSIX command line interface to Windows.

  • Advantages: Simple to install, perfectly adequate for command-line experiments, and you have direct access to Windows files and directories from your command line.
  • Disadvantages: Does not provide as many command line utilities as are available on Linux or Mac. (That said, I always install and frequently use MobaXterm on all of my Windows computers.)

First, download the installer and run it. Then start MobaXterm to make sure it starts properly. You should see a large black terminal (command line) window with some text and a flashing red cursor. You can close the window.

Second, download some plugins that add useful utilities to your command line. Move the downloaded plugins file to your MobaXterm program folder (by default C:\Program Files (x86)\Mobatek\MobaXterm'') and then extract (unzip) the files it contains into the same folder. Restart MobaXterm and check that the plugins are installed by typing file . and pressing Enter''. You should see

.: directory

printed in your terminal. You can close the window again.

Option 2: Use a virtual machine to run Linux

You can use a 'virtual machine' to run an entire operating system in a window. VMWare and VirtualBox are both free and easy to use.

  • Advantages: A full command-line environment with many thousands of utilities and applications available. You can easily suspend and resume the virtual machine without losing any work during Windows reboots.
  • Disadvantages: You have to go through the complete installation process for the guest operating system. You have to allocate a large amount of disk space (12 GB, or more) for the guest OS virtual disk. You are running an OS inside an OS, which might make the experience feel a little 'fake'.

First, download the VMWare installer and install it. (When it asks you if you want “free” or “30-day evaluation”, choose “free”.)

Second, download a suitable operating system. I recommend (and use extensively, for both program and document development) Xubuntu.

There are lots of instructions on the web about how to set up (X)Ubuntu running under VMWare on Windows.

Hint: if you are running an anti-malware or anti-virus program then add the folder containing your VM settings and the virtual disk drive to your anti-virus program's 'whitelist'. Performance will be better.

Option 3: Use Windows Subsystem for Linux

Windows is capable of running Linux programs directly (including the entire windowing system, if you are brave).

  • Advantages: Better performance than when using a virtual machine and better integration with the Windows system. You have direct access to Windows files from the command line. You can install everything automatically from the Microsoft store.
  • Disadvantages: You cannot suspend and resume your command-line session across Windows reboots.

Again I recommend Ubuntu (or Debian, if you are already familiar with Linux or Mac). More information, a link to the Microsoft store page, and a beginner tutorial is available at: https://ubuntu.com/wsl

Lots more information (probably much more than you need) is available on the Ubuntu on WSL Wiki page.