Basic Commands

Please note that any text in angle brackets <> is a placeholder for an actual value, you shouldn't type it in literally (or include the angle brackets).

Windows

  • cd <directory name> change directory. moves you into the specified directory. You can chain subdirectories to traverse deeper. You can get to your "Home" directory from anywhere by typing cd %HOME%

    • If you type cd with no directory specified it will print your current location to the terminal

  • ls list. Lists the contents of the current directory.

    • ls -a lists all the items in the current directory including hidden items

  • mkdir <name> makes a new directory with the specified name.

  • touch <name> will create a new file with the specified name.

  • rm -r <file or dir> will delete the specified file or directory

Mac

  • cd <directory name>; change directory. moves you into the specified directory. You can chain subdirectories to traverse deeper.

    • If you type cd with no directory specified it will return you to your home directory

  • pwd prints the full path to your current location in the command line

  • ls; list. Lists the contents of the current directory.

    • ls -a lists all the items in the current directory including hidden items
  • mkdir <name>; make dir. Makes a new directory with the specified name.

  • touch <name> will create a new file with the specified name.

  • rm -r <file or dir> will delete the specified file or directory

Application Commands

  • code . opens VS Code from the current location

    • just typing code will resume your last VS Code session.

  • node <file name> runs the specified file in a node environment then exits when complete.

    • node with no specifications will open a node environment in your terminal

  • git will open the Git help menu in the terminal see the Git reference section for more specific info on using Git in the command line