Introduction to Linux and Basic Linux Commands for Beginners

preview_player
Показать описание
In this tutorial, we will give you a quick introduction to Linux and Linux commands for aspiring Linux students.

#Linux
Contents of this Course:

1 - Introduction to Linux
2 - Quick Overview of Linux Distributions or Distros, such as Debian or Ubuntu
3 - Using the Linux Terminal
4 - Basic Linux commands for navigation and file manipulation.

We will go over 10 commands in this video, including cd, ls, pwd, cp, rm, mkdir, rmdir, man and more. Stay tuned for more Linux Commands Tutorials for Dummies.

1. YOU DIDN'T SPECIFY WHAT CD MEANS
ANSWER : CD stands for "Change Directory"

so typing
cd Downloads
Means
Change from THE CURRENT DIRECTORY to the DOWNLOADS (Specified) Directory

or
Typing
cd..
Means
go back one directory level (it's like pressing the BACK button in windows)

2. YOU DIDN'T EXPLAIN WHAT HAPPENS WHEN YOU TYPE cd. (with 1 dot)
ANSWER : Nothing.. it doesn't work
but it's a commonly asked question

3. YOU DIDN'T SPECIFY THAT REMOVE COMMAND CAN BE USED AS RM OR RMV
so...
you can type
rm test
or
rm test
it's good to know, but a lot of people will argue that rm is more efficient since you don't
have to type the extra letter (Which is also a reason why it was introduced into the language

4. YOU DIDN'T SPECIFY THAT USING ARROW KEYS CAN REMOVE THE NEED TO KEEP
TYPING COMMANDS IN

Yes kiddies..... YOU DO NOT NEED TO KEEP TYPING THE SAME SHIT IN OVER AND OVER..
if you type something in like

ls
and you come up with Desktop and Downloads and Music etc
then you type in ..
cd Downloads

the
ls (List Command)
and
cd (Change Directory Command) are saved in Memory
so you don't have to type them again

Actually, if you type in

cd Downloads the whole line of command is saved
so.. pressing up or down arrow will get you back to it
so.. you can easily just change a piece of the line to get a new command
and then that line is saved

PRETTY USEFUL HUH..

5. YOU DIDN'T EXPLAIN WHAT HAPPENS WHEN YOU TYPE IN mkdir test folder

ok Kiddies
let's understand this

the mkdir command means (Make Directory)
so if you type in ...

mkdir TEST FOLDER (as one complete word)
it will create a folder with the name TEST FOLDER

HOWEVER
if you do this

mkdir TEST FOLDER (Note the space, Note the 2 Words)
you will have created
1 folder called TEST
and
1 separate folder called FOLDER

CONS : It pisses you off when all you are trying to do is create a folder called
TEST FOLDER

PRO's : well, when you are trying to create , let's say a folder called 2017
and in that folder you want to have 12 folders (one for each month of the year)

you do this

mkdir 2017 (simple)
then
cd 2017 (this gets you into the 2017 folder)
now
mkdir 1 2 3 4 5 6 7 8 9 10 11 12 (press enter and Magic Happens)
(this took me around 8 seconds to type)
in windows to create 12 folders would take a few minutes

or how about naming all the folders

jan feb mar apr may jun jul aug sept oct nov dec hehe
(in windows this is a nightmare, i mean via GUI not CLI,)
this took me around 15 seconds to type

so.. YOU SEE THE BENEFIT

but the problem still arises that we can only use a single word
to name a folder

so. HOW DO I CREATE A DIRECTORY WITH THE NAME "MY SCHOOL PROJECT" ???

well. Linux experts will say do this

mkdir MY_SCHOOL_PROJECT
and this will in fact create a directory called MY_SCHOOL_PROJECT

BUT... THAT PISSES PEOPLE OFF AS WELL

so.. THE SOLUTION IS THIS....

use quotation marks

mkdir "MY SCHOOL PROJECT"
this will in fact create 1 folder called MY SCHOOL PROJECT
so if you do this

mkdir 1 2 3 4 5 (it will create 5 separate folders)
if you do this

mkdir "1 2 3 4 5" (it will create 1 folder called 1 2 3 4 5 )

6. YOU DIDN'T SPECIFY THE DIFFERENCE BETWEEN A FILE AND A DIRECTORY
ANSWER : A directory is a Folder, you can store a file in a folder
you cannot store a folder within a single file
a file can vary depending on it's file type, but you can't store a folder
within it.

7. YOU DIDN'T EXPLAIN WHAT A SWITCH IS AND WHAT A SWITCH IS FOR
ANSWER : in brief
a SWITCH in programming adds extra functionality and parameters and arguments to the instruction so as to be more specific

so the - (minus sign) is the switch
the letter that follows is the argument or the condition

let's take this command

HOWEVER (in windows) it will only give you 4 pings

now if you use the -t switch like this

it will give you an infinite amount of pings

8. YOU DIDN'T SPECIFY WHAT r MEANS using -r

9. YOU DIDN'T SHOW THEM HOW TO USE HELP

Guys along with using the MAN command (Manual)
you can use Help

so you can type in

man rm
or
help rm
see what you get

i think this was a good video for beginners
Рекомендации по теме
visit shbcf.ru