Emmanuel Essien
Posted on November 14, 2024
What Is Linux?
Linux is a computer operating system, it is used to run, study, modify, and redistribute the source code, or even sell copies of their modified code. In fact, one of the most popular platforms on the planet, Android, is powered by the linux operating system.
The Following are the steps to use some Linux commands using an Ubuntu Operating System.
- Launch the VMware Workstation from your desktop.
- You click on create a Virtual Mahine, Use the Custom Option
- The next page is the VM Hardware Capability, so u select the one best suitable for your use. After that u hit next.
- You will be directed to the Guest Operating System Installation select the option "I WILL INSTALL THE OPERATING SYSTEM LATER" then click NEXT.
- The next page will be "SELECT GUEST OPERATING SYSTEM" this is the operating system that u want to be installed on the virtual machine. By default, it will be "MICROSOFT WINDOWS" for users of Windows OS. Pls do well to change to LINUX Operating System as you will get the version under to be Ubuntu then u click next.
- This Shows Us the number of processors we want to assign to the virtual machine as u wish
- The next page tells us the memory we want to specify in the virtual machine depending on your workload
- Leave the following next settings at the default till u get the SELECT A DISK PAGE here you can customize your disk size. The recommended size for Ubuntu is 20GB you can add additional 5GB to it or as much as u want but it should not be below 20GB press next then finish.
- You get to the final page then you hit finish...
- You Lunch the VM.
- You click the Ubuntu Start Button on the Lower Left, the browse throuh till you get to the terminal option and then you select.
WORKING WITH ROOT
- To Use Root the command Is sudo su in your linux terminal or shell. This command will put you in a root environment. The SU command is used to run a function as a difrent user. It is the easiest way to switch or change to the administrative account in the current logged in session.
Navigating The File System
- This command pwd tells us the file directory path you currently are in type pwd in your terminal or shell.
- The Next command is ls command ls means list. This command lists directory.
By default, Ubuntu provides a list of directory as highlighted in the picture.
- ls -l in your terminal or shell. This command list directory files and contents with detailed information.
r means read
w means write
x means execute
xr group
- The next command is CD this command means change directory or to enter into a directory for example to change our directory to MUSIC DIRECTORY
To go back to the previous directory type Cd
Same command applies if you want to enter any directory(pictures,downloads,public etc.)
- Exit command takes you back to the Ubuntu Directory then you enter the sudo su command to enter root
File And Directory Operations
- touch (name of textfile) this command create a new, empty file in your terminal or shell(this is our text file). For example i created an empty file named Odogwuexchange
- mkdir Command this creates a new directory example: mkdir (name of directory)
To enter into a directory we use the cd command that is cd name of directory
PLS NOTE CD TAKES TO A PREVIOUS DIRECTORY
- cp command this copies files or directories, that is cp (file name) (destination)
- cat Command this command display the content of a file NOTE: To type something inside the text file we use a text editor, by default VIM is ubuntu text editor. We are going to update the system being a first time user the command is apt update then you install VIM first if you have not already done so the command is: apt install vim
After the Update then u install the VIM using the code apt install vim
Then After the installation we can now use the CAT command but first we need to type a document inside the text file since we have installed VIM text editor. To do this we need to type: vim (name of the Document you created using TOUCH command)
Before typing on the text document page, you first press I which means insert then you can proceed to typing.**
- SHIFT AND COLUMN COMMAND After you are done typing we have to save it. To do this we press the ESC button on your keyboard. After this we press shift and column: at the same time,you will get the column key below the page as indicated below.
- wq command After this we hit W which means to save the text document hitting Q will take us out of the text document as shown below It will save and take you back to the directory
- Now we can use the CAT Command to view what we have in our text document without opening the text editor. All we need to do is type cat (name of the text document) as shown below
- RM command, this command will help you to delete a file by using rm (filename) in the picture I created multiple text files and I am going to list them using LS command, then I am going to use the RM command to delete
- rmdir (directory) command this lets the user to remove an empty directory. Type rmdir (name of directory) in the picture below notice how i created two directories(john, glory) and I used the rmdir command to delete the directory
- Less(filename) command: This allow users to view contents of a textfile one screen at a time and then Q takes you back as shown below.
- To view all the commands done on the terminal you type history
This are the few Basic Linux Command.
Posted on November 14, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.