Mageia Linux Terminal Tutorial for Beginners

March 20th, 2018 by thelinuxevangelist

Mageia Linux Terminal Tutorial for Beginners

You are Welcome! The Tutorial Presents You a Step-by-Step Mageia Linux Terminal Tutorial for Beginners.

And with this Mageia Linux Command Line Tutorial for Beginners You Can Get Easily Initiated to Make the First Steps on the Linux Shell :)

Furthermore, this is Just a ‘Quick and Dirty’ Introduction to the Command Line Basics by Example for the Bash Shell.

Now I Recommend you to ‘Take it Easy‘ and keep on experimenting because only ‘Practice Makes the Master‘ ;)

Most noteworthy: it’s fundamental you ‘Get Your Hands Dirty‘ following along this guide and Execute the Commands as they are harmless for your System.

Especially Relevant is how we’ll Get also some Fun in Discovering togheter some Magical Naming Powers of the Linux Command Line.

Finally, the Commands here included are valid for the Default Linux Bash Shell and also for the Bourne, C, TC and Korn Shells…

Mageia Linux Terminal Tutorial for Beginners Quick Start - Featured
  1. Open a Terminal Shell emulator window
    (Press “Enter” to Execute Commands)

    Mageia Linux Terminal Tutorial for Beginners Quick Start - Open Terminal



  2. Most noteworthy: the Main Linux Shell Commands are simple Abbreviations of the Corresponding World.

  3. Now try to List the Directory’s Contents
    To List the Directory you are in execute:

    ls .

    The ‘.’ is meaning This location.
    * And see ‘ls‘ as an Abbreviation of ‘listing‘ *
    The Output on a New Terminal window should be very similar to this:

    Desktop/    Downloads/  Pictures/   tmp/
    Documents/  Music/      Templates/  Videos/
    

    Here the Entities with a Trailing Slash are Directories.
    Again execute to List the Downloads Folder on your Home:

    ls ~/Downloads

    Or also:

    ls $HOME/Downloads

    Next to List the Main System’s Root Directory:
    (The Root of What? Of the System’s Directory Tree.)

    ls /

    Furthermore to List the usr Directory:

    ls /usr

    Finally to List the Nested bin Directory into the usr one:

    ls /usr/bin



  4. Next practice the Change Directory directive
    Change to the Root Directory:

    cd /

    * Again find out how ‘cd‘ is an Abridgement of ‘changing directory‘ *
    Then Go to /usr/bin:

    cd /usr/bin

    Now to Navigate to the Parent Use the ‘..‘!
    So Back to the root with:

    cd ../..

    (It’s like to say: ‘One Step Back and then One Step Back’ again)
    Finally to Return Home is simple as:

    cd  

    Hey Congratulations! You achieved the First Walk into the Linux Directory Tree :)

  5. Furthermore about Linux Terminology, there are 3 different Entities Appelled as ‘Root’:

    • The System’s root: /
    • The root Directory: /root
    • The root User: the SuperAdmin than can Execute Any Command
  6. Again experiment yours Creative powers
    Making a test Directory like:

    mkdir $HOME/livingroom

    * See how ‘mkdir‘ is an Abbreviation of ‘making directory‘ *

    How you should have already understood, $HOME and ‘~‘ are both synonymous of your’s Home Folder.
    And the Home Directory is where your’s User Contents are Stored by Default.

    Moreover, to enhance your Memorization and Fun I rightly Use some Metaphoric term. So here you can Immagine a directory like a Room into your Home :)

    Try Making Multiple Directories at once with:

    mkdir $HOME/bedroom $HOME/bathroom $HOME/garden

    Finally use the ‘touch‘ Command to Make a New Empty File:

    touch $HOME/livingroom/box

    And how you could already have perceived I Make Use Here of the following Mnemonic Linking:

    • Directory -> Spatial Entity
    • File -> Thing

    And so in the Previous Command to an ‘Empty File’ corresponds an ‘Empty Thing’ like a ‘box’ ;)




  7. Experiment How to Copy Directories and Files

    • To Copy a Single File:
      * As in the other cases here ‘cp‘ is the Abbreviation for ‘copying‘ *

      cp $HOME/livingroom/box $HOME/bedroom/

      You see how in this Example we moved our ‘box’ from the ‘livingroom’ to the ‘bedroom’ :)

      Now verify the correctness of the operation Listing your’s bedroom contents:

      ls $HOME/bedroom/

      And the Output will exactly display as:

      box
    • Now for Instance to Copy a Single Directory inside to another do:
      cp -r $HOME/livingroom $HOME/garden

      List the ‘garden’ contents:

      ls $HOME/garden

      And you’ll Find:

      livingroom

      Now you have also a ‘livingroom’ copy into your ‘garden’ O:

      Moreover to Copy-Duplicate-Rename a Directory:

      First to be sure you are again into the $HOME area:

      cd 

      And then Make a newly duplicated room do:

      cp -r ./livingroom ./room

      Finally, to Copy-Displace-Rename at the same time:

      cp -r $HOME/livingroom $HOME/bedroom/wardrobe

      But this is Magically Crazy, we have trasformed our ‘livingroom’ into a ‘wardrobe’ inside to the ‘bedroom’ :))

  8. Next Experiments the Dynamics of Files and Directories
    And in this Moving dimension Files or Directories are taken as the Same.
    * Again you find here the ‘mv‘ Command as a Contraction of ‘moving‘ *
    So now for instance Make and Empty ‘bottle’:

    touch ~/livingroom/bottle

    And then we Displace it in another Room:

    mv ~/livingroom/bottle ~/bedroom/

    Then verify Listing the ‘bedroom’ contents:

    ls ~/bedroom/

    And what you Find? The:

    bottle

    Also if only an empty one, sorry :))

    Again you can Move & Rename at the same time like:

    mv ~/bedroom/bottle ~/bathroom/can

    Here we have magically trasformed an empty ‘bottle’ inside the ‘bedroom’ in an empty ‘can’ inside to the ‘bathroom’.
    And as I said in the introduction the Command for Directories works the Same!
    So now ‘Like Alice in the Wonderland’ we Move the Directory ‘livingroom’ we set into the ‘garden’ in a ‘teapot’ in the bedroom!

    mv ~/garden/livingroom ~/bedroom/teapot

    Patiently Verify it with:

    ls ~/bedroom/teapot

    Finding What? An:

     

    Empty Space!

  9. Finally we try investigating our Magical Destroying Powers
    Deleting Directories and Files!

    Especially Releant: in Normal Activity you should Triple Check the Commands Before Execution
    As in Shell there’s Not a Trash Bin and so the stuff is directly Annihilated!!!

    * As in all other cases also ‘removing‘ is here Abreviated by ‘rm‘ *

    • How Removing Files

      First we Wipe Out the ‘box’ in the ‘livingroom’ with:

      rm $HOME/livingroom/box

      Check it with:

      ls $HOME/livingroom/

      Now we try the same for Multiple Entities
      First we Make a Copy of the ‘can’ into then ‘bathroom’ in a ‘jar’ into the ‘bedroom’, always Magics Here ;) with:

      cp $HOME/bathroom/can $HOME/bedroom/jar

      And then how to Liquidate Both? Simply like that:

      rm $HOME/bathroom/can $HOME/bedroom/jar
    • How Removing Directories

      Now we Start to Hollow our beautiful Home… ((:
      First we Raze the ‘livingroom’:

      rm -rf $HOME/livingroom

      And finally we Desert All the Remaining Spaces:

      rm -rf ~/bathroom ~/bedroom ~/garden

    Sorry, we Transformed our Home into a Blank Space, but What a Fun! :))

  10. Last How-to Get the Admin Super-Powers
    (First of all the root User is the Default one in Kali, so the following instructions are intended for a Normal User)
    So to Check What User you are on:

    whoami

    Then to Login as SuperUser:

    su -

    If Got “User is Not in Sudoers file” then Look: Solution

    Then to Logout:

    exit

    (To Protect Your System from the possible Damages of an Hazardous ‘Crazy’ Command Execution the Logout ‘Should’ be Executed Every Time a Conscious and Meaningful Series of Commands has been Achieved… )
    Finally to Execute a Single Command as SuperUser:

    su -c 'myCommand'

    Or:

    sudo myCommand
  11. How to Change Permissions on Mageia Linux File System:

    Mageia Linux Change File Permissions
  12. Congratulations You are now fully Initiated to the awesome Linux Mageia Linux Command Line Shell. ;)

Tags: , , , , , , , ,