Linux Quickstart

What you will learn:

 

Requirement:

You will need a Linux virtual machine (VM).

 

Note:

This tutorial was written for Rocky 8.6, but will work for most other distributions and versions of Linux.

How to Open the Terminal:

The Terminal is the app we use to interact with the computer using text commands.

  1. 1.Starting from your VM’s login screen, login by clicking the username and entering the password: 

       

     

  2. 2.Click on the “Activities” menu button on the top left, this will open a menu: 

      
  3. 3.Click the terminal icon, it looks like this:  
  4. 4.The terminal window will open: 

     

     

 

Run commands in the Terminal:

  1. 1.After clicking inside your terminal window, press the enter key. 

    Notice that you get new text on the left but nothing else happens. 

    This text on the left is called a “prompt”. 

    Example prompt:  
  2. 2.Now try typing some gibberish and press the enter key. 

    The terminal will saycommand not found”. 

     
  3. 3.Make sure there is nothing to the right of your prompt (you can press enter to get a new line) and type “ls”. 

    You should get a listing of files and folders. These are files and folders just like you could see in the graphical file manager. 

     
  4. 4.You can open the “Documents folder by running “cd Documents”: 

     

    Note that the prompt changed to show that you are now in the Documents folder. 

  5. 5.Run “ls”: 

     

    Note that there was no output because the Documents folder is empty. 

     

Open a manual page:

  1. 1.Run the command “man ls”. 

     

    This will open up the manual page for the “ls” command, it will show you a description of what the command does, how to use the command, and many other details. 

     
  2. 2.Try navigating the page by using the arrow keys to go up and down. Use the “q” key to exit. 

 

  1. 3.If we don’t know what command to use, for this we can search the manual pages. Run the command “man -k file”. This will search the manual page descriptions for “file”. 

     

    You should get a lot of output here, these are all manual pages that you could read. Note that they all have the word “file” in the description. (You may have to press “q” to exit this view.) 

                    1.          

                      If you get “nothing appropriate”, when running “man -k file”, run “sudo mandb” to update the manual page database. Enter the password and press enter when prompted, note that it will not show the password on the screen as you type.

                       

     

    Most of the time, if we don’t know how to do something in Linux, we search Google for a tutorial. The reason we use the included manual pages is to make sure we have the correct information for our version of Linux. When a tutorial doesn’t work like we expect it to, we can check the manual pages to make sure we are using the command in the correct way for our version. 

 

 

 

You now know the basics of using the Linux command line!