Command Line Interface
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.'
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.
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.
Code Interpreter with GitHub Co-Pilot in Visual Studio Code
Next BlueprintComparison of Build Tools
Related Blueprints & Guides
View all 166 →Android Studio Quick-Start Guide
Android Studio often intimidates beginners, but by learning a few handy shortcuts and getting the lay of the land, we can navigate this powerful development environment with ease.
Developer toolsApache Kafka Tutorial: A Complete Guide for Beginners
Apache Kafkais a well-known distributed event streaming platform designed to efficiently manage real-time data feeds. It was originally developed by LinkedIn in 2011 and later open-sourced. Apache Kafka has gained immens...
Developer toolsBuilding Websites with Wix
Creating a website has never been easier. Previously, making a presentable website meant learning HTML, CSS, andJavaScript. The whole process could take weeks, months, or even years before creating a website that you’re...
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.