Intro to the Linux Terminal Part 1: Navigating in the Terminal

hello and welcome to a new intro to successions that I’m going to try out it’s called an intro to the linux terminal this is something i’ve been asked about for so long now I certainly have been meaning to do it merely haven’t gotten around to it so let’s go ahead and get started alright so a great deal of you are actually going to be running gnome at this item and so the easiest way to are going to the terminal unknown is go up to applications supplements and then click on terminal as you’ll see here my terminal inspects a little bit different than yours probably does now by default it should look something like this where it’s black text on a grey background I like mine to be light-green verse on a black background because i use unix way back in the days and that’s the way that it was so let’s go ahead and get started I’m back on my lettuce text on the pitch-black background and you’ll notice now we have a blinking cursor prompt it’s ready for us to do whatever we want to do now the division before the cause is what’s really important at the moment you’ll see here it says jakey’s 0 that’s actually my username at render yield is the name of the computer that I’m running this on and then a colon the colon is basically saying this is all the stuff that is important and this is the user at where the user is everything after this is going to deal with where we’re actually located on the system now the little squiggly celebrate there that’s actually called the tilde that says where we’re actually located on the system at the moment now to understand what who really means you’re going to have to understand the tree the hierarchy of the Linux file system so at the exceedingly top of the tree you’ve got the beginning the flog the very top index all of the records on the system are contained under this directory now under the root you’ve got a whole bunch of different directories you’ve got the et Cie directory bin s been opted for and home home is actually the most important one we’re going to talk about right now the residence directory is where all of your personal used records are preserved so inside of that home directory if you have multiple user accounts you’re going to have various dwelling enters in there so for example on my system if I go into the home directory I will see residence/ j/ ki 0 and within that directory or actually we’re all of my personal registers are kept including music representations papers all sorts of other enjoyable things whatever you want to create there now for the sake of compiling things simple Linux actually sets it up so that your dwelling index is represented by a tilde so if I’m at the terminal right now and I type in PWD that says print acting index and it says engrave whatever directory I’m in let me exactly where I am on the system you’ll see here in the terminal we have slash home slash jakey 0 so that’s/ for the spring/ home as the directory/ j key 0 is the subdirectory that we’re in I hope I didn’t “re going through” that too quickly if I did let me know in the comments below and I’d be happy to try to clear all that up mostly you’ve got the spring index you’ve got a knot of indices under it and then a bunch of indices under those it does expand out various kinds of like a tree but that’s enough about that I could make an part video just talking about the enter organize of Linux now if I wishing to the data that is really contained in this directory I type in LS and what that does is it leans a enumerate out of exactly those registers that are contained in the directory from here you can do whatever you want to you can browse around to other indices you can create folders you can delete registers that the terminal is so powerful that you can do a ton of things from it and that’s why I want people to be comfortable with it instead of being afraid of it I know a lot of people still shy away from Linux because they’re persuasion you have to spend a ton of time at the terminal and they’re just panic-struck of that thought well the whole point of this is to show that the terminal is really not all that spooky if you know a few simple bids you can navigate around you can activate works you can do all sorts of very easy things so now that we’ve scheduled the contents of this directory you can actually do a full listing of the index by make an LS dash a that will say show all files in the directory no matter what now this can get kind of large it’s actually a little easier if you look at it in a directory format so LS dash al are really say inventory it in a long format which gives you all of the information on every datum in this directory and you’ll see here we’ve got different assents this is a little bit much to get into at the moment so we won’t even are concerned but here’s a list of all of your data anyone that has a dot in front of it is considered hidden in Linux so if you want to hide something made a span in front of it but that’s mostly registering the indices there’s a whole lot more involved to that but mostly LS to inventory it LS al to list it long and testify all of the folders now if I wanted to move into one of these other directories and envision all the data that are included in it I could type in for example CD space urban terror and actually I’m going to go ahead and affected tab on that instead it will tab ended the rest of that index format you particularly handy so now CD says convert index and that changes to whatever directory you’re giving it and I’m giving it the folder epithet without a trounce in front of it because if I gave that/ there it says change to the/ root directory and then whatever directory I’ve given after it so CD urban terror says take whatever I’ve got in this case residence j/ ki 0 and then settled this after it so CD urban terror and then LS again will take me to the contents of that metropolitan terror directory if you’re curious and you want to see it actually in action I can go into my jakey 0 folder go into the urban terror directory and here are a list of all those same files that were shown in the terminal just wanted to show you that just for convenience sake now let’s say you’ve gone in here you made some changes to files you’ve deleted enters in whatever and you want to get back up one directory or you want to go back to your dwelling directory now you can do this one of two ways you can either depending on how many levels deep you are strikes CD space dot dot the dot dot says go up one level not sure why that is that’s an old-fashioned standard that they’ve been following for a long time I’m sure there is a good reason for it though but dot goes back up one level you’ll see here the tildes/ urban terror says residence index/ city terror directory if I smack CD dot fleck it goes back up to just the tilde if I type PWD now again we are back in the home directory now if I go deeper and deeper see the metropolitan fear CD io urban terror app will go into CD materials will go into CD sources will go into that’s as far as we can go with this one nice now you’ll accompany we’ve got the residence directory/ city fright/ io metropolitan fright materials riches on and on down if I wanted to get back to my home directory from here or if you’re on any other directory on the system and you somehow got there and want to get back you can either close out and reopen it back up that’s not exactly the most convenient way to make love or you are eligible to time nature CD CD alone immediately makes you back to your dwelling index no matter what in addition you could probably do CD space tilde and that would make you to the tilde the dwelling index there are so many different ways you can do things in the terminal it’s not even funny but it is very convenient the only interesting thing I could think to cover as far as navigation would be to create and delete registers and directories so if you want to create a file you say touch and that will create just a grassland folder that can be turned into whatever you want it to be so if i say touch test dot txt and then do an LS to goal the content of the index you’ll recognize over here we have test text that exactly evidenced up that’s a grassland old-time text file it doesn’t have anything inside of it I’m going to bounce onward really a little bit to show you but if i type nano measure textbook it will show me look there’s an empty txt file there dozen have anything in it so that’s creating a file if you want to get rid of that file when you’re done with it category in RM for remove room measure text and that will remove precisely that file now doing an RM from the terminal doesn’t actually take it to your litter like it would if “youre in” nautilus or if you were in whatever other folder browser you prefer to use this actually takes it straight to the totally get country it’s lost forever though with some recovery you could get it back in theory but now that I’ve done the RM test if i do the LS again if I roster the index again you’ll notice experiment text is no longer there now the same thing can be said for creating a directory if I wanted to create a directory here and call it test I can do mkdir space test and then do an LS again to list the index here we have the test directory that was just composed I can change directory to get into it you accompany we are in the test directory as a subdirectory of the home now if I type in handle experiment textbook in here this is not the same file as we appreciated earlier it’s actually a completely new test text file print the directory we are in home jakey 0 assessment and we have test text in there and much in the same way as we get before I go back to the home directory by CD dot to go back up and then to remove this one it is slightly different to remove a directory you have to actually do RM space dash RF that says go recursively and pressure it to delete everything underneath it now if anyone ever tells you to do this command at the root stage of the system don’t do it it’s very bad idea basically if you do an RM dash RF with the correct permissions you will wipe out everything on your plan and that’s a very bad thing to do if you don’t get it on with the claim dispensations it will still go through and wipe out everything in your home directory which is a really bad thing to do so simply don’t make love unless you’re a hundred percentage specific what you’re doing now in this case our mdash RF test is going to take the test directory itself and all of the contents underneath it and delete it so you learn there I hit our mrf experiment and then if I do an LS now the test directory is no longer there so if i try to CD to it if i try to change directory to assessment no such enter or index one more thing I is also expected to mention is emulating and renaming files what you can actually do is copy one register from a location to another if you’re familiar with the graphical explorers you’re able to right click on it go to copy right click somewhere else go to paste well in this case instead of doing all that you exactly do CP space whatever the file is in this case will do startup I RSSI dat sh and we will articulated that in our public folder so public i used did CP the register figure and then where i want it to go now you can do that more in depth if you just wanted to if you want to framed it in somebody else’s home directory you can type in instead of public slash home slash user name/ whatever you can do/ ET c/ whatever you have to make sure you have permissions on the conductor you’re going to but that’s a little further than “weve been” want to go today so if I just wanted to simply situated this in my public directory I thumped CP start up by our surface at SH public now if I CD change directory over to public I can do an LS alist the directory and there we go start up by RSS gazes actually been reproduced over there now if I go back up a level and then list the index in their startup by RSS I didn’t actually is moving forward it only followed it now if I actually wanted to move it I can move it either within the directory from one record honour to another that’s how you rename things in linux terminal or I can move it from one index to another index and actually rename it during the move so for example if I wanted to move the altitude desktop record I could do a MV for move altitude desktop public/ altitude scatter evaluation and then if we do an LS real quick you’ll notice that altitude desktop is no longer in this folder if I go into the public directory by doing a convert index to public roster the contents there is altitude experiment it’s the same register it’s got a somewhat different mention and it’s been moved from one plaza to another I know that’s very quick and there’s not a whole lot of detail being given here and I hope that this was somewhat helpful to you but that’s where we’re going to stop for this time make sure to come back next time next monday i’ll be doing another intro to the terminal video as ever expressed appreciation for for watching and i will see you next time

For More Info click here

Related posts

Leave a Comment