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 trial

Development Tools

Nano, sudo apt-get for windows

How come when i run nano, sudo or an apt-get function i get command not found. I'am using windows 7 Thanks!

2 Answers

Kevin Korte
Kevin Korte
28,149 Points

I'm not a command line expert, but windows command lines do not have all of the features of a linux or unix command line, like what you're use to through here. I know that apt-get is not available on windows, and I've never tried it, but it sounds like nano isn't either.

If you're on windows, your best bet is to install Ubuntu inside a virtual box on your windows machine. Than when you work inside your box, you'll have access to apt-get and nano.

It's really not that hard to set this up, and it is hard to screw it up. I had everything set up in about 2-3 hours if I remember correctly. Did this just a few weeks ago myself, for the same reason.

This is the guide I used: http://www.psychocats.net/ubuntu/virtualbox

It's a little outdated but it's still close enough it got me there.

If you go this route, let me know and I'll help as I can.

Windows command line has a different set of command names. On 'Nix based operating systems you are never running as the absolute admin unless you run sudo, this is for security reasons. Windows has some built in features to mimic that type of security using functions like UAC (user account control).

Here is a list of all the Windows Command Line commands: http://ss64.com/nt .

There are downloadable shells which mimic the Linux/Mac shell such as https://www.cygwin.com/ or http://win-bash.sourceforge.net/.

Usually when you need to run commands such as npm install as the highest level user, you can run the command as Administrator: http://www.howtogeek.com/howto/windows-vista/run-a-command-as-administrator-from-the-windows-vista-run-box/