in today's.. I will give you guysa quick introduction to Linux andI'm gonna show you how to use somevery useful introductory Linuxcommands using a terminal windownow just to be clear this is a coursefor beginners who want to learn how touse command on a Linux terminal nowfor those of you guys who are notfamiliar with Linux at all let's giveyou a quick perspective Linux isnot Unix UNIX was created by a bunchof AT&T employees in 1969 Linux waswritten by a name AGGA by a guy namedLinus travolt who created the entirething by himself and released itaround 1991 now Linux is a powerfuloperating system but it is especiallydesigned for server systems and 90% ofthe world's fastest computers likesupercomputers run on some form ofLinux and this is because a rock-solidsystem okay so that was a quick historyon Linux that was just to give you aperspective now Linux and UNIX aredifferent just remember that now onemore thing before we dive in Linuxcomes in many different varietieswhich are called distros ordistributions in this tutorial wewill Use the popular Ubuntudistribution of Linux but there areothers out there as well such asFedora mint and Debian and more evenAndroid is a Linux distribution so thebasic 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 remembereverything 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 usedto delete file in your current folder.so if you type in RM test copyand you type in LS as you can see testcopy is gone and we only have testleft over now what if I want to copytest file and I want to paste itinto the Downloads folder how do youdo that okay what you got to do is youhave type in CP and you take the testfile and then you have to tell thecomputer where do you want to put thecopy of the test file so remember ifyou go up here we're working underhome / sake okay so what you want todo is you want to do slash home slashsake slash downloads and you pressENTER and type in LS we still have thetest file right here nowlet's go back CD doc type in LSand let's navigate to the Downloadsfolder and if I type in LS here nowwe've got the file test sitting herewhich we copied over from theDocuments folder so let's go aheadand remove this file from theDownloads folder so our M is theremove command RM test and rememberbecause we are focused in two downloadswhen we do RM test its gonna dumpit's gonna delete the test file onlyfrom the Downloads folder becausethat is where we are focused on pressENTER type in list one more time LSand now there's nothing there leftso let's go back let's just type inPWD and we're back in a home sake okaynext the next style let's talk aboutmaking a new folder and deleting thenew folder so let me launch this righthere and I'm gonna minimize I'm gonnamake this a little thinner here okayso you can still see what's going onone second alright so that's betterso let's go to my arm My Documents overhere and let's go to CD documentsoops Dawkins okay so now we're in theDocuments folder and all we have inhere is the test file which you cansee right here let's make a newfolder so how you make a new folderyou use the command called MK dirpress ENTER and it's gonna say somekind of error because we were missingan operand okay so we were missing thenew directory we used the command whatwe did not specify the name of thedirectory so you type in MK dere dirand then you type in test folder I'mgonna use capital letters here okayand as you can see over here a testfolder was created instantly and Ican actually go into that test folderif I wanted to LS and there's nothingin there.so let's go back CD dot dotand let's delete the test folder sohow do you delete that what you do isyou using the commune's the commandrmdir so this one is make directorythis one is remove directory type intest folder and I'm not gonna pressENTER take a look over here and let'scome back here and press ENTER and thatdirectory 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 goinside 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 usetheRM command which is a removecommand for files but what you do isyou have to set a new option you haveto say - R and then you have to typein test ok so watch this there's stilla file in here but it's just gonnadisappear okay so everything in testhas been removed so this is how youdelete folders that have existing filesinside of them you use the RM commandyou put a space you put a minus R andthen you put a space and then you putthe name of the directory rightunderneath 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 manualmanuals okay like like tutorials so whenyou don't know what you're doing and youwant 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 commandwhich 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 arefound in the description below alright thanks for watching again and I'll see you the next time
linux
सदस्यता लें
टिप्पणियाँ भेजें (Atom)
Data Types in C (part 2)
Data Types in C....... Today, we will continue our discussion on integer data type. Our outline for today...
-
Ethical Hacking💻 वैसे जिस तेजी से सायबर क्राईमस आजकल बढते जा रहे है . हर बिझनेस ऑर...

कोई टिप्पणी नहीं:
एक टिप्पणी भेजें