touch |filename| : create a new filename
pwd : show current path working directory
mkdir |directoryfilename|: create new directoryfilenamefolder
cd |directoryfilename| : change to the directoryfilename

cat > |filename| : create and insert text into the new filename
ctrl-d : exit from file
cat |filename|: show the content of the filename
cat < |filename|: take the content from the filenameand show it on the screen
cat |filename1||filename2|> |filename3|: merge the contents of filename1and filename2into filename3
cat >> $|variable|: append the user input into the variable

cp |filename1||directoryfilename|/ |filename2|: copy filename1into directoryfilenamewith the new name as filename2, did not replace or delete the filenaname1unlike the mv command

clear : clear the linux terminal
ctrl-l : clear the linux terminal

ln |filename1||filename2|: create hard link for filename1with filename2, if either one of the contents inside the file changed, both contents will change, nothing will effect if either file deleted from the system

ln -s |filename1||filename2|: create soft link, reference or pointer between filename1and filename2, if filename1deleted, the filename2cannot be open since it depends, addressed, pointed to the filename1

ls |directoryfilename|: list and show what is within directoryfilename
ls : list and show what is within current path working directory
ls -l : long listing what is within current path working directory with number of memory blocks occupied by all the files and folders combined together, and also show the permission for each files.
ls -l |filename|: long listing for filenameand the number of memory blocks occupied by all the files and folders combined together, and also show the permission for each files.
ls -lh : long listing what is within current path working directory with number of memory blocks occupied by all the files and folders combined together, and also show the permission for each files in human readable format
ls -lh |filename|: long listing for filenameand number of memory blocks occupied by all the files and folders combined together, and also show the permission for each files in human readable format
ls -s : show the size for the current directory
ls -s * : show the size for the current directory and all its contents
ls -sh : show the size for the current directory in human readable format
ls -sh * : show the size for the current directory and all its contents in human readable format
ls -s |filename|: show the size for filename
ls -sh : show the size for filename in human readable format

du : show the directories
du -s : show the size of all directories
du * : show all the directories within
du -s * : show the size of all directories
du -sh : show the size of all directories in human readable format
du -sh * : show the size of all the directories within in human readable format

* a block is basically a unit of memory that is used for memory organization by UNIX/Linux operating system

ctrl-h : show hidden files
ls -a : list and show all the files included the hidden (starting from .) hidden files

free : show all information of the system memory
free -h : show all information of the system memory to be readable by human
watch free -h : show all information of system memory in real time

hostname : show the host name

apt-get install |modulename| : get the modulename and install it into the system

chmod |permissionnumber||filename|-R : change the permission mode for the filenamerecursively
chmod |permissionnumber||directoryfilename|-R : change the permission mode for the directoryfilenamerecursively including all its subfolders
chmod |permissionnumber||directoryfilename|-r : change the permission mode for the directoryfilenamerecursively under the directoryfilenamebut not all of its subfolders

uncompress |filename.Z| : uncompress the filename.Z into filename with its original size and contents

echo * : show all the files in the current working path
echo |string|* : show all the files that start with the string
echo *|string|: show all the files that end with the string
echo [[:upper]] : show all the files that start with uppercase letter
echo ~ : show the current user
echo $(|mathoperation|) : show the result of current mathoperation, answer will ignore the floating point

sh |filename.sh| : execute filename.sh shell script

set |input|: set positional parameters for input
echo $|number|: show the positional parameters of certain input
echo $* : show all positional parameters of the input
echo $# : count the number of command line arguments

expr |mathematicalexpression|: calculate the mathematicalexpression
echo expr |mathematicalexpression| : show the result of mathematicalexpressioncalculation

echo ‘echo |arithmetic|| bc’ : show the result of arithmeticcalculation in floating point arithmetic format

tput lines : show current number position of columns on Linux terminal
tput rows : show current number position of rows on Linux terminal
tput cup |number1||number2| : put the cursor on the columns number1 and rows number2 on Linux terminal

echo $? : will output 0 if the command executed is successful, will output 1 if the command executed is unsuccessful
read |input|: read the input

-lt |number| : less the number-gt |number| : greater than number-eq |number| : equals the number-le |number| : less and equals to number-ge |number| : greater and equals to number-ne |number| : not equals to number

if [ `echo $|variable| | wc -c` logicaloperationnumber ] : word counts the characters in the variableto match the logicaloperationand the number

*Linux also count end of line as a character

if [ $|variable| = |character1| -o $|variable||character2| ] : check if the variable is equal to character1or proceed to check if the variable is equal to character2

case $|variable| in : check user case statement in the variable

[a-z]) : check user case statement whether it is from a to z lowercase character
[A-Z]) : check user case statement whether it is from A to Z uppercase character
[0-9]) : check user case statement whether it is from 0 to 9 character
?) : check user case statement whether it is a special case symbol
*) : check user case statement whether it is more than one character
[aeiou]* | [AEIOU]* : check user case statement whether it starts from a vowel

;; : break from the user case
esac : exit from user case statement

while [ $|variable||logicaloperator||number| ] : do while statement for the variablethat fit with the logicaloperation based on numberand logicaloperator
until [ $|variable||logicaloperator||number| ] : do until statement for the variablethat fit with the logical operation based on numberand logicaloperator

for item in * : search all files in Linux current path working directory

do : enter the loop statement
done : exit from the loop statement
then : execute the following statement

for item in * : search all files in Linux current path directory

grep |text||textfile| : search the textin textfile

-i : case insensitive
-n : show the line number
-c : count

-v |text||textfile| : show the line in textfilethat do not match the text

grep ^’|text|‘ |textfile| : show textthat is at the start of the lines in the textfile
grep ‘|text|‘^ |textfile| : show textthat is at the end of the lines in the textfile
grep $’|text|‘ |textfile| : search word that starts with the textin the textfile
grep $’|text|‘ |textfile| : search word that ends with the textin the textfile

grep ‘th..’ |textfile| : search for word that have th and any two more other characters on it in the textfile

grep ‘[0-9]\{|number1|,|number2|}’ |textfile| : search for number 0 till number 9 for the number1and number2digit in the textfile