Shell Command-Line/Console/Terminal Quick-Start for Debian 7 Wheezy Easy Guide

October 17th, 2014 by thelinuxevangelist

Getting-Started with Command Line on Debian Linux




The Linux Tutorial Shows You How-to Quick-Start with the Command Line Console Terminal for Debian 7 Wheezy Linux.

This is Just a ‘Quick and Dirty’ Introduction to the Command Line Basic Instructions on Linux Command Line Console Terminal.

The Tutorial is Step-by-Step and You Can Just Getting-Started Following and Executing each Command without any Harm for Your System :)

After all only ‘Practice Makes the Master‘; so Do Not try to Getting-Started too Hard but Just ‘Take it Easy!‘ ;)

The Commands are Intended for Execution the Default Bash Linux Shell but Most should Works also for the Bourne, C, TC and Korn Shells…

Debian Linux Command Line Console Terminal Quick-Start - Featured
  1. First Open a Command Line Terminal Console Window
    Cmd/Win & Search for “term”
    (Press “Enter” to Execute Commands)

    Gnome:
    Linux Command Line Console Terminal Quick-Start for Debian - Debian Gnome3 Open Terminal
    KDE:
    Debian 7 Wheezy Command Line Quick-Start - Debian KDE Open Terminal
    Lxde:
    Getting-Started with Command Line Console on Debian Wheezy 7 - Debian Lxde Open Terminal
    Xfce:
    Getting-Started Command Line Terminal for Debian Linux 7 Wheezy - Debian Xfce Open Terminal

    Or Login into Server Shell…

  2. To List a Directory Content (Directories and Files included)

    ls /[path]

    For Example to List the Content of the Root Directory:

    ls /

    Or to List the Content of the Home Directory:

    ls $HOME
  3. Next practice the Change of Directory
    Change to the root:

    cd /

    * Again find out how ‘cd’ is an Abridgement of ‘change directory’ *
    Then Go to the /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 simply use:

    cd  

    Heil you achieved the First Walk into the Linux Directory Tree :)

  4. Again experiment the Creative powers
    With a test Directory like:

    mkdir $HOME/test

    * Recognize ‘mkdir’ as a ‘make directory’ Abridgment *
    ($HOME and ‘~’ are both meaning your’s Home Folder)
    Furthermore touch a New File with:

    touch $HOME/test/test
  5. To Copy Directories and Files
    Especially relevant: See below How to Use ‘sudo‘ to Put Stuff into Destinations you are Not Allowed!

    To Copy a Single File:

    cp /[path1]/myFile1 /[path2]/

    Or also Setting a New File’s Name at the same time:

    cp /[path1]/myFile1 /[path2]/myFile2

    And to Copy Multiple Files at once:

    cp /[path]/myFile1 ... /[pathN]/myFileN \
    /[pathX]/

    (After a ‘\’ Backslash the Command is Not Executed but follows in the Next Line)

    For Instance to Copy a Single File:

    cp $HOME/test/test $HOME/test/hello 

    Then to Copy a Single Directory with all its Contents:

    cp -r /[path1]/myDir1 /[path2]/

    Or Setting a New Name:

    cp -r /[path1]/myDir1 /[path2]/myDir2

    Again to Copy Multiple Directories:

    cp -r /[path1]/myDir1 ... /[path]/myDirN \
    /[path2]/

    Now for Instance to Copy a Single Directory do:

    cp -r $HOME/test $HOME/hello
  6. Next to Move Files and Directories

    Moving a Single File:

    mv /[path1]/myFile1 /[path2]/

    Or into a New one:

    mv /[path1]/myFile1 /[path2]/myFile2

    So to Move Multiple Files:

    mv /[path1]/myFile1 ... /[pathN]/myFileN \
    /[pathX]/

    And the Same Command is Valid Also for Directories!

    Now for Instance to Move a Single File do:

    mv $HOME/test/test $HOME/hello/hello
  7. To Delete Directories and Files

    To Delete a File do:

    rm /[path]/myFile

    For Instance:

    rm $HOME/test/test

    And to Remove a Directory do:

    rm -rf /[path]/myDirectory

    So for Example:

    rm -rf $HOME/test
  8. Last How-to Get the Admin Super-Powers

    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
  9. How-to Set Permissions on Debian File System:

    Debian Permissions Quick-Start
  10. Here is achieved the ‘Quick&Dirty’ Initiation to the Debian Linux Command Line Sphere :)
    I’ll be Back Very Soon to Show the Basics of the Apt Software Packages and Repository Administration Commands!

Tags: , , , , , , , , , , , , ,