Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use Linux and a Mac.
I'll be teaching some command line stuff soon.
What can I install on Windows to give me a terminal window most similar to a basic mac/linux bash shell.
Would like to be able to define .bash_aliases as well if possible.

share|improve this question

migrated from stackoverflow.com Jun 15 '13 at 19:54

This question came from our site for professional and enthusiast programmers.

1  
we used putty to connect to a real linux server. on windows I was always both reluctant and tempted to use cygwin, reluctant because of my clumsy install experience. But personally, i found it more convenient to use than msys and faster than a vm. once installed, cygwin turns out somehow portable simply copying it's directory is enough, however it will create a new username on each machine/user based on the windows username (by default, at least). But keep in mind that since cygwin/msys can been seen as a custom "distribution", some [optional] command switches may be missing. test them. –  naxa Jun 15 '13 at 14:37

6 Answers 6

up vote 18 down vote accepted

You could install cygwin (http://www.cygwin.com/) or msys/mingw (http://www.mingw.org/wiki/MSYS), or you could install a full Linux distribution in a virtual machine (for example using virtualbox).

share|improve this answer
    
I used a cygwin that was 135 mb (25 mb packed), copied from another computer (portable). it created a new username based on the new computers current user, and worked perfectly otherwise. my current cygwin is 800 mb, with a build environment, 200-300 mb source code and some stuff. –  naxa Jun 15 '13 at 14:44

There's also Clink available at GitHub. It integrates itself into windows command prompt using hook libraries.

I use Linux at work and find myself sometimes tabbing around in cmd which does not act like I expect it from Bash. With Clink I can overcome some of these shortcomings.

Lately, I also discovered a promising, but not yet 'can-do-all' project called flinux which emulates Linux system functions and provides some kind of a system on top of it (currently based on Arch Linux)

share|improve this answer
    
Does Clink actually change the language, or it only improves something in cmd.exe? This is not entirely clear from the answer. –  Sarge Borsch May 31 at 19:35
    
It enables you to use some of the usual *nix shell features, such as reverse search using Ctrl+R, a PATH searching command completion etc. –  Andreas Jun 1 at 12:13
    
So it is not a bash implementation, right? –  Sarge Borsch Jun 1 at 13:20
    
Erm, no. An extension to cmd.exe, just as described on the site ;) –  Andreas Jun 1 at 13:32

I would suggest you download and install a minimal set of MinGW and also minimal set of MSYS. The MinGW installer gives you an easy GUI to chose what packages you want installed. If all you want is BASH, then the installation won't take more than few megabytes.

UPDATE: I moved to the MSYS2 which is far more advanced, and has port of ArchLinux pacman tool for package management. MSYS2 installer has everything you need, plus it uses mintty which is absolutely perfect .

share|improve this answer

In addition to what faffaffaff said, Git for Windows includes bash and some common Linux command-line programs (e.g. vim, sed, gawk). It's based on MSYS. The version of the programs is old though, for example bash is version 3.1. cygwin would have more recent versions of the utilities.

I also use ConEmu as terminal emulator (mainly for syntax highlighting in vim, tab pages, easier copy-pasting). console2 is also another popular terminal emulator though I haven't tried it.

share|improve this answer
    
BTW: ConEmu also recognizes MSYS2 installations and allows for some Clink integration. –  Andreas Jun 1 at 12:15

This is one of the first things I do when I set up a new Windows machine:

A functional and sleek console in Windows

share|improve this answer
    
Make sure to add an excerpt from the link to prevent the effects of link rot. –  oldmud0 Jun 16 at 23:05

just tried with babun, which integrated the cygwin internally, taste good to me : )

Download file slightly big, around 250MB. But installation is straight forward, no need to configure anything and it just work!

http://babun.github.io/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.