mkdir – creates a directory.
On the terminal screen, nothing will appear but when you go to the home folder, a new directory (folder) was created called lab1.
cp – copies a file or directory.
In the picture above, a file ‘gm’ is in the home folder. When we type ‘cp gm gm1’, the original file gm is copied and a duplicate is created but it is now named gm1 as shown in the picture below. The contents in ‘gm’ and ‘gm1’ are still the same.
mv – performs file moving or file renaming.
In the picture above, the file ‘gm1’ is in the home folder. When you type ‘mv gm1 Document ‘ in the terminal screen, the file ‘gm1’ is removed from the home folder and is placed in the Documents folder as shown in the picture below.
rm – used to remove files and directories.
In the picture above, the file ‘gm’ is in the home folder. After typing “rm gm’ on the terminal screen, the file ‘gm’ is removed as shown in the picture below.
help – display information about a command.
When you type ‘help cd’ on the terminal screen, a list of information will be displayed on the screen about the command ‘cd’.
man – displays the manual of a command.
When you type ‘man bash’ on the terminal screen, the manual for the command ‘bash’ will appear on the terminal screen.
whatis – displays the name and a one-line description of a man page matching a specified keyword.
alias – to create your own composite commands.
On the terminal screen, when you type ” alias food=’ls’ “,you assign the command ‘ls’ to the word food. Then, when you type the word food in the terminal screen, the program will run the word food as the command ‘ls’ and it will display the files and sub-directories in the current working directory.