1. Computing

Using the Command Line


1 of 10

Starting a Command Prompt

Before really starting to use Ruby you need to have a basic understanding of the command line. Since most Ruby scripts won't have graphical user interfaces, you'll be running them from the command line. Thus, you'll need to know, at the very least, how to navigate the directory structure and how to use pipe characters (such as |, < and >) to redirect input and output. The commands are the same on Windows, Linux and OS X.

To start a command prompt on Windows, go to Start -> Run. In dialog that appears, enter cmd into the input box and press OK.

To start a command prompt on Ubuntu Linux, go to Applications -> Accessories -> Terminal.

To start a command prompt on OS X, go to Applications -> Utilities -> Terminal.

  1. About.com
  2. Computing
  3. Ruby
  4. Beginning Ruby
  5. Using the Command Line

©2014 About.com. All rights reserved.