A brief overview of how to perform tasks associated with the command line that would serve as a useful tool for beginner software programmers. The most common operating systems (OS) used in the world are MacOS, Windows and Linux. Each OS has its own native command line application. The command line is that little window that pops up with the black background from time-to-time (assuming you’re a Windows user). The MacOS and Linux operating systems have similar command line applications where Windows is unique from either of the former.
These differences mean that there are certain commands you can type into one command line that work, while typing the same thing into another command line would not work. This is because of how the very OS was built. MacOS and Linux both share a UNIX-compliant operating system, whereas Windows is a set of proprietary operating systems that are completely separate from UNIX, even though, functionally, they serve the same purpose. This document will discuss UNIX-compliant systems and assumes you have Visual Studio Code installed.
The command line is a text representation of your entire operating system.
If you open your file manager application on your desktop, you can freely click into different folders to navigate your file system. As an added bonus, you can create, edit, or delete various files and folders at will.
This application is a graphic user interface (GUI) built on top of your operating system that gives you a more user-friendly way of interacting with your computer. The command line is a “type-y” way of interacting with your computer in the same fashion.
For example, here are some of the most common commands most people use. To use any of these, you type the name of the command, then provide options **and/or arguments.
Please Note:
cd <dir> - changes directory from current to
mkdir <dirname> - make a new directory with a given name
ls - list the contents of the current directory
touch <filename.extension> - creates and saves an empty file
rm -f <filename.extension> - forcibly deletes the given file
rm -rf <dirname> - forcibly deletes the given directory
mv <pathtofile> <newpath> - moves file, also used to rename
nano <filename.extension> - edit a text based file in command line