Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBen Goldman
14,626 PointsCommand Line for Windows?
Is there also a tutorial available for the Windows command line? These lessons seem specific to the Mac.
5 Answers
Chris Shaw
26,676 PointsHi Ben,
The Windows command line is a wildcard these days still as POSIX systems have a consistent look, feel and behaviour while the command prompt as it's known shares nothing in common apart from a few core system functions.
All-in-all you would be far better off using something like Cygwin which is a Unix-like terminal for Windows that offers similar functionality but not complete emulation which is to be expected.
In saying all of that most developers these days are trying to get scripts working on Windows like they do on Unix systems but it's a feat and costs developers precious time but for the most part developers creating scripts that use Ruby or Python generally don't have to worry about this.
James Barnett
39,199 PointsYes there is, it's called Windows PowerShell. Check out http://cli.learncodethehardway.org/book/
Most of the view that Windows isn't command line friendly comes from people who seem to have very narrow experience with scripting and wish Windows to work like a Mac. Ruby isn't JavaScript and bash isn't Powershell all are perfectly good language they are just different flavors.
Ben Goldman
14,626 PointsThanks, James. I appreciate the link.
Mykola Mysko
10,742 PointsHere is a great tutorial on how to run bash on Windows 10: https://www.youtube.com/watch?v=xzgwDbe7foQ
Sean T. Unwin
28,690 PointsCygwin is a really great option as Chris Upjohn has mentioned.
It's like having *nix in the terminal and Windows everywhere else. I use it constantly when I'm using Windows. It is fantastic if you're used to the linux terminal or want to learn it without having to install a VM, as well as having a ton of packages available for it.
Some Tips for Cygwin from my experience
- If you want Ruby installed:
- if you have an x64 system then install the x64 version of Cygwin
- install RVM using their intstall script.
- be sure to have
curl
installed first. You can run the Cygwin setup anytime to install packages you want. - have a copy of the Cygwin setup app in
CYGWININSTALLDIR/bin/
and rename itsetup.exe
- be sure to have
- you can still have the RubyInstaller for Windows on your system without conflict.
- When using Nano, the commands are
Ctrl + Shift + [Command]
as opposed to the typicalCtrl + [Command]
- If you want an
apt-get
type package management then cyg-apt is available.- If you have trouble installing be sure to read the comments on the Getting Started page.
- This isn't a complete replacement for running the Cygwin setup for installing new packages.
I use it in conjunction with Console2 which I highly recommend even if you don't use Cygwin; it's a good dressing for a terminal. It's pretty customizable as far as window transparency, background, colors, Hot Keys and ability to set up custom tabs - like if you want tabs for Cygwin and tabs for PowerShell.
Adnan Pozegić
12,789 PointsBash is comming to windows 10 in the anniversary update, you can read more in this article (http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/)
Ben Goldman
14,626 PointsBen Goldman
14,626 PointsThanks, Chris. That was very informative. I'll give Cygwin a try!
James Barnett
39,199 PointsJames Barnett
39,199 PointsCygwin is a very heavy handed solution for adding a shell to a system just use Msysgit.