A) sudo su
The "sudo su" command is used to gain privileges and switch to the root user. You are then prompted to input your password, thereafter you are in.
B) apt update
This command ensures that your system has the latest information about available software updates before performing any package installations or upgrades.
C) apt install <name of application>
This command is used to install a specific application or software package. You would replace "<name of application>" with the actual name of the application or package you want to install.
D) mkdir <name of directory>
The "mkdir" command is used to create a new directory (folder) within a file system
E) cd <name of directory>
The "cd <name of directory>" command is used to change the current working directory to a specific directory or to enter a directory
F) touch <name of folder(s)>
The "touch" command is used to create an empty file. It does not create folders or directories. If you want to create an empty file, you would use the "touch" command followed by the name of the file.
G) ls
The "ls" command is used to list the contents of a directory
H) sudo rm <name of file>
a) The rm command is used to delete a file or directory and its contents recursively.
b) The "sudo" prefix is used to execute the command with root privileges, granting the necessary permissions to remove system files or directories.
c) Deleting files and their contents is permanent and can result in data loss if not done carefully.
d) To confirm deletion of our file named file3.txt input the command "ls".
e) We can see that we only have file 1 and file 2 left in our folder
I) To Move a file from one directory to another directory
Follow the steps below;
a)create the second directory with the same command
mkdir <name of 2nd directory>
mv <name of file><name of destination folder>/
b) To move a file to a destination folder using the "mv" command, you need to specify both the name of the file and the name of the destination folder.
c) To see if truly our file has moved from cloud1 to cloud2
d) Check the 2nd directory by first ensuring you are within it.
e) Input the command
cd <name of directory>
f) To see the file input the command "ls" and enter.
g) You can see your file has been moved from the first directory to the second one.
J) pwd
The "pwd" command stands for "print working directory."This command is useful when you want to confirm your current location within the file system.
K) cd ..
a)The "cd .." command is used to change the current working directory to the parent directory.
b) After inputting this command, I was able to return to the first directory named "cloud1"
c) To see if truly I have returned to the first directory, I can input the pwd command.
L) sudo apt install vim
a)This command is used to install the Vim text editor using the apt package manager with sudo
b) You will be prompted if you want to continue. input "y"
c) vim has been installed
M) vim <name of file>
a) Go ahead and input the command vim <name of file> to edit your text file
b) Once the blank space has opened, click on the letter "I" on your desktop to enable you to type or insert your texts in the space.
0):wq
To exit the text space,
a) press the ESC button on your desktop
b) press the space button on your desktop
c) input the ":wq" command.
This command is used within the Vim text editor to save changes to a file and exit the editor.
Having inputted the :wq command above, the text file page will close.
P) cat <name of file>
a)To view the content of your text file, input the command cat <name of file>
b) From the capture below, we can see that we can view what we typed in our text file.
Q) exit
When you execute the "exit" command, it will terminate the current session and return you to the root environment.
R) clear
a)The "clear" command clears the visible terminal contents, allowing you to start with a fresh and empty screen.
b) We can see our terninal has been cleared
S) history
The "history" command displays a list of previously executed commands within your session.