A short list of some useful commands. Respect the presence, or absence, of spaces in the line.
|pwd||Print Working Directory. This is "where you are" at the moment, the directory (folder) that commands will apply to.||(prompt usually shows current directory)|
|ls||List contents of current directory.||DIR/w|
|ls -F||List contents along with a "flag" that indicates whether each item is a directory, executable, or a symlink ("shortcut"). (The -F option can be combined with other options.)|
|ls -l||List permissions, owner, file size, and last-modified time of contents of current directory. (The -l option can be combined with other options.)||DIR|
|ls -A||List all contents of current directory, including hidden entries (names beginning a "."). (The -A option can be combined with other options.)||DIR/a|
|cd new-dir||Change directory: make new-dir be the current directory.||CHDIR or CD|
|mkdir new-dir||Make directory: create new-dir as a child of the current directory.||MKDIR or MD|
|rmdir victim-dir||Remove (delete) victim-dir. Fails if the directory isn't empty.||RMDIR or RD|
|rm -i victim-file||Remove victim-file. the "-i" option asks for verification (a good idea).||DEL or ERASE|
|cp -isource-file new-file||Copy source-file into new-file. If new-file already exists, it will be replaced. If-i is included, prompt for any replacement first.||COPY or XCOPY|
|mv -isource-file new-file||
Move source-file into new-file.
If new-file already exists, it will be replaced.
If-i is included, prompt for any replacement first.
This command is used to move a file from one directory to another, and/or to rename a file from an old name ("source-file") to a new name ("new-file"). It is basically like the "cp" command, but removes the original file after copying it.
|MOVE and RENAME|
|echo message||Display message on the console.||ECHO|
|cat target-file||Display target-file to the console.||TYPE|
|less target-file||Display target-file, one screenful at a time.||MORE|
|grep pattern target-file||Find occurrences of pattern in target-file, and display the lines that contain that pattern.||FIND|
|diff left-file right-file||Compare left-file and right-file, show differences in an "add-line, delete-line" format.|
|man command||Get basic "manual page" for command. Generally, shows all options and required arguments, and describes them.||HELP|
|bash||Start the "bash" command interpreter. This provides <TAB>-completion, command history, and other features.||CMD (or maybe POWERSHELL?)|
|which target-executable||Find the directory the contains the target-executable program.|
|./exe-file||Run the exe-file executable from the current directory.||(DOS looks in the current directory first.)|
|gcc -Wall -lm -o exe-file source-file||Compile and link source-file to produce exe-file executable. Optionally, include the math library for math functions.|
|Start the python v3.x interpreter, either interactive or executing a source file.||(same, from cmd prompt; or use the GUI "Search" dialog.)|
|Start the system default python interpreter, either interactive or executing a source file. (System default may be v2.x or v3.x)||(same, from cmd prompt; or use the GUI "Search" dialog.)|