command line change directory code example

Example 1: how to move to directories in command prompt

cd Desktop/myDirectory

Example 2: how to change drive in command prompt windows 10

if you wanted to change the drive from "C:" to "D:", you should type "d:"

Example 3: change directory cmd

cd  
comment to change directory in the cmd

Example 4: terminal change directory

// change directory in terminal
cd folder_name/subfolder_name

// go up one directory level
cd ..

// back to previous directory
cd -

// return to home directory
cd