PRO 30% Free • Stripe ($15) & Razorpay (₹899)

Command Line Interface

Top Course Staff · 2 min read · Developer tools · PRO · 30% Free Preview Available

Command Line Interface

Background:

The command line interface is a program on your computer that allows you to create and delete files, run programs, and navigate through folders and files. On a Mac, it’s called Terminal, and on Windows, it’s Command Prompt.

Most developers navigate their computers and run the programs they build directly from the Command Line. Using a few typed words, you can run a program you wrote, move through your computer’s file system, and even edit existing files. The Command Line is a powerful application and will unlock new avenues in yourprogrammingability.

This article will walk you through how to find and begin using the Command Line on your own machine. We won’t cover how to use and manipulate the command line interface in much detail. If you’re not familiar with the command line, take ourLearn the Command Linecourse.

Pro Tip: Command line interface is commonly abbreviated to “CLI.”

Wake Up Terminal! (Mac)

  • Find the Terminal application with Finder and navigate to the directory of your choice. If you took Codecademy’sLearn the Command Linecourse, you’ll already know how to do this. Otherwise, see the instructions below.

Instructions

  • When you first open Terminal, you are in the root directory. Navigate to your Documents directory withcd Documents.
  • Create a new folder called “my_project” withmkdir my_final_project.
  • Change your directory to the folder you just created withcd my_project.
  • Create a test file withtouch test.rb(This will create a ruby file within the my_project folder).

Wake Up Command Prompt! (Windows)

  • Search for the Command Prompt program and navigate to the directory of your choice. If you took Codecademy’sLearn the Command Linecourse, you’ll already know how to do this. Otherwise, see the instructions below.
  • When you first open Terminal, you are in the root directory. Navigate to your Documents directory withcd Documents.
  • Create a new folder called “my_project” withmkdir my_project.
  • Change your directory to the folder you just created withcd my_project
  • OpenSublime Text, click on File > New File , then navigate to Documents > my_project, and save the file astest.rb. (This will create a ruby file within the my_project folder.)

Wrap-Up

Now that you’ve awakened your Command Line, it’s time to start using it. Since the Command Line is text-based, it can seem intimidating. Don’t worry though, it is pretty simple and the rewards for learning its commands will come back to you over and over.

You can start learning the command line in ourLearn the Command Linecourse. There, you’ll learn how to move through your computer’s file system, how to create files from the command line, and much more. As you learn more programming languages within Codecademy, check out the articles associated with them. We’ll teach you more language-specific commands, which will prepare you to build your very own programs.

'The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.'

30% Free Preview Reached · Unlock Remaining 70%

Complete Payment to Unlock Full Guide & Source Code

You are viewing the 30% preview. Join TopCourseAI Pro to unlock the remaining 70% of this article, unblur all code snippets, and gain full access to all 412 technical projects and guides.

✓ Full Access to All 160+ Projects
✓ Instant Blur Removal Everywhere
✓ Production Source Code & Blueprints
✓ All Future Deep Dives Included
Instant Unhindered Activation ·
End of Preview · Unlock Complete Blueprint & Source Code

Ready to access the complete step-by-step tutorial?

Gain full unhindered access to all 412 technical projects and guides, unblur all source code snippets, and download runnable scripts.

Production AI Blueprints

Ready to build production-grade AI systems?

Enjoyed this guide? Continue exploring our library of 166+ production blueprints, multi-agent swarms, and autonomous agent systems with 100% unblurred, executable source code.