Easy steps to use Online Linux Terminal!!

Easy steps to use Online Linux Terminal!!

This article is for all those windows users who want to work on Linux terminal but are in fear of crashing their laptops by creating a virtual machine(VM) and installing Linux!! I understand you guys. I was in the same position when I was asked to work on Linux terminal as a part of my university syllabus and I feared that installing Ubuntu using a VM would just destroy my laptop!!

Then I found out the online Linux terminal - CoCalc and it served the purpose of my studies very easily. In this blog, I will give you a detailed version of the steps as to how create a file, save it and view it in the online terminal with all the necessary commands!!

Opening the online terminal!

  • In order to open up this terminal, google online linux shell terminal and the very first search is your required answer..

image.png

  • Next step, click on the Run Terminal Now button and wait for the terminal to complete the loading process.

image.png

Creating a project!

This step is necessary in order to save all your programs in the online terminal.

-Click on create new project.

image.png

  • Enter the project name and hit create project.

image.png

  • Voila, your project is created!!

Creating a file!

  • Now click on create or upload file to start coding.

image.png

  • Give a name to your file and click on linux terminal to get started.

image.png

  • After successful creation, you will see an empty terminal waiting for the commands.

image.png

Commands for text file!

  • vi filename.txt + Enter to create your text file.

image.png

  • Type i to shift the created file to insert mode.

image.png

  • Enter the text to be written in the file.

  • Next press Esc key to get the file out of insert mode. After that use the combination Shift + : then type wq and lastly press enter.

image.png

  • Upon hitting enter , we move out of the created file to the main terminal.

image.png

  • To view the contents of the file, type cat filename.txt and enter.

image.png

Commands for a c++ program file!

  • vi filename.cpp + Enter to create a c++ file.

  • Type i to shift the created file to insert mode.

  • Write the program code. Here, I will take up a simple c++ program to find the factorial of a number.

image.png

  • Next press Esc key to get the file out of insert mode. After that use the combination Shift + : then type wq and lastly press enter.

  • Upon hitting enter , we move out of the created file to the main terminal.

image.png

  • Now, we type g++ filename.cpp to compile our program. If the program has some errors, they will be displayed on the same screen else we can move on to give the run command.

image.png

  • We give the ./a.out command to run the compiled program.

image.png

This is how we create, run and save the files in an online terminal. Now, you might be wondering whether this project will be available the next time you open the terminal or not??

Let's find out!

  • Open the terminal as stated earlier to find your project listed on the terminal screen.

image.png

  • after opening your project, you will find all your files listed according to the time and date they were created.

image.png

So, this is how one can use the online shell terminal as an alternative to the downloaded Linux operating system effectively!! Hope you find this blog helpful and if you do, then give it a like to come back for some more useful articles!!