Here is the video version, if you prefer it:
Here are all of the commands we have learned:
- The general command format is:
command -options arguments
- Commands are case sensitive
cd directory
to change the directory you are located in (current directory)pwd
to print the absolute path to the directory you are inman command
gives you the man pages of the command- Options can be both short (
-
) and long (--
) - Use
-h
or--help
to see a quick description of command usage ls
command lists directory contentscp src dest
copies from source (src
) to destination (dest
)mv old new
renames file with filenameold
to filenamenew
rm item
is used to delete theitem
;rm -r folder
to delete thefolder
touch filename
to create a new file with namefilename
mkdir dirname
to create a new directory with namedirname
rmdir dirname
to remove a directory with the namedirname
(the directory has to be empty)echo message
to print out themessage
cat filename
to print out the contents of thefilename
less filename
to page through the contents of thefilename
head
andtail
for viewing only the first or the last portion of a filesudo command
to execute thecommand
as the superusersu
to switch user (without an argument switches to the superuser)grep pattern file
for pattern matching in fileswc file
to count the number of words (and other stuff) in afile
– haven’t used it as much
Hope this refreshed your memory!
NewsletterUpdates on interesting things I am doing
Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.