Lesson 8-2
Useful to know Commands
There are some commands that you will use more than others. This page is meant to showcase those in depth and explain what they do and how they work. The rest of the commands (as far as I know) will be listed in 8-3.
Command | Definition |
---|---|
$ls | Lists files and directories at current location in hard drive. |
$mkdir | Creates a directory |
$cd | Change to a new directory. Followed by location name (e.g. $cd Desktop/) |
$clear | Clear the console / shell screen |
$cat | View contents of a file.Followed by file name (e.g. $cat helloWorld.js/) |
$nano | Edit contents of a file.Followed by file name (e.g. $cat helloWorld.js/) |
$pwd | PWD = Present Working Directory; shows where in the hard drive the shell is currently located. |
$git pull | Command used to update local repository with github.com version. |
$git commit | Command used to stage new changes made to files. |
$git push | Command used to upload new changes to the GitHub Cloud. |
For a beginner, these commands are all that you really need to know. On the next page, I will provide a cheatsheet for you with more commands, and even more ways to use the aforementioned commands.