Terminal Commands Quick Start for Ubuntu 16.04
You are Welcome! The Tutorial Shows You Step-by-step How to Getting-Started with the Bash Commands on Ubuntu 16.04 Xenial Xerus GNU/Linux.
First, this is Just a ‘Quick and Dirty’ Introduction to the Command Line Basics by Example on the Console/Terminal Bash Shell emulator.
Most noteworthy: this Tutorial is Step-by-Step and You Can Just Getting-Started Following and Executing each Command without any Harm for Your System :)
Furthermore, take into account how only the ‘Practice Makes the Master‘; so ‘Take it Easy!‘ ;)
Finally, most Commands should Works also on the others Linux Shells like: Bourne, C, TC and Korn.

-
Launching Ubuntu Terminal
Press: Ctrl+Alt+t
Or: Cmd/Win and Search ‘terminal’
Press “Enter” to Execute Commands on Console -
To List a Directory’s Contents
(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
-
To Change Directory
cd /[path]
But to Go into the Home Directory simply:
cd
-
To Make Directories and Files
To Create a Directory do:
mkdir /[path]/myDirectory
For Instance:
mkdir $HOME/livingroom
To Create a Blank File do:
touch /[path]/myFile
For Instance:
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’ ;)
-
-
To Copy Directories and Files
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/livingroom/box $HOME/bedroom/
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/livingroom $HOME/hello
-
To Move Directories and Files
Moving a Single File:
mv /[path]/myFile1 /[path]/toTargetDirectory/myEventualNewFileName
To Move Multiple Files:
mv /[path]/myFile1 ... /[path]/myFileN /[path]/toTargetDirectory/
And the Same Command is Valid Also for Directories!
Now for Instance to Move a Single File do:mv $HOME/livingroom/test $HOME/hello/hello
-
To Delete Directories and Files
To Delete a File do:
rm /[path]/myFile
For Instance:
rm $HOME/livingroom/test
And to Remove a Directory do:
rm -rf /[path]/myDirectory
So for Example:
rm -rf $HOME/livingroom
-
How to Get the Admin Super-Powers
To Login as SuperUser:
sudo su
If Got “User is Not in Sudoers file” then see: How to Enable sudo
Then to Logout:exit
(To Protect Your System from the potential 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:sudo su -c 'myCommand'
Or:
sudo myCommand
-
How to Set Permissions on Ubuntu File System
Here is achieved the ‘Quick&Dirty’ Initiation to the Ubuntu Command Line Sphere :)
I’ll be Back Very Soon to Show the Basics of the Apt Software Packages and Repository Administration Commands!
Tags: Bash, bash commands, bash commands ubuntu 16.04, bash quickstart, basic linux commands, command line quickstart, console quickstart, Getting Started, Guide, How-to, Linux, linux terminal, Linux Tutorial, Linux Ubuntu, linux Ubuntu command line, linux Ubuntu console, linux Ubuntu terminal, Quick Start, shell quickstart, terminal commands, terminal commands ubuntu 16.04, Tutorial, ubuntu bash commands, ubuntu bash commands quickstart, ubuntu command line quickstart, Ubuntu console quickstart, Ubuntu shell quickstart, ubuntu terminal commands, ubuntu terminal commands quickstart