Some Useful Linux Commands

Command What it stands for What it does To check your work
pwd print working directory displays the name of your current directory
ls -l list (long form) displays contents of your current directory
ls -ld list (long form, directory) displays information about your current directory
mkdir dirName make directory creates a new directory dirName ls -l
cd dirName change directory moves you to directory dirName pwd
cp sourceFile targetFile copy makes a copy of sourceFile, called targetFile ls -l
mv sourceFile targetFile move renames sourceFile to targetFile ls -l
g++ sourceFile.cpp -o targetExec
GNU C++ compiler translates a C++ program defined in sourceFile.cpp into an executable program targetExec ls -l
./targetExec Execute program Executes the program in your current directory named targetExec
(This avoids confusion with installed programs)

chmod XXX fileName change mode

John Stratton (strattja@whitman.edu) with thanks to Janet Davis and Marge M. Coahran

Created January 17, 2017
Last revised January 17, 2018, 08:59:17 AM PST
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.