Getting Started with Command Prompts



Similar documents
Introduction to the UNIX Operating System and Open Windows Desktop Environment

File Management Where did it go? Teachers College Summer Workshop

Opening a Command Shell

Introduction to the use of the environment of Microsoft Visual Studio 2008

your Apple warranty; see There are two main failure modes for a mirrored RAID 1 set:

MY WORLD GIS. Installation Instructions

OS X LION SET UP THE SYSTEM

Apple Mac Fundamentals: A Tutorial. Updated 24/4/2013 By Mac Thing enquiries@macthing.co.uk Table of Contents:

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 2 Introducing Operating Systems

Apple Mail Setup Guide (POP3)

As you look at an imac you will notice that there are no buttons on the front of the machine as shown in figure 1.

A Crash Course in OS X D. Riley and M. Allen

Installing FEAR on Windows, Linux, and Mac Systems

Determining Your MAC Address in Windows XP

NOTE: There is a limit of 10 concurrent users for connection to a server using personal file sharing.

Chapter 2 Text Processing with the Command Line Interface

Task Scheduler. Morgan N. Sandquist Developer: Gary Meyer Reviewer: Lauri Watts

Appendix K Introduction to Microsoft Visual C++ 6.0

State of Michigan Data Exchange Gateway. Web-Interface Users Guide

While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX

APNS Certificate generating and installation

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

Installing the Virtual Desktop Application (MAC)

Microsoft. File Management. Windows Desktop. Microsoft File Management NCSEA

While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX

Computer Programming In QBasic

Managing Files. On a PC, after you find your file, right click it and selet Rename from the pop-up menu.

GO MARKETS MT4 FOR MAC

Working with AutoCAD in Mixed Mac and PC Environment

Zoom Plug-ins for Adobe

About XML in InDesign

Mac OS X. A Brief Introduction for New Radiance Users. Andrew McNeil & Giulio Antonutto

Action settings and interactivity

JAVS Scheduled Publishing. Installation/Configuration... 4 Manual Operation... 6 Automating Scheduled Publishing... 7 Windows XP... 7 Windows 7...

Spotlight. Effectively Search The Content Of Your Computer

Installing (1.8.7) 9/2/ Installing jgrasp

Download and Installation Instructions. Java JDK Software for Windows

Initial Setup of Microsoft Outlook 2011 with IMAP for OS X Lion

Windows File Management A Hands-on Class Presented by Edith Einhorn

Module 1. 4 Login-Send Message to Teacher

University of Toronto

Apple Time Machine. Backing up. Setting up Time Machine

Eclipse installation, configuration and operation

Sophos Anti-Virus for Mac OS X Help

Java Web Start Guide

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories

Universal Management Service 2015

Standard Client Configuration Requirements

DocuPrint C3290 FS Features Setup Guide

Edith Cowan University Information Technology Services Centre

Command Line - Part 1

Step-by-Step Setup Guide Wireless File Transmitter FTP Mode

Version Control with Subversion and Xcode

Connecting to Remote Desktop Windows Users

Introduction to Windows

Introduction to Mac OS X

Managing Your Desktop with Exposé, Spaces, and Other Tools

CGS 1550 File Transfer Project Revised 3/10/2005

Working With Your FTP Site

Macintosh System OSX #1

Installation Guidelines (MySQL database & Archivists Toolkit client)

Getting Started with Postgres Plus (R) on Windows (R) A Postgres Evaluation Quick Tutorial From EnterpriseDB

AES Crypt User Guide

Initial Setup of Mac Mail with IMAP for OS X Lion

Montefiore Portal Quick Reference Guide

A computer running Windows Vista or Mac OS X

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

Creating a Java application using Perfect Developer and the Java Develo...

The following was taken directly from the ARD (Apple Remote Desktop) operator s manual:

warpct.com Basic Computer Skills MS Windows XP Workbook courseware by WARP! Computer Training

How To Use An Apple Macbook With A Dock On Itunes Macbook V.Xo (Mac) And The Powerbar On A Pc Or Macbook (Apple) With A Powerbar (Apple Mac) On A Macbook

Microsoft Word Revising Word Documents Using Markup Tools

Adobe Dreamweaver Student Organizations Publishing Details Getting Started Basic Web Page Tutorial For Student Organizations at Dickinson College *

FUGU - SFTP FOR MACS- REFERENCE GUIDE

Download and Installation Instructions. Android SDK and Android Development Tools (ADT)

INTRODUCTION TO COMPUTER CONCEPTS CSIT 100 LAB: MICROSOFT POWERPOINT

Introduction to Mac Operating System: Snow Leopard

Managing Documents in the Citrix XenApp Remote Desktop

1. Scope of Service. 1.1 About Boxcryptor Classic

Check out our website!

Librarian. Integrating Secure Workflow and Revision Control into Your Production Environment WHITE PAPER

Common SofTest Troubleshooting Techniques

Smart Connection 9 Element Labels

Optimal Browser Settings for Internet Explorer Running on Microsoft Windows

Download and Installation Instructions. Visual C# 2010 Help Library

User Manual for Data Backups

Wireless Printing Setup Guide

Instructions to connect to GRCC Remote Access using a Macintosh computer

Installing Java. Table of contents

User guide. Business

Downloading and installing SMART Notebook Software

Python for Series 60 Platform

Download and Install the Citrix Receiver for Mac/Linux

Enterprise Apple Xserve Wiki and Blog using Active Directory. Table Of Contents. Prerequisites 1. Introduction 1

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

Transcription:

Getting Started with Command Prompts Updated March, 2013 Some courses such as TeenCoder : Java Programming will ask the student to perform tasks from a command prompt (Windows) or Terminal window (Mac OS). Many students have never had an opportunity to work with command prompts before, so this document will introduce the concepts necessary to be successful in the course activities. What is a Command Prompt? Before graphical operating systems like Microsoft Windows and Apple Mac OS, users interacted with computers through a command prompt. Command prompts are text-based windows where users can type commands and receive text-based output. You don t have any familiar mouse input options or graphical buttons, labels, or other widgets common in graphical forms. Windows Command Prompt Mac OS Terminal Prompt http://www.homeschoolprogramming.com Page 1

How do I Start a Command Prompt? On Windows computers you can start a command prompt from the Start Menu. Select Programs or Programs and Features and then scroll down to the Accessories folder. Inside the Accessories folder you will find the Command Prompt icon. Click that icon to launch your Command Prompt. On Mac computers you may have the terminal docked near the bottom of your screen as shown to the left. If not you can start it from your Finder application by navigating to your Applications/Utilities folder and clicking on the Terminal icon. http://www.homeschoolprogramming.com Page 2

Command Prompts Focus on a Directory Your computer hard drive contains a number of directories and sub-folders in a hierarchical arrangement. Your command prompt will always be focused on one particular directory at a time, and that directory is typically reflected in the text prompt. In the example below the Windows command prompt is focused on the C:\Users\Chris directory. Commands that you type into the Windows command prompt will appear after the right angle bracket >. On Mac OS your directories are also displayed on the command line. In this example we are in the student home directory, represented by a tilde character (~). Changing Directories Whenever you run a command (such as compiling or running a Java program), that command will execute in the context of your current directory. So you will want to change your current directory to focus the command prompt in the area that contains your source files. To change the directory, use the cd command. That means from the command prompt you type cd followed by the target directory: cd <target directory> http://www.homeschoolprogramming.com Page 3

Directories are names separated by backslashes (windows) or forward slashes (Mac OS) like \TeenCoder\Java Programming\My Projects\HelloWorld. In this Windows example we use the cd command to change to a new directory. We can use the same cd command on Mac OS, however you don t enter double quotes around the path. Instead you add a backslash (\) in front of every space within the path like this: The Mac Terminal will only show the last (leaf) subdirectory and not your full path. Above you can see just the HelloWorld part of the full path. Notice how the command prompt changes to reflect the new directory that has the focus. If you attempt to change to an invalid directory you will get an error message! An error message almost certainly means you have made one of these common mistakes: Spelling a directory name incorrectly (Spaces are important! Mac OS is also case sensitive.) Failing to use the correct forward slash (/) or backslash (\) for your operating system. Forgetting to use double-quotes on Windows to surround your full directory name Forgetting to put a backslash in front of spaces within a path on Mac OS Attempting to change to a directory that does not actually exist http://www.homeschoolprogramming.com Page 4

If you have not created the HelloWorld directory underneath My Projects in the example above, then you will not be able to cd to that directory and you will receive an error message. If you are confused about what directories are on your hard drive, you can always use Windows Explorer or Mac OS Finder to review your directory structure and create directories. Some Windows computers may have more than one hard drive identified by different letters like C or D. To change your command prompt to focus on a different drive, just type the drive letter followed by a colon. From there you can use the cd command to access other directories on that different drive. Absolute vs. Relative Paths When you run the cd command to change to a different directory, you can use an absolute path containing the entire directory structure at once. If your target directory starts with a slash, that indicates an absolute path that will begin from the root of that hard drive. If you omit the leading slash, that means you want to change to a directory relative to your current location. In this example we begin with an absolute step to get to the \TeenCoder directory and then take smaller steps to reach HelloWorld. http://www.homeschoolprogramming.com Page 5

Mac OS works the same way, but you also have a special character (~) that represents your account s home directory. Our course material is installed underneath your home directory. Getting Directory Listings Students may want to examine the contents of the current directory in order to confirm that the right files are in the right place. On Windows type dir to get a directory listing. On Mac OS, type ls to get a directory listing. Attempting to build and run Java programs against files require you to be in the right directory containing the correct files. If you receive error messages while following the documented activity steps, that means you are either focused in the wrong directory, or have not stored the correct files in that directory. http://www.homeschoolprogramming.com Page 6

Getting Help For further assistance with a specific error, please contact us using the Getting Help form in the Support area of our website. Please include a screen shot of your console window demonstrating the problem. http://www.homeschoolprogramming.com Page 7