Windows Command Prompt vs Linux Terminal

The Command Prompt on Windows computers can be used in much the same way as a Linux terminal. When you first launch a Command Prompt window on a Windows computer, it looks like any other terminal window. But, the underlying operating system is different and therefore the commands and file locations and command syntax is sometimes (often) different.

WindowsLinuxDescription
dirlslist the files in the current directory
cpcpcopies first file to the second file name
delrmremoves (deletes) the named file
renmvmoves (renames) a file

To specify a drive letter in Windows, use letter followed by a colon:

C:

To specify a drive letter in linux, use slash to get to root directory and then the drive letter:

/u/

The delimeter used in file path names is different. Use a forward slash / in Linux and a backward slash \ in Windows. There are more differences, but you get the idea. Once you get used to it, it is not a big deal.

Set the prompt (Win users)

You can change the prompt that is shown in your Command Prompt window. The default prompt includes the path and the greater than symbol as shown here for user deppeler.

C:\Users\deppeler

The path is good to include as it is easy to forget where you are in your file system. Other things you can also include, are the current date, time, Windos version number. To set the prompt for the current session:

set PROMPT $d$t$p$g

To return to the default prompt:

set PROMPT $p$g

To set the prompt for future command prompt sessions:

setx PROMPT "$t $p$g"

Note: You will have to close and relaunch the Command Prompt window to see the new prompt.