Linux Command List
Hello and welcome, I will give you guys a quick introduction to linux and i’m going to show you how to use some very useful introductory linux commands using the 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. 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 a TNT employees in on 1969. Linux was written by a name ago 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 percent of the world’s fastest computers like super computers run on some form of linux and this is because the rock solid system. So there was a quick history on linux that was just to give you a perspective.
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 we will be running and learning today can be generally used on almost all different linux distributions. 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 of virtualbox you can install any operating system possible. I have put ubuntu linux inside of virtualbox on my windows 7 machine. Let me I run this up and I just won’t 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 seven. If you want to go ahead and do that but this is the ubuntu linux that is launching right now. Here you’re looking at bond 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 stand for a 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. You have to launch the 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 on the terminal.
So the first command will be looking at today is the pwd 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 arm folder browser arm i’m actually in a 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 we are under home inside of home I’ve got all these guys. So I’ve got the desktop, downloads, musi,c public, and videos. If you come over here that’s all the same stuff you’re going to see in a regular file explorer so here’s a desktop, documents, downloads and music same stuff that you see here. So that is the “ls” command it stands for list and when you list, it lists whatever is inside of your current directory. Again p 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 going to be able to see anything. So if I clear this that’s all you see so you have no idea where you are. So to see where you are pwd to see where you are.
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 directory “downloads” how do i go there I type in “cd” space downloads the name of the folder and just remember everything has to be exactly as it appears. So in linux everything is case sensitive so this cannot be a a small D it has to be capitalized just like it is here. So if i type in “cd downloads” now i am in the downloads folder. How do i know i’m in downloads folder pwd and actually tells you right here so I’m in home / sake / downloads. Let’s see what we have in downloads right now type in list and there’s nothing in downloads. So let’s see launch this again go to downloads and as you can see downloads directory is actually empty. So if it is empty you’re not going to 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 are focused on now. If you want to go to the root directory what you type as cd forward slash make sure you put the space. So CD space / press ENTER and that’s going to 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. 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. Then cd sake then you type in ls and now you’re back over here. So remember this will take you to the root of your linux operating system and inside of route you’ve got all kinds of fancy things that you don’t want to worry about right now. Let’s do a quick recap let’s go to the music folder cd music so i’m now in the music folder or the directory i’m going to be using the the word folder and directory interchangeably and they’re going to be mean to be meaning the same exact thing. So in here less type in pwd so that means print 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. It’s empty let’s type in ls to see if it is really empty it is in fact empty.
Basic Linux Commands for Beginners with Examples:-
Sso next I’m going to show you how to copy or move a file so let’s go back cd space dot 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 a test file. So this is one of the files what i want to do is, I want to copy this file and I’m going to use the cp command for that. cp stands for a copy i’m going to copy this test file and I’m going to paste it into the same folder with a different name. So type cp test testcopy and i’m going to press Enter ok just to make you understand exactly what happened to 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. So if i type in ls now you have the first file test and then you’ve got testcopy now.
How do i remove this file you use the rm command. The rm command is used to delete a file in your current folder so if you type in rm testcopy and you type in ls as you can see testcopy is gone and we only have tests left over. What if i want to copy test file and I want to paste it into the Downloads folder how do you do what you got to do is you have to 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 So what you want to do is, you want to do slash home slash downloads and you press enter and type in ls we still have the test file right here now let’s go back cd dot dot type in ls and less navigate to the Downloads folder and if i type in ls here now we’ve got the the file test sitting here which we copied over from the documents folder. Let’s go ahead and remove this file from the Downloads folder so rm is the remove command rm test and remember because we are focused into downloads when we do rm test it’s gonna duck it’s going to 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. Let’s go back let’s just typing pwd and we’re back in home.
Next let’s talk about making a new folder and deleting the new folder so let me launch this right here and let’s go to cd documents 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 mkdir press ENTER and it’s going to say some kind of error because we were missing an operand. So we were missing the new directory we use the command what we did not specify the name of the directory. So type in mkdir and then you type in test folder 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 not in there let’s go back cd and let’s delete the test folder so how do you delete that what you do is you using the computer command rmdir is remove directory type in test folder and I’m not going to press Enter take a look over here let’s come back here and press ENTER and that directory disappears now if the directory had somethin inside we cannot delete the directory that has stuff in it using rmdir. So that’s mkdir 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, new doc now if i try to delete this using rmdir test folder let’s go back here. So now the test folder has a file in it it is the new doc okay if i try to delete this is going to 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. So watch this there’s still a fall in here but it’s just going to disappear. 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 right next to minus R. So here it’s got a really messy here. Let’s use the clear command to clear the screen real quick and I’m going to talk about a couple of commands and we’re going to end the tutorial here.
So the final command i want to go over is called a “man” command. The “man” stands for manual. 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 you press Enter it’s going to give you a whole lot of information regarding the ls command so you’re going to get the name of the command which is ls it says list directory contents. 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 q to quit. 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. You have a description here and you can read through this whole thing and you can keep pressing enter to get more information to press ENTER to continue. 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.
If you need basic Linux commands for beginners pdf and basic Linux commands for beginners ppt formate just comment below. Soon Linux terminal commands cheat sheet and linux command line cheat sheet will be available to download.
Thanks for reading this article now they’re going to be more linux tutorials are coming soon. I’ll see you the next time.