DEV Community

Cover image for Command Line
CadenCGS
CadenCGS

Posted on

Command Line

Introduction

Command Line is one of best ways to directly interact with information on you computer. Command line is accessed through the command prompt, or cmd on windows and terminal on mac, and is a way to directly send text to your computer.

What Can You Do With Command Line?

Command line can be used more a multitude from things! In fact, anything you can do on your GUI, or Graphical User Interface, can be done in Command Line, such as create and editing the name of a folder. Comma line can also be used for more complicated things such as accessing a server in another country that your website per say is hosting off of.

Command Line Commands

ls: Lists all of the folders in your current directory
pwd: Displays the current directory
cd {Location}: Switches the pwd to the {Location} as long as it is your current pwd
cd ..: Sets the pwd back one folder, essentially reversing cd {Location}
clear or cls:: Clears the terminal
cd ~: Sets the pwd to the user directory
cd {Location}/{Location}: Sets the pwd two levels deeper but nomenclature must match
open .: Opens the current pwd folder
mkdir {Name}: Makes a folder in the current pwd with the name of {Name}
touch {File Name}.{File Extension}: Creates a file with name {File Name} and a file type of {File Extension}
open -a "{File Name}":: Opens the file or shortcut with the exact name in the quotations
mv {Current File Name}.{File Extension} {New File Name}.{File Extension}: Renames the current file to the new name listed
rm {File Name}.{File Extension}: Removes the specified file
say {text}: The Command Line equivalent of console.log

Introduction

In conclusion, Command Line is the most efficient way to communicate directly with you computer to preform different tasks and actions, although it may seem inefficient at times. Command Line lets you do almost anything, ever deeper than you could imagine, and even deeper than this list I've provided goes.

Sources

Information: Udemy "The Complete Web Developer 2021: Zero To Mastery" course by Andrei Neagoie
My Class Teacher: Matthew Larrubia

Top comments (0)