Introduction to Linux and Basic Linux Commands for Beginners

3.89M views2677 WordsCopy TextShare
sakitech
In this tutorial we will give you a quick introduction to linux and linux commands for aspiring linu...
Video Transcript:
hello and welcome to sake Tech in today's video I will give you guys a quick introduction to Linux and I'm gonna show you how to use some very useful introductory Linux commands using a terminal window now just to be clear this is a course for beginners who want to learn how to use commands on a Linux terminal now for those of you guys who are not familiar with Linux at all let's give you a quick perspective Linux is not Unix UNIX was created by a bunch of AT&T employees in 1969 Linux was written by a
name AGGA by a guy named Linus travolt who created the entire thing by himself and released it around 1991 now Linux is a powerful operating system but it is especially designed for server systems and 90% of the world's fastest computers like supercomputers run on some form of Linux and this is because a rock-solid system okay so that was a quick history on Linux that was just to give you a perspective now Linux and UNIX are different just remember that now one more thing before we dive in Linux comes in many different varieties which are called
distros or distributions in this tutorial we will use the popular Ubuntu distribution of Linux but there are others out there as well such as Fedora mint and Debian and more even Android is a Linux distribution so the basic commands we will rerun it we will be running and learning today can be generally used on almost all different Linux distributions alright so let me go ahead and launch Linux and I just wanna let you know I'm running Linux on my Windows so what you do is you install VirtualBox which is right here so let me launch
that and inside a virtual box you can install any operating system possible so I have put Ubuntu Linux in side of VirtualBox on my Windows 7 machine ok so let me run this up and I just wanna let you know you can actually find a link in the description below which tells you how to install VirtualBox and Linux on your windows 7 if you want to go ahead and do that but this is the Ubuntu Linux that is launching right now ok so here you're looking at bound to Linux and before we dive into the
commands I'm going to show you something real quick what you're seeing here all these icons all this desktop all this nice graphical features this is called the GUI GUI this is called the graphical user interface now we're not worried about that today what we're worried about is the CLI which is called a command line interface so you have to launch a terminal to go into the command line interface and then once you are search for an app you can type in terminal which brings up the terminal right here and then you can actually click that
and that is the terminal we will be working with all right so the first command we will be looking at today is the PWD command oops it's not typing okay p WD command PWD command stands for print working directory so when I press ENTER it actually tells me which directory I am currently located at so if I go to my own folder browser I am actually in home sake which is right here so I'm looking at all these guys on my command prompt now the second command I want to show you guys is the LS
command when you press LS it gives you a listing of everything which is in the current directory so the current directory is the sake directory which is my username and under home inside of home I've got all these guys so I've got the desktop downloads music public videos and if you come over here that's all the same stuff you're gonna see in a regular File Explorer so here's the desktop documents downloads music same stuff that you see here so that is the LS command it's it's it stands for list and when you list it lists
whatever is inside of your current directory again PWD stands for print working directory so it tells you where you are currently located in now as you can see when you have a pretty graphical user interface you can see everything right in front of you but if you have a command line interface like this one a terminal you're not gonna be able to see anything so if I clear this that's all you see so you have no idea where you are okay so to see where you are PWD to see what you have at where you
are you type in list now the next command I'm going to show you is called a CD command and CD command has a lot of variations CD is used for navigation so let's say I want to go to the Downloads folder how do I go there I type in CD and I type in downloads the name of the folder and just remember everything has to be exactly as it appears so the in in Linux everything is case-sensitive so this cannot be a small d it has to be capitalized just like it is here okay so
if I type in CD downloads now I am in the downloads folder okay and how do I know I'm in downloads folder PWD it actually tells you right here so I'm in home slash sake / downloads okay and let's see what we have in downloads right now type in list and there's nothing in downloads so that's all launch this again go to downloads and as you can see download directory is actually empty okay so if it is empty you're not gonna see anything here now let's say I want to go back to my home directory
my sake directory how do I go back so CD takes you into a folder and if you want to go out what you do is you type in CD space two dots and that takes you back to the previous directory that you were focused on now if you want to go to the root directory which is like in Windows it's like the C directory what you type is CD forward slash make sure you put the space okay so CD space forward slash press Enter and that's gonna take you to the root directory let's type in
LS and as you can see the root directory has much more than your user directory okay again but home and sake is inside of root root is at the top of everything so if you look around carefully you'll see the home directory sitting in the root directory and if you go in there CD home and you type in LS you will see your username okay and then CD sake then you type in LS and now you're back over here this and this match so remember this will take you to the root of your Linux operating
system and inside of root you've got all kinds of fancy things that you don't want to worry about right now so let's do a quick recap let's go to the music folder CD music so I'm now in the music's folder or the directory I'm going to be using the the word folder and directory interchangeably interchangeably and they're gonna be mean B meaning the same exact thing okay so in here let's type in PWD so that means prank working directory and it tells you that you are in fact focused on the music folder again if you
go over here here's the music folder if you go to home here's the music folder okay it's empty let's type in LS to see if it is really empty it is in fact empty so next I'm going to show you how to copy or move a file so let's go back CD space dot takes us back and do an LS and let's say I want to go into the Documents folder so I type in CD Documents and then type in LS and here what I have is I have a test file so this is one
of the files what I want to do what I want to do is I want to copy this file and I'm gonna use the CP command for that that stands for a copy I'm gonna copy this test file and I'm going to paste it into the same folder with a different name so test copy and I'm going to press Enter okay just to give you make you understand exactly what happens so you use the copy command you pick the file that you're trying to copy and then you give it a brand new name to create
the copy within the same folder okay so if I type in LS now you have the first file test and then you've got test copy now how do I remove this file you use the RM command okay so the RM command is used to delete a file in your current folder so if you type in RM test copy and you type in LS as you can see test copy is gone and we only have test left over now what if I want to copy test file and I want to paste it into the Downloads folder
how do you do that okay what you got to do is you have type in CP and you take the test file and then you have to tell the computer where do you want to put the copy of the test file so remember if you go up here we're working under home / sake okay so what you want to do is you want to do slash home slash sake slash downloads and you press ENTER and type in LS we still have the test file right here now let's go back CD doc type in LS and
let's navigate to the Downloads folder and if I type in LS here now we've got the file test sitting here which we copied over from the Documents folder so let's go ahead and remove this file from the Downloads folder so our M is the remove command RM test and remember because we are focused in two downloads when we do RM test its gonna dump it's gonna delete the test file only from the Downloads folder because that is where we are focused on press ENTER type in list one more time LS and now there's nothing there
left so let's go back let's just type in PWD and we're back in a home sake okay next the next style let's talk about making a new folder and deleting the new folder so let me launch this right here and I'm gonna minimize I'm gonna make this a little thinner here okay so you can still see what's going on one second alright so that's better so let's go to my arm My Documents over here and let's go to CD documents oops Dawkins okay so now we're in the Documents folder and all we have in here
is the test file which you can see right here let's make a new folder so how do you make a new folder you use the command called MK dir press ENTER and it's gonna say some kind of error because we were missing an operand okay so we were missing the new directory we used the command what we did not specify the name of the directory so you type in MK dere dir and then you type in test folder I'm gonna use capital letters here okay and as you can see over here a test folder was
created instantly and I can actually go into that test folder if I wanted to LS and there's nothing in there so let's go back CD dot dot and let's delete the test folder so how do you delete that what you do is you using the commune's the command rmdir so this one is make directory this one is remove directory type in test folder and I'm not gonna press ENTER take a look over here and let's come back here and press ENTER and that directory disappears now if the directory had something inside it we cannot delete
the directory that has stuff in it using our m dir okay so let's uh MK dir make another directory in the Documents folder and say test ok so it popped up right here and let's go inside here and let's just create a new document ok new doc now if I try to delete this using rmdir test folder let's go back here ok so now the test folder has a file in it it is the new doc okay if I try to delete this it's gonna say failed to remove test directory is not empty so how
do you delete this you have to actually use the RM command which is a remove command for files but what you do is you have to set a new option you have to say - R and then you have to type in test ok so watch this there's still a file in here but it's just gonna disappear okay so everything in test has been removed so this is how you delete folders that have existing files inside of them you use the RM command you put a space you put a minus R and then you put
a space and then you put the name of the directory right underneath and right next to minus R okay so here it's got a really messy here so let's use the clear command to clear the screen real quick and I'm going to talk about a couple other commands and we're gonna end the tutorial here all right so the final command I want to go over is called a man command okay MA and now this stands for manual manuals okay like like tutorials so when you don't know what you're doing and you want to find out
more about any command that you're using you can type in man space and let's just say the LS command which is the list command and you press ENTER it's gonna give you a whole lot of information regarding the LS command so you're gonna get the name of the command which is LS it says list directory contents okay you get a quick setup synopsis you get a description of what the command exactly does and all that stuff and once you're done reading this whole thing you just type key Q to quit okay so let's do one
more man and let's do the CP command which is the copy command press ENTER and it says here it copies files and directories okay and you have a description here and you can read through this whole thing and you can keep pressing enter to get more information so press ENTER to continue okay to go all the way but when you're done you can press Q and it just quits the manual so that's how you can get information on any command that you want in Linux alright and thanks for watching this video now there are going
to be more Linux tutorials coming soon so go ahead and subscribe to my channel for more videos to come give me a thumbs up if you liked this video and you can also follow me on Facebook Google+ and Twitter okay so you have all these options all links to my social media websites and my actual website are found in the description below alright thanks for watching again and I'll see you the next time
Copyright © 2024. Made with ♥ in London by YTScribe.com