The terminal
is a text based system that allows you, as a user, to control your computer and do everything from creating new files and folders to starting up entire applications.
The Terminal
The Command Prompt
Descriptions of Programs we Installed
VSCODE
: a free source-code editor made by Microsoft for Windows, Linux and macOS.Node
: an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser.NPM
: a package manager for the JavaScript programming language.Mocha
: a JavaScript test framework for Node.js programs.Xcode Command Line Tools
: The Command Line Tool package gives Mac terminal users many commonly used tools, utilities, and compilersHomebrew
: a free and open-source software package management system that simplifies the installation of software.Python 3
: an interpreted, high-level, general-purpose programming language.Directory
: Same as a folder on your computer; a directory can contain many files or subdirectories (folders within themselves)Root
: The outermost main directory of our computer represented by /Path
: Location on your computer specified by directories. /Desktop/photos/cats.pdf
is an example of a path.CLI
: The Command Line Interface is the text-based user interface used to view and manage computer files.
GUI
: The Graphic User Interface is the visual alternative of the CLI, it is what we have been using to navigate our computers so far.Unix refers to the parent operating system upon which Mac is built on and Linux is inspired by.
~
(tilde) which denotes your home directory
.Navigation Commands
ls
: lists all files and subdirectories in the current directory.cd [path]
: changes the current directory to the directory specified by the path argument.pwd
: The present working directory command lists the path from your current location starting from root.clear
: Clears your terminal.Directory Shortcuts
cd ..
or cd
by itself to quickly naviagte to your previous directory.Javascript is the language of the internet!
Google Chrome
& Node
.Node
is a very powerful runtime environment built on Google Chrome’s Javascript V8 Engine.Runtime Environment
: A runtime system that is used to implement portions of an execution model.Node REPL vs. Javascript File
Node REPL
.js file
Using the Node REPL
To enter the Node REPL simply type node
into your terminal, you will be greeted with a >
character - here you can type any JS code, and even define functions! (Just keep in mind these will not be saved)
. exit
or ctrl + c.Using Javascript Files
mkdir <folder name>
.touch <file name.js>
.node <file name>
.VCSode is an IDE (Interactive Developer Environment
).
Please keep in mind that keeping an organized file system will save you a lot of trouble in the future!
VSCode Shortcuts