YTread Logo
YTread Logo

Linux Tutorial For Beginners - 1 | Linux Administration Tutorial | Linux Commands | Edureka

May 30, 2021
Hello guys my name is Vardhan and I will be your instructor today so at Bradford rekha I welcome you all to this webinar on Linux

tutorial

and in today's session I will give you a complete overview of flux okay ? It doesn't matter if you're a beginner or if you're well versed in your nuts, but I'm going to teach you concepts that you can take home and execute on your own, so before I begin, let me continue with Confirmation from you. I hope you can hear my voice and see my screen. If that's the case, put it in the chat box and I'll get started.
linux tutorial for beginners   1 linux administration tutorial linux commands edureka
Okay, I'll get a couple shout outs here where we said you can listen to my. voice and I see my screen and also our cache. I'm the same, you can say even since a month, okay guys, it seems like everything is fine, let's start the session right now before starting the first topic. Let me show you the agenda and tell you what we are going to cover on the trip. Well, this is the agenda and I will cover the topics in this stream. Well, first I will talk about the birth of Linux and tell you why.
linux tutorial for beginners   1 linux administration tutorial linux commands edureka

More Interesting Facts About,

linux tutorial for beginners 1 linux administration tutorial linux commands edureka...

They became popular and then I talked to Willie's Linux distributions. Well then Linux is basically a kernel. Most people think that the following is an operating system in itself. Well, that's not the case, so I'll talk about the different versions of Linux. Well, the way operating systems are down, I'll talk about those things and then we'll start with the practice right after that topic. Well, in the practices that we have, I have categorized this into different difficult phases in which I know that first I will talk about the basic Linux

commands

and then I will show you how to work with files and directories and then I will show you how to add and delete users.
linux tutorial for beginners   1 linux administration tutorial linux commands edureka
You know you're going to learn all those aspects of management and eventually there's going to be one. Network aspect that I will cover in Linux. Well then there is something called SSH. Well, SSH stands for secure shell and this is used for communication, assuming you want to communicate with the remote host. When I say remote host, it means a remotely located system. which they don't have physical access to so that it can run between how they will access that machine with an SSH, so I will talk about all these things and yes, if you have any questions or any problems during the session, please ask. in the chat box and I'll reply right away, okay guys, cool, Robbie, okay, okay, cool, Robbie says he's a neutral nut or better, no problem, that's exactly the target audience from this webinar, so you know this is going to be a complete basic

tutorial

and you know, for anyone who's going to get started with the nuts and bolts for little college students or professionals who are absolutely new, so we're all used to using Windows or Mac, so most people here would do it.
linux tutorial for beginners   1 linux administration tutorial linux commands edureka
I only use Windows because it's cheaper and better, but Linux is the favorite operating system of software developers, that's why you know there is so much hype and so much demand for inert professionals and Linux administrators, and if you want, start with a career in that domain, then we can start with this tutorial starting today. Alright guys, okay, so without wasting much time let's go to the first topic and that's why luxury becomes popular long before we talk, do you know where it is? became popular, let's see the birth of the crazy, how things start well, so back in 1969 there was a person called, you know, actually, it was two people from dentistry and Ken Thompson, so they are working at Bell laboratories in AT&T and what they did was they created this programming in C correctly, so we all know programming well, so we all know these basic programming languages, so C is one of the most basic and one of the most effective and the root of all other programming. languages, so that's C and they were the ones who developed C and the UNIX operating system, so that's what happened in 1969, well, and then in the next decade, well, basically in the 1970s people started to develop or contribute to the development of these two things. okay so they started contributing to the development of C programming language and UNIX operating system so in our session we will discuss more about UNIX operating system and since it is about Linux, UNIX is basically the mother of pearl of Linux because Linux is based on the UNIX operating system, okay, I'll tell you how that's the case in a little more time, but that's why they're starting with your operating system, okay, so I'm NOT going to talk about C and I'll go back to our slides, where it says growth. of X due to open source collaboration and there was commercial sale of Unix.
Now, what this means is that you know very well the product that Dennis Ritchie and Ken Thompson created, that you knew that they were something really cool, they were incredible software and operating systems that You know, electric machines and computers, what this meant is You knew they had to be developed to be even better, so they made it open source. It was when we say open, meaning it was freely available for anyone to use. Any person, any scientist, any engineer or anyone, could simply get access to the source code and start improving it, and if they feel that they have improved the software in some way, then they can simply return that code to the developers, so basically they It was about collaborative development, so that's what happened with UNIX operating systems in the 70s, a lot of hippies, the scientists they all collaborated with wrote their own code, their own version of the UNIX operating system and contributed to the development of the system UNIX operating system and from AT&T were the ones who built UNIX or those who were responsible for founding UNIX, were the ones who again, for the benefit, received help from other people, you know, to develop the operating system and what they did not have is that they converted it in a business.
So they made money from it by fucking selling UNIX and this was something that didn't sit well with a lot of people and this didn't sit well with the other developers and scientists because it was their effort that contributed to the growth. of UNIX but yet they don't make any profit, so you know UNIX because the ideal was to make money off of someone else's work, so that's what happened in the 1970s, and then came the 1980s, which was more different so instead of buying you know UNIX at AT&T and you know they have two different versions of Unix one was FreeBSD and the other was the PDA TNT version of UNIX so that was enough for you to go for them .
The company began developing its own UNIX, so IBM came up with its own. The UNIX version called AIX Solaris came up with its own version called Sun OS and HP came up with its own version of Ewing with hp-ux score so there are other versions too like POSIX and all these things now as there are many versions. many flavors and many dialects of the same OS UNIX was becoming a bit problematic because each of the dialects would be a bit different, so IBM's UNIX would be different from HP's UNIX and Solaris' UNIX or it would be different from POSIX, it's okay so each one All of them would be different but yet they are all based on the same thing so it was unnecessary or you know there is confusion with so many versions of Unix so that's when this person named Richard Stallman was called something called the GNU project happened.
So I told you before that the nurse is just a colonel and not an operating system in itself, so what this person did was he came up with something called the free software movement, so he wanted something like what you know in the families when everyone could collaborate and work on the same single operating system, so he tried to recover that era and this office of the free software movement. This idea led to the GNU project, so the GNU project was about people being able to access an operating system for free and you know, develop the operating system, that's what this led to and that's what we even call today, so GNU is basically the operating system and deluxe is the kernel that powers the operating system, so a combination of these two is what results in one of the Linux distributions, so we have multiple distributions like Ubuntu cent OS, read on Debian Fedora all of these things, so all of these things are flavors, a combination of one of the operating systems and B, you know, a Linux kernel, okay, so that's what What are they.
This is what happened in the 1980s and then in the mid to late 1980s was when solvent research came into the picture and came up with the junior project where people could develop and use three operating systems as well. that that's what happened here and the event that happened after this was written as a result of today's world, well, after that, in the 1990s, probably 1991 or 1992 was when this person trapped in a store I was still in college at the time and put the following kernel source code online. So he was trying to use the POSIX version with some hardware called 386 and he thought it was compatible only with that hardware, so he put the source code online so anyone could use it and then they discovered that it could be used with GNU and that's when everything won. popularity, so that's when we came up with something called Linux plus GNU, this whole term of having a kernel plus this operating system and you have to work together, so that's what happened here.
This is how Linux was born, well now without wasting any more time, let me go to the next slide and talk about the various Linux distributions, so I told you that there are many versions like Ubuntu Centaurus, let's also talk about those and when we talk about distributions, the most important and famous are the from Red Hat Enterprise, Linux, Fedora and Debian. Well, these three are mainly different companies and as far as pricing goes, Debian is basically not a single company, it's something like, let's say, a group of developers developing this. version of Linux, okay, this version of Linux and the version of Ubuntu, so that's what Debian is and Red Hat basically has an author award, it's a company that commercially sells the Linux distribution and it's probably the most used and the most popular of all.
Why, because they are very stable, they are very reliable and because it is written correctly on their servers and workstations, it is the preferred Linux distribution for servers and workstations on Enterprise Linux, so they have a free version which is called Centaurs and today's demonstration. I'll show you by pushing it to SMB, ok, so they have that and they have several other distributions, in fact, even Fedora, which we're going to talk about next, even in Federer is a company funded by Red Hat itself, so en Again, one of the variations of Red Hat and Federer has its own set of well-known distributions around it and that is about the federal distribution, then comes Debian, so again I talked about Debian, so Debian is the Linux distribution that It is developed with the help of many developers so this is not developed for commercial purposes it is basically free and open source software and anyone with the skills can start contributing to this software and it has many other distributions okay these are are among the important and commercial ones, and if we are talking about some of the free distributions that people can use, then they can use Linux Mint, SUSE gen 2 open operating system and many more, so today there are almost hundred distributions of Linux and you can use any of them, you know, if you are To start with the basics, I suggest you start with Ubuntu or CentOS because CentOS is something that is really reliable and very fast, and Ubuntu is the most popular Linux distribution out there , so I read somewhere that smashing a third most used OS, okay, that's what the second one is about, of course, it's not as fast as they sent it to us, but it can still do it.
You know, it's a very popular and very useful tool, and Knox mint is the other version. which can be used to play movies and listen to music because this gives you a more Windows-like interface so that's what Linux Mint is so we have several distributions like this and yeah guys do you have any questions. I mean, some of you told me you know. You are newcomers and have not started with Alena, so you can start with one of these distributions. Mention that they can opt for Red Hat Enterprise, Fedora, Debian or other operating systems based on them. so the center is here it's based on Red Hat Enterprise Linux okay so the red we call it red so they have the free version that they provide for enterprise users or is it the centaurs and fedora again in fact you know they have multiple distributions under his name and Debian, other people who are the founders of opal - well, open is a distribution that is based on Debian and since open - it is so popular that there are different versions of Google - itself there are other distributions like X equal or add one to all these things and they are theother versions of Ubuntu, so it's about the different Linux distributions and you guys can probably tell if you are a newcomer, I suggest you go for 0.2%.
OS, like I said before, it seems like people are doing okay, so I'm getting a couple four comments from people, okay, so let me move on to the next slide, so okay, now we're in this light and let's talk about Lenexa features are okay, so the Linux features that you know when we say features are basically those compared to other operating systems compared to Windows and compared to Mac, okay, so compare them with them, how does the following? You will know what the benefits are with Linux and first of all we have this feature that updates are very easy to do if you have any. software on your OS or if it's the OS itself that you want to update then it's actually easier than us it's just going to be a command that you'll need to run and you know you can run that command from the terminal it's okay for those guys . who doesn't know what a terminal is, so let me open my version of Linux for you.
Which terminal okay, so this is my Centaurs version of Linux, and then they have different options here, so the terminal that you see here is What I was talking about, when you open the terminal there is no other window that opens. Okay, now this is the command line interface, so when I say command line interface, this is where I can't enter my

commands

and I can get my software. or my kernel to listen to those commands and perform actions by creating a process for those commands, so the whole benefit of Linux is this CLI because the CLI is really useful if you go for Windows or something, it has a very good GUI, so Even in Deluxe you have a GUI, so let me show you what the GUI looks like, so similar to Windows, you can just go to the computer and the file system, you can open various other folders and directories to have multiple directories and folders.
Well, I mean trees are basically folders. Folders is what they're called in Windows and here you call them directories, so I can go into any of these directories and I can close them like this. I can access any of these directories. any software or anything that is installed anywhere, so it basically doesn't provide a GUI; okay, but the thing about Linux is that you also have a terminal, this terminal is basically a command and an interface where you can enter your commands and you can get the software behaves the way you want, you can execute certain commands, you can install software, you can run programs, you can run code, so that's the advantage we have with the CLI and this foundation is the reason why it's very popular among all these software developers.
So I told you before that software developers are the favorite tool for us, that's because Linux is the free version of UNIX and you also know that it is possible to develop and create so many programs, so that's the thing about nuts , that's why it's so popular. So on the flight, I told them that it was very easy to do updates correctly, so those updates can be done easily by just running a few commands. Here, you know, by writing a single command I can update a particular software assuming it has Java. installed on my system then I can write a command to update which I can just say sudo yum update and negative java package.
I can put the Java version if it is any other language or if it is any other software then I can put that software. name here and update the application it's that simple and that's how easy you know it is to update the software here so I was talking about this aspect so let me go back to the slides and talk about the other features okay that's how updates can be done easily and then another feature is that the software is free, you don't have to pay for Linux, so like Windows, of course, everyone knows that Windows is paid, they can't know if they have a pirated version.
If you are caught having a pirated version, you will of course be fined at home. You know, desktop users and home users don't really have that problem because there are no routine checks, but companies can't use a pirated version of Windows because if there are audits they can come and confiscate the computers and put our heavy fine on the company, so that's what we save and the free software license is there and then ask because you don't need to have any license, you can just get all the people in your company to work. on Linux for free, so that's the aspect of the free software license and then you have access to the source code, so when we say access to the source code, I told you that in the seventies people could collaborate together and develop the operating system, so that's what I'm talking about here, so in the source code to run this operating system, basically Ubuntu or Centaurs, the source code is available to you and you can customize it and you can change it any way you want.
Can do it. behave the way you want and if it's really good, make sure you've added it, then you can also share your discoveries and your known features with other people with other fellow developers, you can do all these things to have full access to your knowledge. to the source code and you have complete freedom with what your operating system can do and how it behaves, but the same cannot be configured for Windows, so Windows you cannot change it completely, you do not have access to the source code at all and you cannot change all the functions the way you want because it's a proprietary tool and even though it's a program that behaves one way, if you try to change too many things then you know Windows will report, so that's what will happen. about the source code access feature and then we have another feature that has multiple distributions, so I talked about the different distributions in the previous slide.
The basic distributions are Red Hat Debian or Fedora, so you have several versions of them. different flavors in Red Hat and we have different ones in Debian and again Fedora has many other distributions, also many distributions are based on them so you have many options and if you don't like them we want B distributions then you can work on another distribution, so if you don't like Center it's because you know you don't get support for everything, then you can use Ubuntu. Okay, it is the most popular operating system and has support for almost all applications and all software. you can use that, but if you're not happy with the speed of Ubuntu, then you can probably switch to ship to s to have all that flexibility and all this flexibly without any cost, okay, there's no cost with respect to power or having than to learn something new because these are all the crazy ones, at the end of the day the commands will be the same, almost 98% of the commands will be the same, there will only be minor differences in the commands that will be executed on the different distributions, but yes, 98% would be the same as what you want for our transition time.
You will also know that you can get a lot of benefits from using Linux and last but not least, this feature is probably the highlight of Linux, making it a better protection against malware. So when we say best mesh protection, we say it is the latest in Windows if you guys had realized that you need an antivirus because it is prone to viruses, attacks, bugs and all these things so that people can hack your system easily. true, then you can't know that the same thing happens inside crazy, you don't need an antivirus at all. Completely antivirus-free Genesis, okay, 100 people, you don't need an antivirus, and in fact, you don't even have an antivirus. -virus but of course that doesn't mean you know it is completely safe and also security something which is really good but it is being developed on Linux but it is definitely better than Windows so you can be sure that no one is going to hack your system so easily.
That's what Linux is all about, so guys, that brings us to the end of this light of cool features, okay, and if you have any doubts even now about Linux and how good Knox is, then that should have been cleared up and resolved. By Now it's okay, so I have NO questions from the Department and if you have any questions, please put them in the chat box and I will answer them well. Okay, let's move on, enough with the theory. Now let's read a little, let's start with. Let's get to work, okay, then I'll show you how to run commands and how to do other things with sending to your operating system.
Okay, first of all, the first part of this hands-on session is going to be about you. learn an introduction to the terminal and the various commands and the basic commands and how to navigate through the different directories okay so we use the commands let's go like PWD delete LS and CD okay now let me go to my operating system sent, it's okay in case you forgot. mention it before guys I am using a virtual machine here okay I am running my windows OS on my laptop and I have a ghost box installed and in VirtualBox I have created an instance of my Linux virtual machine okay so my distro Linux here is centaurs.
I'll just show you something else, okay this is the VirtualBox I was talking about this is what I'm running on my Windows and I have several options so I can choose any VM I want so this is the VirtualBox and these are all the different VMs we have on my ghost box so currently I am running this VM called master ok and later on I will run even this VM called sleep. Now I'll do these two to show you how. SSH works so I told you on the agenda slide that I will know how to access the remote machines to access each other properly so for that purpose I need these two beams and of course they send us both and yes as you can see information.
It says some was sent through the system. I called it or named it master and this one is called sure, similarly I also have Ubuntu so the 64 bit window is this so let me turn on Ubuntu and show you how cool it looks okay so let me this wait a while so let me enter the past for the user and here we are this is my blessing for the operating system so even this is hosted on the same VirtualBox so I'm. It's like running on different virtual machines at the same time, so we have options to browse the Internet and I can open the terminal or the terminal option is here in my operating system, okay, I just want to show you the Ubuntu operating system. so let me quickly turn it off and go back to my centaurs and start running a couple of commands.
Well, I was showing you the Centaurs, so Logan, it's okay. This is my terminal and, first of all, the main difference that you need. What we understand between Windows and Linux is that in Windows, because you know files or folders are stored, everything was on drives, so we had the C drive, we had a D drive, we had a lot more drives like that and we could store all our documents in those folders. That's fine, but on Linux it's a little different from how Windows works. In Linux we have something called the root directory. Well, we have the file system here, so basically any folder, document, or directory that I have can be accessed from the file system when I click. go to a file system then you may have noticed that I got a /ur so this forward slash basically means root this means I am in the root directory and in the root directory all the documents and all the folders are present in this root directory, okay?
It's about storing some kind of important files, mp3s or videos, and then everything can be accessed from the root, so you can think of this as a hierarchical tree structure. Okay, so you have a root and all the other branches and all the leaves. and all those things you can convert them to be different directories and files inside so that all of them can be accessed from the root and if you want me to show you where it's not okay, now this is your desktop so you have the different icons here on each of these icons are four different operations, so you have records at home and then you have a terminal and you have an LMS, so this is a folder and this is a document, okay, so reading is a document, So what am I going to?
What I have to do is find the desktop folder, so from the root directory, if you go to this folder called our home, right under the home directory you have another option, you have a trick to use it, so now if I go to add recording directory, then you have other options of desktop documents, music downloads and all these things, so if I go to the desktop, in this directory you have the files and the different things are evident on my desktop, so LMS was a folder that was present,read me, this is a file that was present, terminal was present on my desktop, so it is available here, so eclipse IDE is present here, so all this was present on my desktop, so I can access it to the same thing from here and similarly, if you are downloading something from the Internet, then it can be downloaded in this folder, the Downloads folder, so we have a Documents folder, similarly, you have a videos folder , music folder, so all these files or folders will be stored somewhere, so they will be stored in your home slash, slash ed Rekha.
It's okay, if you are downloading them and if not, if it is going to be soft like what you are going to install, then you can install them on any other diet or in fact, most of the software that you install will be the one that is installed by default. in this directory in the bin directory, so you have the bin directory, you have the Lib directory, which lab will list all the different libraries that the operating system would use and then you have the s, then we have all of these things right so they can all You can access from here and it's about accessing them from the GUI aspect.
Well, the same can be done through the terminal. Okay, now let me go to my terminal and show you how it's done. This is my terminal. Okay, this is a command. line interface where I can't enter my commands and when those commands are executed by the kernel or by the shell then the program will get a twitter and some kind of features will be executed fine guys so before I start let me go back to my Se slides in and shows you what are the different basic commands that I want to run first, well, as you can see, it has a nice feature that provides the C light to communicate with the operating system, so it's a terminal that I showed you, the CLI.
It's called terminal and the CLI is basically better for tasks that can't be done with the GUI. You know, I showed you the concept of going to different directories and different folders, so it was little things that I had to do to go through various directories. So through the GUI, that's kind of a drawback, you'll have to spend a lot of time browsing, but with the CLI, if it's just a command and you can access the directory you want, that's the advantage with the CLI, okay and this is Just a basic example that I am giving you, there are many more advanced concepts and topics which are not very easy to do with the help of a GUI, so in those places you can use the CLI to perform those tasks and the CI It's also much more useful. faster in quite a few ways, okay, that's the advantage with the CLI and running the commands, basically, first and foremost you have the PWD.
Now this means print working directory. Okay, and what it does is it shows the current working directory of the terminal. Okay, so there's this slash and I told you that the four slashes represent the root directory. Okay, now let me go to the terminal and show you these two things, so now we're in the home directory. Okay, now let me write it down. let me just put PWD and when I put PW it prints the current working directory okay the current working directory so that's the home slash ed Rekha now if I go to the computer and file system and home and inside from this ed Rekha, so what you see here on the right, so this is the folder that I am mastering through my terminal because the current working directory is set to this folder.
Okay, now if I want to know, I say I want to change the directory, it means I want to change from this particular folder to one. different folder, so there are other options like the desktop folder and the Documents folder. If I want to move to one of these folders, how will I do it using the terminal? So I'm just going to show you how to do what you want to minimize. this a little bit, yeah the command for that is CD space, folder name, assuming I want to go to the desktop folder, then I can put the SK at the top and when I hit enter, I'm inside this folder , so before If you had seen this option correctly, then this represents the directory.
Amin, okay, actually, it was in the home directory and right now in the amoled desktop directory, so the desktop is the directory inside the bomb and if I want you to know, let's bring down the content on the desktop. I can run the LS command, so when I put LS in, it basically lists the different folders and the different files are added and that directory is fine, so we have the eclipse, we have LMS, which is a folder that we have in the grid, which is another file we have. all these things are fine, so let me go to the Desktop folder and show you the same.
Okay, so we have the terminal, we have the LMS, which is a folder, and similarly, going back to the terminal if I want to go into this Linux folder, I can do that again. you know, I just said CD and LMS space, okay, when I do Sam inside this folder, okay, now if I put LS, then I have the list of the folders or documents that are present in this LMS folder, so LS is basically the command to list the folders or files in that directory and yes, CD space, file name or directory name would move it to that particular directory, that is the same as I have discussed in this slide here is also fine , so I talked about current working directory which shows the current directory your terminal is in and then you have the root directory from where all your directories or folders are marked correctly so that everything can be accessed from the root directory, so that's this and then you have something called like the echo command you have. the su and sudo commands, okay, Adi does something a little bit advanced, so before I show this, let me show you the delete command, let me explain the delete command, okay, now I go back to my terminal when I type delete, the whole CLI it is deleted directly in my terminal. is clear, so any previous commands are no longer present, but what happens is that those commands are not deleted or something, they just cool down, so as you can see, they are still present here, so when I scroll to below, what happens is that I know it's just making sure that the other documents or the other Commander specified above are all hidden and showing something new, so that's what's happening here.
Well, that's what I told you now: you know that by giving the CD you can go to the directory or the photo is the current working directory, but how about we go back to the previous directory? Basically, from the arica folder to go to the desktop, we click on this and then we enter this folder directly, so from this directory, when you click on my lms, you will go to a different one. right directory, so enter here, but using g and you can just click on the cross here and you can exit that directory, but how about you do it with the help of terminal?
How do you do it here? To do this we have the option called space on CD to mark points, point marks for a point, that's what we call it right point, so if you have two points after the CD, this means that you want to navigate to the previous directory, so that we are currently in the LMS and when I logged in and went back to the desktop folder, directly to the desktop directory, now again if I give the same command again, from the desktop I need to go back to this in the correct logs directory, so here we go, the tilde symbol here represents where we are. in your home directory, okay, so the home directory is basically.
I can also access the home directory just by giving a limit and entering, okay, I can do it from any other directory, so let's say I'm just doing a LS and I say downloads directory, ok, do WN l or 80s, so it should just remember to give the exact name of the folder or directory you want to travel to, so only then it will work; otherwise we just hit W, it won't really work, ok. So after this, if you hit Enter, you go to the Downloads folder and do we have anything inside Downloads? No, we don't have any other folder or directory under download, so now let's try to go to the home directory from here immediately.
Initially I told you that by having two points Checkers after knowing the CD, you go to the previous directory in that path, so I ended with that, if I just give it a CD, ok and if I go to Banta, I will immediately go to the home directory and this with respect to any directory, no matter what directory it's in, so if I just give CD, we go to the home directory. Well, that's the benefit with CD Commander that you can give Siri to move to any directory. Well, I have a question. here from Shashikant and Sasha Kaun asks me that it should be absolute CD and LS every time it seems really complicated so surely she can't you don't need to do that because I was about to get to that point okay if you want ? to go to a different directory or a different folder, you don't need to provide CD and LS every time, okay, so L is basically just for you to find out or understand what are the different directories within a particular directory, okay , so if I know the path then I can immediately feed it a command and go into that directory now let's say I'm currently in the CD directory so this is the CD so this is my home directory.
Okay now if I click on the desktop and if I click on LMS and then you have another folder here, okay, you have HBase, okay, now suppose I want to go to any of these directories from my terminal, then I don't have to put the CD three different times and followed by LS and then go to those directories. I can just specify this in this command, so what I'm going to do is say CD space or since we're now in the home directory, I need to give the desktop one more thing that I want to show it. people, there is this one tab option on your keyboard just when you tap on it, so the command here will auto-complete, the option will auto-complete, so let me explain it again, so I'll go back in the your home directory, so you have different options, you have desktop and documents, so what I'm going to show you is click on Siri and space and then if I just type three or four characters of desc, okay, I want to go to this. directory, but I just typed the SK, okay now, if I click on the tab, the remaining characters of that particular option are already filled, okay, it fills automatically, so that's what the tap would do, the tapping budget will come out of it similarly. under the desktop you have the right items option so I'm just going to put L and if I press tab the rest will come out correctly and within the items you have different that we saw that the average base we have hive and all these things. so let me go there and show you what are the different directories there are, so we have HBase Hive MapReduce and Uzi.
Okay, now let's go to the terminal again. Let's say you want to go to the Uzis directory. Okay, now when I click shift. Oh, and if you click on the tab and then it automatically fills the directory, that's fine, but in case we take the example of hello our HBase here, that's fine, since they both start with hedge, I'm going to type hedge and if I click on the tab, that doesn't work. Well, it gives me more HBase options and that's because there's more than one option, you know, starting with the headers, just the more than one folder or directory that starts with it, that's why you get more options, that's why it's in autocomplete, but if you see that the second title here is sub B and the second entry here is I, then if you give it B and now you press tab then HBase is what will be selected, it's okay because after H and B there is only the only option is the base outside the border, there is no other folder that has H B as the first letters of the name, similarly, if I just type IV and if I tab, I exit it, so things like that, from our drum the machine is moved to the HBase directory.
I'm just going to say HBase, okay, now inside HBase. I want to go to one of the deities here, so let's say we go to perk-based practice. Okay, if you want to go there, then. you just have to give it the thumbs up, so this is your full path to access that particular folder. I'm going to log in and then I'm on module nine of HBase advanced practices. Okay, so I'm in this particular folder or this particular directory, so that's it. what can you do with the help of road feeding after seeing so that she can't, this was your doubt right, is it clear, okay, so that she can say yes, okay, so Look, this was the problem you had.
I had to enter commands several times, several times you have to put CD and LS so it is not necessary so you can just feed the path if you know what you can just feed the path with a single command and you can run it similar to This has software and other things that can be installed, other programs, so that they can be launched and executed with a single skill command and it eliminates a lot of confusion. It's really complicated, that way, try to take some time and It takes a lot of sexuality and permission, but with thehelp from the CLI and be terminal, then this job is simpler, so now if I want to go back to my home directory, I'll just click CD and hit enter, okay so Is this?
Now let me go back to my slides. You just want to close all these folders. Okay, now back to my slides. I showed you the Print Working Directory command and I showed you the path directory and actually delete. Okay, so the echo and the pseudo commands is something that I don't show you but I also talked about the LS and CD commands, so what I'm going to do is before we get into the details of CD and LS, I'm going to show you the echo. command and the pseudo user is fine, now let's go back to my terminal, the echo command, what is the echo command?
What is the echo command? The echo command is something that writes its arguments to standard output, so when we say arguments it means whatever we write next. echo we will type echo space and we will forward whatever we type to be specified to stdout and when you say stdout the CLI will show the output so in your terminal whatever output you get so specify that particular output now let me show you a practical example, only then you will be able to understand it, so let's just clear the screen, so another shortcut to clear the screen is Ctrl L.
Okay, if not, you can simply give the clear command. so, okay, this will show your screen; otherwise you can press Ctrl + L, which will do it again and just clear the screen. Keep the keyboard shortcut okay, so I told you I was talking about the echo command, so when I say echo and if I enter, nothing is displayed, but if I say echo and I say hello, I see what the output is talking about, so when we run this command, this was the output that came back, it is high and if I say echo hello, my name is ganga. when I say this, then what was specified as arguments is correct, so this was basically specified as arguments for this, so the argument is specified as output.
This is a conclusion of the definition. The definition was basically that whatever the argument is, it is specified according to the standard. output, that's what happens and that's what comes here, so this is one thing and in fact there is another functionality. Also now we all knew the concept of four variables so we can assign some kind of value to a variable and we can also print that without the echo command now let's say we have a variable X okay and let's give it a value 100 okay so now if we just I say echo dollar it will print and if it is a variable that I am specifying even that we print so the difference between the variable and the string is this dollar, okay now if I echo the dollar X then I set the value 100 in here to be able to listen to a hundred, but the same if I echo X without the dollar, then I see what is printed, it is X that is predicted, so that is the difference. between the string and a variable, okay, now you can again have a variable called name or you can have a variable called garden and you can store the value of 10, okay, but if you want the mass to be displayed, add the dollar before. the variable name is fine so this is the echo command and there are actually a lot of advantages to this command and I will talk about the other features and the other places where it is used later in the session, but until then this guy intro is enough for now, okay, so back to the slides, what else do I have?
Okay, so we have the correct su command, as well as test, su is used to switch to the root user. Okay, so superuser permissions can be used to execute commands. okay and then you have their username used to switch to a different user and then you have the sudo command which excuses only that particular command with root or superuser privileges. Now what these three essentially mean is that you get what permissions, so if I go back to my terminal, so if you remember, I logged into Ascend Doors with the adraka user right, so it's shown here as well, so what you have the edrick act localhost right as well as the username of this account and similarly you have something called as root user okay this is my user and then you have the root user and what is the root user is that the root user gives you a lot of permissions, so it's like the ultimate superuser of this particular system, so basically if there are any folders. my user can't access that ok my username is Ed Rekha and if I don't have bomb shion to access that particular directory or that particular folder then we can use root user because root has the maximums privileges, so any command that is executed with the root user then that will be executed fine, because root has all the privileges, it has all the permissions, so that's what the root user is and you know there are certain functionalities that they need the user su or the root users or the Commission and me.
We'll show you all of those things later, but for now what we need to understand is that by just giving su you can switch to the root user and it will ask you for the password, of course you want to know what your root user's password is and when you provide the password , you'll be logged in as root, so you're no longer in Eureka, okay, and as you can see here, you're root at a low shutdown speed, so this is the hostname and this is my username, okay, root, so before. You can notice there was a dollar sign, but now it's the hash, so basically this hash tag represents that we're inside the root user and we're accessing them, you know, running commands as the root user, so that's what it means. .
If you want to exit or exit the root user, you can just type exit and hit enter, so now we're back to being yourself, now we'll run commands as a trigger user, okay, and another thing you can do is if you have multiple users again, if you want to switch to one of the other users, you can also give the command su and bor switch to the user, assuming the username is, let's say ABC is the username, then I can give you your ABC space, okay? now since I don't have any user it knows a user account called ABC it will probably throw me an error or tell me it doesn't exist but the point to keep in mind is that if you have any user you can just switch to that user from the terminal using the s, cannot accept your space to delete the user name, so again later during the section there is a topic on how to create and delete users, so at that time I will show you how you can change. to another user from the terminal, okay, so let's leave the personal for later because it's a little complicated if I tell you that now, so I think I've pretty much covered everything about su and there's another command called pseudo, okay, so which basically sudo allows you to run a particular command as root user, so when I give a sudo and LS, what happens is this particular command, the LS command which will list all the other directories or folders in the current working directory, so it will run as a root user is fine, similarly before I excluded the su command and give it a password for that.
The difference between the two is that with the help of sudo only that particular command will be executed as root user, but while with su then the entire set of commands after that will be executed as root user since you will be logged in as user root, so let me show you again, so this was the LS command that runs as a pseudo user, either as a pseudo user or as a root user, but if I just give su and if I give the password, then I go in and I can enter the same details. I can put the same LS command as root user, so basically the type of result I will get will be the same. but the only difference is that the user will execute that particular command so I hope this clears your doubt okay so I'll just say exit and tap to cure the screen and if I go back to my slides I have this read.
Take out the definition, so sudo basically runs just that particular command with root or superuser privileges, and when you give it the photo username it can switch to a different user and when you give it su it can switch to the root user, so that's what I showed. To find out the differences between the three, you first give it your password and then it will ask you for the password. Specify the password and then you will log in as root user and then you can execute your commands. You can dispute any number that comes. you want and then you can exit that particular root access and then exit out of it and if you want to run another command with the root permission that's fine and if it's just a comment that you want to run then you can just give it sudo and then I can fix your command, so I'll talk about these things later, but for now, understanding is the basics and these are the basics, okay, pvw d, echo, su, because all of these things are useful when you go to advanced. concepts, so moving on to the next slide, we have the LS commands here.
Okay, I showed you a command which is what happens when you just enter the LS command, so now there are different options that you can use along with the LS right, so basically, it means listing all the contents in the current working directory, it's okay, and if I go back to my slides right now, we are in the home directory and if I hit Alice here, it lists all the directories that are present in my home directory, okay, so let's go. I scroll down the screen and run it again LS, so now we have desktop downloads and music, so these three are some folders, we have a document with another folder, all these things are folders and these are documents, okay, documents and files , then these are the directories or folders. these are the documents or files, so this is what you get when you run the LS command.
Now, if you go to the slides, you'll notice that you have certain options that you can write along with the LS, so when you say LS path, then you can now probably know to list the list of contents that are in that particular path? Okay, let me go back to the terminal if I say LS and if I say the route where I want to listen to the contents. Well, right now it could be in the home directory is fine, but what if I want to list the contents that are present in the desktop directory here?
At that time I can use the LS path, so what I will do is I will put the desktop right and inside the desktop there are many. other photos, if you remember, there was a folder called LM s, so if I put LM s, okay, this is the correct path, so I gave it LS followed by the desktop path, forward slash LMS now, if I go and talk , then the folders or directories are to be present in the home directory or I will be shown this folder, which is the HBase hive map. Reduce what you see and ping, so that's what LS does and the route now, if you go to the slides, there are other options, so these options can They are also known as Flags, so there is a - followed by a letter character.
Okay, there's one character here which is L. There's a fourth one called A. There's another set of scatter symbols, your author, so all of these are called options or they're also called like. flag we refer to them as flag L or flag or author flag, all of these things are fine now, if you give scum L, what happens is it lists all the contents similar to just giving it LS, but along with the owner's settings, their permissions, and the timestamp. So when we say owner setting permissions and timestamp, it is with respect to the particular folder inside that directory, so let me show you an example of that, by giving LS you have all the different folders that are present in this root directory , OK? if I give LS - L through the same directories or the same documents are listed here, but we have additional options, so we have additional information, so these are the set of permissions that a particular user has, we have different, we have username and we have hostname, we have memory size, we have date, timestamp and all these things followed by the file name, so if you see the desktop or something, it was created in this day and this is its size and all these things.
Okay, so it's called long format. I will explain each of these permissions and what each of them means. What does each one mean? What is a Drakkar here and what is Rekha here. I will explain all these things in a little more time because Before I explain those things, there are other commands that I want to show regarding LS, so in LS, apart from LS minus L, you have LS minus a, you also have LS, so Let's see what happens when we give the flag to. Ideally it would show you the list of all the hidden contents in the specified directory, and then if it sees if you are using the author flag, it will list all the contents in that directory along with its correct owner, so let's try running LS. - first,when we give it all the hidden directories they should also show up so you can see that these were the other folders that were not visible when I gave this LS because LS shows the list of contents that are available in the GUI.
So in the GUI, if you go to the network and if you go to the desktop from the GUI aspect, you will only be able to see these. Well, these are the normal files that are not hidden, but of course there will be many hidden and accessible files. by the terminal giving LS - a command ok that's what this helps to do now if I use LS and if I use the author flag now see what happens it also has the author so instead of having the name user and host. name here has the author of that particular document, so if this is the particular folder or file order document, then who is the author?
It's Drake because I'm the user with rights, so the author name will be present here followed by the size and the timestamp when it was created and all these things and we get the list of contents for all the directories or folders that are present in that particular directory so that's what LS does well guys it's about the author flag and in case I want to use a compilation of these flags and even that as possible so I showed you earlier that there is this flag LS - L and then there is the LS - such a flag - it shows all the hidden contents in that directory, so I let I use a combination of them, so let me say LS - L and a, since there are two flags that I want to use, so I'm just going to use one, symbol for, two flags, so when I do this, all the hidden contents will appear. they will also be shown along with their extended long format, okay, so those are the different folders or directories that happen in this home directory of mine, okay, that is the build of LS - Ln LS - a, so we saw a combination and again of similarly if any of those flags, if I use the s dash flag, it will sort the entire list by size, okay and let me show you an example of that, so we use LS - la right now, if I use s here, it will sort this list complete. of for directories with the size, the larger the next, the larger size will be at the top and the smaller size will be at the bottom, so as you can see here everything was mixed up, this is basically the size lock, so this is Basically, for this block size, if you see the M above and I just ran LS - la, then it was in a different order, but since I ran LS - la and capital S, this ordered the result depending on the size of the blocks.
Of the folders, the folder size is shown first and the lowest extends last, so about LS - s, there is one more command that I want to show you that can be executed with the help of CLS command. we run the LS - L a and s indicators correctly, so we ran this one earlier. Now what if you want to store these details? Whatever the result is here, if you want to store it in another file, how will you do it? We have a choice. for that, okay, and that's a symbol larger than the symbol, okay, it's called direction flag, input, output, direction flag and by using this flag, whatever the result or the output of the command that comes right before this symbol, they will be stored in the file preceding this symbol, so let's say you know I want to create a new file.
I'm going to create it. Okay, I'm currently in the home directory, so let's not run it here. What I'm going to say is that that means first change. documents directory okay here of course I don't think there are any hidden documents 0 so no photos so what I'm going to do is LS minus l KS okay and I'm going to run this command. in the home directory slash ed rekha ok, basically I'm going to run the same LS, so I'm basically going to get the same results. I will run them specifying this directory and I will store this file inside my new file ok now let me name that file file1 dottxt okay now the reason I moved to this directory is because I can store the files in this directory.
Well, if I hadn't moved to veteran, I guess I ran this LS minor delay s followed by this address, then what would have happened is that it was created. this new file in my home directory is fine, so if I hit Enter here, there will be a new file that would have been created directly in my documents. Okay, now when I run LS inside the documents there was no folder, but now let's run LS, so now. You can see that a new file has been created and it is now called file one dot txt because I used this address symbol nothing but the greater than symbol and when I do this, any output that is generated from this command directly from these options in these flags, they will be stored in a new file and the file a must be specified here, okay, so I used the wrong commander, it's not LS, so what I'm going to do is let me see that file, okay? to view this particular file or any file we have to use VI editor or we have to use a G edit editor or we can use cat command.
Well, now the most common one is the VI editor, so let's just run the VI and open this one. The file here is fine and the reason this LS file didn't run for us is because it lists the files correctly and this is a wrong dose. PI made a mistake by saying LS and not making a directory, so I used VI instead, that's why I didn't come, but anyway, if I give VI and the file name, that file opens correctly for the files to be created. files and this file has the result that was shown above, okay, basically what was generated by LS and Flags of LS for that result. instead of going into the terminal, it was stored in a different file.
Okay, now let's get out of this VI file and explain the same. So what you saw inside this file1 dot exe file, the content is the same as this. Okay, so let's continue. the same LS - LS command but instead of getting the output in the terminal we gave an address command here to save it in a different file and we stored this file in the start slash in a log directory, okay, now suppose if I want to store this file in the same directory even that can be done okay no big deal so this is the correct command so if I delete the path here what happens is what is the result that is generated from this option. and this command will be demanded in the file at dot txt inside my home directory.
Okay, if I'm inside the documents directory, so let me go back a bit, so now I'm inside the home directory, so here if I run that. command, okay, then a new file will be created with the name file 1 dot exe and it will have the same details, so I did that and let's see what the content of that file is, okay, so that's good, now you can lean in. This way, any result you have, you can store it directly in another file, so it's very useful your command for any and option, and I'll talk about more advantages like this later, okay, for now I just wanted to show you how direction works, so going back to my slides, I think I showed you how to work with the LS command and in the previous slide I showed you the basic commands regarding the current working directory and the clean directory and the sudo and echo commands.
I'm also done with LS and now I'm going to show you how to work with the CD directory, so some of the city directories that I showed you earlier I also showed you how to change to a new directory so that when you write CD. I'll just change the directory to the home directory, okay, so the home slash, a Drakkar slash, okay, note that it's my home directory, my home directory is set to that path, so if I release it, it will go to that particular home directory and similarly if I release it. know, give even the CD and space tilde symbol, as you can see even this command will change the directory to the home directory, but however, if you give space to the CD, this bar will change it to the root directory, so change the current one directly to the root directory, that's because the forward slash here represents the path that I told you several times before, that's fine, and if there is any other path or any other folder you want to move to, start from the root to specify the absolute address. okay, you start from the root, you say slash and then put the folder name, again you say slash and then put the next folder name, so it's similar to the first four bars representing the root directory and the subsequent bars they are to differentiate between different parents and subdirectories so that's what they are so this will change it to the root directory and then you will have the CD - double dot marks are fine - dot symbols and when you hit the CD space dot right if you give a colon to CD space dot dot then it will change to the parent directory so suppose I am inside the desktop directory so the parent of the desktop is the home directory so it will change me to the home directory, but suppose if it were inside, let's say the family site or that record or that receipt. and if c-span was B, running see space dot dot from the C directory will change me to the pan directory which is B, so that's what it does and then we have a row command here which is CD in quotes. now we have some kind of path, this is useful in times when your folder name or your diet name has two words in it, okay, so if you have towards then, if you have a space between them, the space will be considered as an argument, okay, then terminal. reconsider that has an argument so if you want to change to a document in that kind of situation you know or if you want to change to a directory that has a space or a document that has a space in the middle then in that situation you can use quotes single or double quotes, okay, so, you know, you also have to feel comfortable switching to double quotes, so I'm going to explore all of these things and show them to you.
Well, first I'll show you the series tilde and then with the slash then with the dot mark, this of course I also showed you before and then I'll show you how to change to another folder with gnome. It has two different names with a space in the middle, so I'll go back to my route, so right. now we are inside the home directory so if I give CD - desktop it's okay now here we have my other directories and if I do CD and LMS I'm inside the LMS directory it's okay now from here if I go to CD and if I use the tilde option at that point it will change me to the root directory, then C, then the tilde symbol from before is fine, then the circle a symbol represents a root and as I set the directory it changes to traditional, which implies a root , it basically decodes it as a change directory. to the root directory so when I did that I automatically switched to the root directory while here it was LMS, similarly if you are in the items directory and if you also press serine on the right, if you just give this command, even this will change you. to the root directory, so basically CD and CD space tilde are both the same, but however, if you give it CD with the forward slash, it will change it to the root directory, so when I go in, as you can see, I'm in the root directory.
So if I go to LS here, I have a list of directories that I showed you earlier, so in the Indian file system, yes, and within your file system, if you open this folder, then you have the root directory, so inside this directory you have a startup monitor icon this is where the desktop and documents are pushed as a subdirectory to this main directory. Well, this is the root directory where everything is stored, so any document or folder in your operating system can be referenced or can be accessed from this root directory. Okay, now back to the terminal, let me show you an example of that.
I already moved to the root directory. Now let me say CD and okay, we have this, so now when I hit the CD space belt, then. it moved me to the bin folder inside my root directory, so I ran the root directory, edited an LS which listed the list of folders inside my root directory, these were the boot depth options, these are all the different folders and when I said change directory to compile it it changed me or moved me to this particular folder it's okay inside the root directory so now I am in the bin directory and inside the bin directory I ran the LS command which basically means listen to all the content , whether they are documents or they are folders or directories, all those would be listed fine, so this is the list of all those contents in the bin directory.
Okay, now that we're in bin, let me go back to my root directory by double dotting it. Well, from bin again. I go back to my root directory, so this slash represents the root directory like I told you before and if I do two LS, then I go back to this directory where we have been at the EDC home and development home andthey are copying, if they are the same then it will not be copied and they are only copied when the content is different so at that time we will have two different files with the same name so we have advantage with the CP and the u flag, okay, like this let's try to execute these options correctly, so I'm just going to continue.
Back to my terminal here, so first and foremost, let's run our flag, your capital R, so keep that in mind and then say Enter so that the item is copied, so if you go back to your Documents folder, you can View it as a new folder called Items. has been created so initially it was not present and it is present now okay now what we will do is delete this okay I am going to minimize this run the same command along with virgo and slide well so you can see the While So the system status was also displayed even though I entered my text somewhere here, yes, here it is correct, so this was the previous command that I executed without the detail, okay, here in this traitor, it copied the file, ok, the LMS, sorry.
From the LMS folder to the My Documents folder, from the modern angles, the information message also arrived correctly, so the step by step process of everything that is being copied can be copied, so first this was the first photo , this was the first subfolder that was copied and then all the other files that are being copied each and every document step by step, that's it, let's sit down and get all those details here if you give it a minus V in your command , so that's what the minus V does, so I'm left to show You have the I and ru flags, so what I'm going to do is say I didn't want to clear the screen now.
Okay, I'm going to delete this command here and go back to the Documents folder and show you that the LMS has been copied fine with the detail when I created this folder. Okay, now what I want to show you is that I'm going to show you the copy with the interactive mode, so before, if you see the desktop, there is already a text with car dot, so what I'm going to do is copy cars or text . I'm going to copy this back to the desktop right now. Know? I'm going to use an AI flag and it won't overwrite the existing one. dial so now I'm going to say CP autos dot txt to destination is home slash ed rekha slash all right now I think I'm in the wrong directories right now okay so I need to go back to a path switch to documents right now here I need to copy the cars from here on the right and put them on the desktop so that at home I have a spreader bar.
Desktop, okay, so I'm going to copy the cars or TXE here, so when I go into the cars or the taxi it's been copied again, so let me go back to my desktop and see that even though I've run the round of this comment twice, once now, once before and once now, just a couple of seconds ago, no duplicate has been created, that's because this file has been overwritten, okay, but the one with the name cars is has been overwritten by the last command, so what I'm going to show you now is I'm going to use a nice flag here, like I told you.
The flag is what takes them into interactive mode, so it's going to start interacting with the Linux kernel or the UNIX shell here, so it says home to Drake, our dot txt desktop car, it says overwrite, do you want to overwrite this particular file? This is already present if you want to overwrite. if you say why and if you enter then the file will be overwritten okay but if you give N and enter that file will not be overwritten so if I say and no and if I enter that copy would have failed okay but if I do.
Same thing again and if I press Y, it will be overwritten and the Robin file will be overwritten, so that's what the I flag is and then you have another option, okay, off the ends delay, so the N flag is it. What it does is not overwrite. the file by default, so for that option I told you that by default it is overridden correctly, so I also showed you earlier that no duplicate was created and the existing file is overwritten, assuming you don't want to do that, then you can use the N. flag which would automatically prompt and tell the fancy runtime not to overwrite this particular file, okay, so that you can have any number of files there even if the contents are different here, okay, even in case the new file being copied has a different format.
The content is fine, but it has the same name, even in that case, by specifying file N, it will not be overwritten because there is a good chance that you made changes to the last file and copied another file with the same name into that. same directory, then there is a good chance that you will lose the changes that you made successfully, so at that point you can use the N flag. In fact, let me show you that with an example, what I'm going to do is Right now we are in the document directory, so I'll do a chat and cars.
Well, these are the contents here and let me update you. What I'm going to add is add another company from another. Rob Pike, okay, let's say we're adding KTM to that list, okay, so when I do Ctrl D and exit interactive mode and if I chat with the cars text, then KTM will be added here. Okay, now these auto files in the documents right now are the updated one okay, but on the desktop the updated file is not present. Well, on the desktop, the file with just this amount of content is there. Now I'm going to execute the command with the N flag.
Okay, with the N flag it basically indicates. which you are not supposed to overwrite the file then when it says that when it discovers that auto dot txt is present there also on the desktop it also does not copy the file at all so when I go in and of course now there is nothing here if I go to the desktop okay if I click on cars or txt or you can see I'm KDM it's not present but however when I close it and remove the N flag correctly so I remove the slag and run it and if I go back to the cars or TX, I will find that km updates amazingly, so that's the power of this n slide, ok, that's the end of all the different flags that I was about to show you from my DVD.
Well, there's also something else I want to show you. Now I show you how to copy from source to destination. Now you know whatever it is, you know the route or something and you want to copy it. to your current directory to where you are currently, so this is basically, I'm just showing you this option, you know, say at some point you might want some shortcuts or some tricks. I don't want to provide the full path everywhere, so in those situations, in those scenarios, you can use this trick and let me explain to you that before I run it on my hearing terminal, what I'm saying is that now I'm on my desktop and I'm just I have my cars and my readme text files.
Okay, now, but in the My Documents folder I have three more Tech, a 500 X C and Phi - dot txt. Well, let's say I just want to copy the file to a txt. What will I do if I want to copy my dot txt file to my desktop? I'll have to check my documents folder, then put in the CP command and then enter the file name and then copy it to this folder. I have to specify the path of this desktop, so instead there's a walk there, okay? Instead of doing that, what I can do is just go to my terminal.
I need to go to the desktop folder first, but okay, so I'm going to take a step back. I'm going to say switch to the desktop and here it is. there are only cars or TXE and there is a readme file dot txt. Now what I am going to do is run the CP command so that it copies the file from this particular directory to the current directory, then the file - tor txt if you remember that it is present in my documents directory, then I am going to specify the path to the documents directory and the path to the documents, a curious / boom Arica and the documents are fine and the file name is r5 - dot txt, okay, I want to copy this file that is located in this path to my current directory.
Okay, in Java, I have to specify my entire current directory. I can give just one dot so that this dot represents the current working directory. Okay, so I'm currently on my desktop and what this command would do. What I do is copy this file into this current directory. Okay, now when I hit Enter and if I go back to my desktop, you'll see that the file - dot txt has been created. Well, that's what went down this route. this file and pasted it into my current director so that's what it's about okay this is what I want to show you guys this was something extra that wasn't there on the slides so I'm done with that so let's move on to the next slide, okay, next thing we have is the move command, okay, so MV like CP means copy the MOEs and so it moved, okay and this is the user when they want to cut and paste something is well, this would happen when we use copy, then the original copy of that file was also present in the existing directory and it was created in another directory, but if you use the MV command, then I Basically, I am going to work as a slice phase in the which will delete the contents of the so directory and the only copy will be present in that destination directory.
That means starting right away. Not much explanation is needed here because it is its own. -explanatory, if you use the I flag, you basically enter interactive mode again like before, so the u flag is again the same as it was in the copy command, it updates the destination file only when the source file is different of the destination file and the mb-V again, it would know it moves, it would print the system status, ok, it will print the source and destination files, it enters the interactive mode where the remote control ok, not tracking, basically it means that the system status will be displayed here, ok, that's how detailed it is, so let me go back to my terminal and show you how this copy is done.
Okay, let me clear the screen and I'm currently in your desktop folder, okay, and here I have these files, I have cars or txt. and readme and file2 ok, now what I'm going to do is use the Move command to move the file to dot txt to another destination. I'm going to move it to the right LMS, so when I hit the LMS ok. this means that this move command will work so that this file is moved to the LMS folder. Ok, let me log in and go back to my desktop and find that it's not missing, because I run a command there if I go to LMS whatever.
I'll find the file with a dot txt here, okay, cool, so that's what the MV file does and let's say I want you to know something similar to copy, yes, you can move multiple files at the same time, okay, so I can move it, you know, assuming it goes. I go back to my desktop, okay, and I'll find that there are cars and I actually guess I want to move both of them to the LMS directory, so I can do that and I can also just move. I can give it cars or TFC and read me dot txt. and specify the destination.
I can move any other folder or I can move to any folder if I am moving to LMS folder then I just need to give ok but however if I move to another folder then I have to start from root say home. Drakkar and from your let's see, I want to go to downloads, okay, so downloads, if I want to go, I will give you this route algorithm, enter and if you notice that both are missing from my desktop and if I go to my trake and if I go For the downloads, I can find the two files here, that's how the Simulator guys, that's the move command and if you want to see the system status, you can use the V flag like we used for CP, so it will generate and display a similar record.
If you want to enter interactive mode, you can use the I flag. If you are moving as two files at that time, you may need the interactive interactive fight, similar to copy where, if we are moving to the destinations folder where there is a there is already another file with the same name, then at that point you might want to use the I flag. It will ask you if you want to override it or not, if you don't want to override it at all, then you can just give the N slack. but again, if you also don't want to use the N flag, you can use the minus u flag, which would update the destination file only when the source and destination files are different.
Well, these are the different indicators that can be used. with mV so basically the flags that we can use are the same as the flags that can be used with the copy command so guys that's it with the move command and we can go to the next slide ok we can go to the next topic. but before that there is one more functionality I want to show you regarding copy and move. In fact, I forgot to show you this aspect. Okay, now let me first show you what the GUI looks like. Okay, I'm going to my edge, Rekha. and if you were next to the documents, you'll find these three text files and also my LMS folder right now, either with the beat copy or beat move commands.
I'll show you how to copy as one file, two files or three files, okay, but what? We have like 25 files? So what do we have? I mean, just think about this. What if you are a proper Linux user and want to simply transfer all your files from somewheredelete the folder so it's fine, so inside this folder 3 I meant and deleted the folder so it's fine. now I will show you how to delete multiple folders at the same time, now let's say I am running the same process to delete that tree again so I will say delete folder 2 and when I went in it could not be deleted. folder 2 because the directory is not empty, do you know what the problem is?
You are saying correctly because the data tree is not empty, it cannot be deleted, because folder 3 is contained within the folder; cannot delete this folder so if i want to delete one folder also then what i have to do is first i have to delete folder 3 and then delete the folder so i have to provide absolute path of child directory ok , then I'm going to say delete directory ok, same as before, I'm going to say folder 2/4 - 3 when I run this command, then my folder 3 will be deleted, okay, the child will be deleted, but the parent will still be active, the folder 2 will be active, ok, because when I use the rmdir with folder 2 and photo 3 only for photo 3 to be deleted.
Let me show you why that is the case. Now you have to enter when I do an LS for the 2, it should be available. Look at the photography tool available, but when I make one. folder - there is nothing here, ok, there is nothing here, so if you want to do that, if you want to delete both the parent and the tiles at the same time, you have to use a flag - P, so let me show you how to use one - PFLAG free, ok, so I'm going to do picture 3 now and show you how to use a P flag, similar to how we use it when creating a folder, we have to use the same delete directory, ok, rmdir. with - P and photo - and folder 3, folder 2/3, so in this case both folder 2 and parent and child folder will be deleted, ok, enter when you do a LS.
I don't have a folder, this one is fine here. is also deleted so that's what a flag does - P now allows me to create a new directory and what I want to show you is the verbose okay so I'm going to create a directory so again the ones that I deleted have come . above again it would have been created again so I want to show you the use of the detailed directory when it had to be here, as for the slides, it said write the detailed so when I add a we here and when I press Enter, okay, awkward and immediately. again to delete the directory, now it's ok, when I say I deleted Factory and when I try to print the detailed text, PS, then it says that folder 3 was deleted first, ok, that is the answer and internal folder, after deleting it , wine and deleted folder - ok that's what it's about this is what you know you need to know about directory deletion commands now let me clear the screen so guys now let's see how the RM command works ok now your arm command here and On the slides it says that it can be used to delete even non-empty directories.
If you use RM with dr slack and if we use R and P flags together, it will remove non-empty directories, which will decrease including parent and sub. Directories are fine, so the only limitation we had with the rmdir command was that we couldn't delete non-HEPA directories. At first we empty them and then we just delete them. Otherwise, we had to specify the full path and then you know, use the b-plane. to delete all the parent subdirectories and all the child subdirectories in that path, that was the limitation we had with the RM directory delete button, we don't have any problem because, let's see, okay in LS, we have so many folders, okay, so yes I try.
I go to f2 ok and do a LS your app three different photos photo 2 4 3 4 4 ok now if it is a rmdir command technically it cannot delete this folder called f2 f2 is basically a non empty directory inside f2 there are other directories like folders 2 3 and 4, so let me show you once that inside f2 we have 3 folders, folder 2 4 2 3 and 4 4, so with the command are dir we cannot delete it definitively, but with f2 we have the possibility to delete it, ok, that's because We can make use of our flag here, okay, but however, this will also read F2 and its subfolders, so let me do a LS and if you can see your initially under photo 1, we had F 2 and these 3 , okay, but now Don't have it in F 2 because the photo from F 2 will be missing.
If I go back to my folder 1 here, you will see that F 2 is missing here; that's because on delete right it deleted the entire folder F 2. even though it contains some folders it's okay and that's what our flag does, that's the advantage of using our flag so if the same is that we use art slack with the V flag, then it will print the state and it's also like the verb. was ready to print, it will tell you what will be deleted and how it was deleted, so that's the advantage of using RM/rmdir. Okay, sometimes this is more beneficial, so I'll clear the screen and go back to my presentation.
I'm done with all the concepts in this regard, so let me move on to the next topic. Well, the next topic will be working with user permissions. Well, it is very important for a Linux administrator to know what these user permissions are. are fine because different files will be there, their different directories will be there and he has to determine what type of access will be available for what user right, so that's the control here, so the different permissions are basically read, write and execution, okay R. to read W means write and execute is X, okay, initially you get this kind of output, you know?
Let me go to my terminal and show you what happens when you run a command LS LS LS minus L because user permissions are something that will appear that you can control through the LS command - L because when you do that, all the different contents of the files, whether it's a directory or another file, all those things along with their permissions will be visible and will be in long format, so let. First I go to my terminal and go to the CD. Now when I do an LS, I have a list of all these documents, but however, when I do an LS - L, I get it in long format, so I get something like this. for each folder I have the permission set, so for the desktop I have the permission sets and then I have the other components.
Okay, I'm going to explain what this whole component means, what this whole row means, so don't let yourself get too complicated first. I'm going to explain just this part, okay, the first 10 characters, if you see here the first 10 chapters of these, I'll explain this part first and then I'll explain this, set these three blocks and then Alex the remaining blocks, okay, so let's get back to this. The first block on my slides you can see that the first block determines what the file type is. Well, it's a type of file or directory. In fact, if it is a directory, then it would be represented by OK if it has a D as the first. character here then that is a directory, okay, as it says, but it can also be anything else, like this, then it means that it is a normal file, but in the first letter, if it is C, then it means that it is the file special character. and if there is B here in this part of the first letter and then it is a special binary file, then basically there can be four different letters here, it can be a - or D B or C representing four different aspects, so that is the first information that you have on that particular file and then you have three different blocks, so the next nine letters I want to determine the user's permissions, and those nine are divided into three, three, three, so the first three represent the user's permissions, okay ?
The second block that has three rwx representatives are group permissions and the final block represents other permissions. Well, this means other users. Now this user is the actual user logged into the system. Okay, that particular user, so these are the user permissions. This is the group. permissions to which the user belongs and what the other group can see and this is with respect to the other users, okay, that's what "others" means, so if we have and the order always goes by RW x + RW X and here also BR W and file owner or user as read/write and execute permissions are fine and in this place if there are three characters to the right RW and that particular file, okay and if there is RW and a default group that will be assigned so that all users have a part of that group will have read, write and execute functions, but while the last three here represent the consumption of other users, so it can be multiple users, the same system can have multiple users, one of course will be the root user and the other. be the owner or you and besides you there can be any number of future ones, they can be your friends, your colleagues or you know other people, then these others represent that and if you have a blank space somewhere, that's fine , in this case there is a blank space. here in the state of W there is a blank space it means these others don't have the right access they just add the read access and the execute access and similarly if you go back to the terminal it's fine and if you see take it. the example of this particular file, desktop, okay, the Desktop folder is where we were running a lot of commands, it's under the editorial folder, so yeah, this was the folder we're talking about on the desktop right now, It's our board basically, okay, everyone agrees.
So these three characters represent that the person who is using it is fine right now, the person who is using it because I am logged in right now and I am logged in with this username, sorry guys, yes, and I am logged in with this username. right in raiga, so I am the owner and I am the user. I have read, write and execute permissions, okay, but the group I belong to is okay, that group does not have read, write and execute functions and the group this file belongs to now because this file is owned by me or use me, it's okay now because I am the user, I have this access and then this file will also belong to a group right, so whenever I create this file it will be assigned to that particular user who creates it and it will be assigned to a default group, so we're talking about that group here, okay, and that particular group doesn't have the three rights, it only has the read function and the execute function, it doesn't have those. you have the write permission that's fine and the same can be said even for the other users so the other users on that system will use that system they will only have read and execute access on the desktop that's fine but if you take The example of this file has a right txt dot that I created some time ago during this session, this one if you see that the functions are such that the first one is a... well, what... technically it means that it is a normal file.
Okay, I explained to him that... it's normal. B means binary special file and T means character special file, so of course we don't have those options here, we don't have the BNC options, but what you need to understand is that this is a normal file and this is a directory, right? OK? there is D so since this is a file the access for the user is such that I have read and write access but I can't execute it, the user cannot execute it and when it comes to the group even the group has the read and write access but you can't execute it, the other users however only have the real axis and they can't execute this particular file properly so they can't execute it or they can't write this particular file so that is what this group allows me and if you go ahead from group permissions there are more blocks, so let's go back to the slides and see what they mean, so on this slide let's talk about the next three blocks.
Okay, the next block is the data phone number. Well, you have a number here. and that represents symbolic links, the block after that is the one that represents the owner name and the 1 followed by that represents the group name, okay, that's with respect to D 3 blocks, okay and then comes the size of the file. of the particular file and then you have the timestamp of the time the file or file or folder was created, this is the actual file size of the blocks, okay, that's what the user permissions represent here , so if I quickly go back to the terminal and show you this is basic the symbolic link this is the owner name this is the group name of the file this is the block size okay and this is all in kilobytes okay and this is the flag time and this is of course the name of the fileright, so we have the file name and that file will have first the file type, then the user permissions, then the symbolic links, then the owner name, then the group name, then the file size and then it comes the timestamp at the end, so that's the difference between the file.
The permissions are read, write and execute, and if you want to modify any of these file functions, that is also possible. Okay, now let me go to my slides and show you how that's possible. Let me show you some theory. Well, first of all, if you want to train the permissions, you can use the chmod command. Well, you can use the chmod command as shown here and to change the access permission of both files and directories if you want to change the owner of the particular file. since the owner of that particular file or directory then you can use CH own command and then if you want to change the group ownership of that file there you can use chgrp.
Okay, when you use the chmod command you must specify who they are. Do you mean the user? Do you mean the group or do you mean the other people? Well, the other users you have to say that and then you have to use a plus symbol or a minus symbol. Is it okay when using more means that you are adding these two rights, so in this case when you say g plus WX, then G means group right, as you can see in this particular slide, G means group, u means users and others means oh okay and everything means okay so ask for this if you're using G here then it means you're talking about the group and you're adding the W which is a right and the run function you know , that means that you We are giving them the W and the right and the additional functions, okay and after specifying the file name, this means that you will modify the functions for this particular file and similarly, you can use the equals symbol a and also the minus symbol. so when you use the equal to symbol, any rights you have in the industry will be overwritten, so when you say chmod u equals r WX and then it doesn't matter what the previous set of functions is, then we are the previous of The informations will be replaced by whatever you specify here, so you'll configure that particular user to have read, write, and execute access to that file, and then you'll actually be able to specify if you know you can configure access control for multiple people. for groups of users all at the same time, so here this command will set it to the usual.
Here we set it to read, write and execute for the users and then we set it for the other people, it's fine for the other users. they are removing the right and run axis okay there are execute permissions so let me quickly go to my terminal and show you that so currently let's take the example of images okay let's take an example of this particular folder , the user that I am I have. the read, write and execute functions that the group has read and execute only are fine and of course the other users also have read and execute only.
Now what I'm going to do is say chmod, I don't want to. to change my permissions, okay, so I would prefer to change the permissions that my group has, so I would say that g equals read and W is okay, so if you see here right now, the group has read and executed, okay, I don't want to give are executed so if I want to delete I can give an equal to what I would replace. this list is complete with the current arguments, so instead of having our own What I'll do is say Oh, run because I want to give others read-only access.
So in this case, when I do this, the I've specified what the permissions are and what the recipients are, Amaral gives the file name, so let's say the images are fine, so I'm going to group. the LS minus del command again and now you can see that if you go to the images it has been reset so that the others only have read access, the others are blank, okay and the group has read and write access and this execution is has removed from them, so it's with respect to the read, write, and execute permissions that users can have, so I'm just going to clear the screen and go back to my slides so that, similarly, you can change the ownership of certain files and certain groups. okay, so if you use a CH of your own, okay, CH changes the property, that's what it means and when I followed that with the username and the file name, then this particular file will have a new user or it will have a new and this would be the username.
Okay, and similarly, even the group command works the same way, so this is something you can always work on and you can figure it out. Okay, guys, that brings us to the end of part three of our demo. Well, we still have a couple more topics left, but unfortunately I don't think we can cover them today because we have already exceeded the time limit, so what we do is continue with the remaining topics in tomorrow's session. Well, in tomorrow's session. We'll talk about tar files from Linux repositories and Raman variables, regular expression processes, adding users and networking, managing work, it's all about SSH, so these are the topics I'll cover in the morning session.
Well guys, on that note, let me move on to today's session. session good and I will see you all tomorrow at the same time okay guys ok a great month like you tomorrow ok good night friends see you I hope you enjoyed listening to this video please be kind enough to like it and can you comment on any of your doubts and queries and we will answer them as soon as possible to look for more videos in our playlist and subscribe to our channel Eddie Rica to learn more happy learning.

If you have any copyright issue, please Contact