Basic Linux Tasks

hello again as you know I’m Eli the computer guy over here for everyman ITT comm today’s class is basic Linux tasks so so we’ve talked about where Linux came from and the introductory class in the installation class we showed you how to install Linux and now we are going to go over the basic tasks that you can perform in Linux we’re going to show you how to install applications how to update applications how to look at basically something called a task manager and kille processes if necessary how to start services and a few other things so these are the basic tasks that you will need to understand in order to do anything else in Linux so this is the basic stuff right here everything that I’m going to be showing you today will be on Ubuntu Linux server so this is not the desktop version this is a server version you’re going to be looking at the Louie the line user interface we will be typing in commands so there’s no right-clicks there’s no left clicks there’s no fancy graphics you’re looking at a black screen with a whole bunch of letters on it you know the old dos prompt but remember that this may seem this may seem a little daunting but understand as I said before in the other classes in the Linux world everything all types of serious administration in Linux has to be done at the command line at that Louis that line user interface even if you are using the desktop version of Ubuntu Linux it does not give you the full power of the operating system so a lot of times even if you’re using the desktop version you still have to open up a terminal screen and go in and type out all the commands that you need to type out to administer the system so so with that give me a second we’re going to dive into this like I say today’s class is all the basic commands that you’re going to have to understand in order to start administering a Linux system so the first command that we need to talk about before we start doing any of these other commands is the command called pseudo suda2 and the previous classes I talked about how different distributions of Linux do things slightly differently and that all every single distribution of Linux has its own quirks its own little ways of doing things depending on what the the creators were worried about well one of the things that the creators of Ubuntu were worried about was security as we talked about before it all Linux computers there is a user called root root is the highest level user on the computer kind of like the administrator in a Windows computer well just like on a Windows computer if somebody logs in as the administrator or if somebody logs in as root on a Linux computer they can do absolutely anything they want to that computer so that they can install viruses they can put in malware they can just cause a lot of havoc basically hackers using special programs and scripts can also try to log in as root and you know cause all these problems so what Reuben 2 did way back in the day is they decided we never want anybody to be able to log in straight as root so in ubuntu linux you cannot log in as the user root in other distributions of Linux you can log in as as root in Ubuntu you are not allowed to log in as root well here comes a problem since you can’t log in as root well how do you do all these administrative tasks how do you run administrative processes well what they have is this program called sudo so what this means is Super User which essentially means root do so it’s you know in Windows how now with windows of vista and with windows 7 you can right-click and you can do run as administrator basically the sudo command is run as administrator so so if you’re going to go and install a program like talk about in a minute the the command for installing the program is called apt-get well if you run apt-get nothing will happen because you don’t have permission as your user account to do advocate so what you would do is you would say sudo apt-get etc so basically the main thing that you have to understand with the sudou command this is superuser do is that in ubuntu linux this distribution you are never ever ever allowed to log in as root but root is the only one that’s allowed to run a lot of these different processes or services so what you do is you run the command sudo and then put whatever arguments are behind that so that’s what

su do is it allows you basically to run commands as administrator if you’re thinking about it from the windows world now the next thing we need to talk about our man pages so M a n man pages stand for manual pages so what you have to remember with man pages is that I think these actually came back for from UNIX that was created back in the 60s and you know Linux was created in 1994 so this was long before the internet so you know as we talked about before if you do not understand how a command is supposed to work or what command you’re supposed to run you’re kind of stuck in Linux at least with a server version because you just had got this little blinking cursor so if you don’t understand it the command or the arguments well you don’t know what to put in so what they did is they came up with something called man pages with man pages what you do is you type in man and then the command that you want to figure out let’s say so man ping if you know anything about computers you should know the ping command what this will do in Linux is it will open up a page that will describe to you the ping command and everything that you should know about the ping command so it’s pretty cool so if you’re if you’re trying to trying to figure something out basically all you do is you type in man space and whatever the command is and that will open up a manual page for you and you’ll be able to read about whatever it is you know if you you know ping or app to get as we talked about that kind of stuff you can just plug that in and like I say it’ll give you the arguments and some of these I Miriam are almost a book I mean maybe 20 pages on all the thoughts and processes that went behind whatever you know command you’re you’re trying to run so that’s what man pages are nowadays you know in the age of the Internet personally I find a Google search is a whole hell of a lot easier than trying to do with the man page but you can do with the man page basically this is like the old question mark command in the windows world now here’s going to be like the the sucky part is again Linux doesn’t explain a lot of things to you it doesn’t make things necessarily very easy so when you go and you type in the man commit command and then you go into ping you’re going to get this whole page of text and got to tell you about the pink command well then you’re not going to know how the hell to get out of that pig they don’t make it very very easy you’re going to hit escape and that’s not going to do anything you’re going to hit other keys that’s not going to do anything in order to exit the man pages you need to type in the letter Q for quit when you type in the letter Q for quit you will drop out of the man page so this is one thing my golly like I say for me I mean it’s just driven me up the wall you know what I’ve tried to learn Linux is is all these stupid little commands so you open up the man page you figure out everything you need to know and then you don’t know how the hell to get back out of the man page well the way you get back out of the man page is you type in the letter to your type in the letter Q that quits the man page and you’re back to the command prompt so let’s go over to the computer right now and I’ll just show you how these man pages work really quick so here we are at the the login screen for the soup onto server so we’ll just log in you know Eloi Eloi password one two three four five six and so we are now logged in to the Xubuntu server you know we’ve got this nice little little cursor you know just blinking at us and as I said before this is all you get so if you don’t know what to do with this cursor you’re kind of screwed right at the moment but right now I’m going to show you how to use the man page command or the man command so like I said all you do is you type in the command man so it’s M a n and then space and then whatever command you are interested about learning so so I was talking about ping before so we’ll do p ing and then you just hit the enter key and now look at this this gives you everything you could possibly want to know about the ping command ping uses the ICMP protocols mandatory echo request data gram to elicit an ICMP echo response what are the options audible pings set to debug all this kind of stuff so this is talking about everything you could possibly need to know about the ping command now like I said if you want to drop out because you’re looking at this then you know this isn’t the windows world where you have like a little little X that you can click and it closes out if you hit escape nothing’s going to happen here if you hit control-c which is supposed to normally get you out of things like this that’s not going to help the only thing that will help is if you hit the letter Q and I don’t know if you could hear that I only only hit one one letter but it’s not Q enter it’s not

shift Q it’s not like the edge is just Q as soon as you hit Q you will come back and you will now be back at the command prompt so we could look at other commands so we could say man apt-get as I was talking about and now this will tell you everything you need to know and probably a whole hell of a lot more about the apt-get command and like I say I mean this is some of these commands it is absolute books that it’s talking about so so here’s all the stuff about the apt-get command so as I said the man the man command is exceedingly easy all this is is the manual page the manual page is of course what describes you know it describes the command that you’re trying to run all you do you type in use the man command as ma n space whatever command it is that you’re interested in using let’s say a man man the man page for man and then in order to get out like I say because I mean you’re look at your look this is a screen you’re going to get and you’re going to hit escape and you’re going to hit control C you’re going to hit a whole bunch of stuff and you’re still going to be stuck here and you’re going to want to throw your computer out the window but before you throw the computer out the window all you have to do to get out of the man pages is hit Q Q is the answer you hit Q and you’re back at the command line and you can run another command so that’s the man pages let’s go back out to the real world and talk about the next command so those are the man pages and pretty simple like I say as long as you remember q as long as you remember Q man pages are wonderful things if you forget about Q oh yeah you just want to throw the computer out the window but but that those are man pages like I say they can be very useful especially if you just need a quick little bit of information or if you don’t have an internet connection it’ll really help the next command we need to talk about is task cell tasks cell this stands for task select this is part of the Ubuntu distribution I can’t tell you if it is part of any other distribution but I know it is part of a bun to distribution now a bun – like I say is is trying to become the premier provider of Linux distributions they’ve really done a lot of work there just it is very good as user-friendly as Linux ever is etc so one of the things they came up with was this program called task cell or task select the idea was when you’re trying to set up an Apache web server or you’re trying to set up an email server or you’re trying to set up a virtual server you see each one of these types of servers requires a number of different programs in order for it to work so if you’re trying to set up a web server you need to install Apache and you need to solve install my sequel and you need to install PHP and you need to install the connectors so that they can actually work together well what a bond to said is hey you know if you need to install all those things we can create a script that would just install all of these things for you so what will happen is if you know exactly what your server want you want your server to do and you’re not really worried about making it really customized they came up with I don’t know somewhere between 10 to 20 different packages and what happens is if you run the task cell-cell command you’ll get a little looks like a DA screen and it will tell you different server types and it will have a checkbox by those server types so if you say I want to create an email server and one of the check boxes says email all you do is you highlight and check check box you hit enter and then Ubuntu will install all the software you need for that email server or if you need a file server or if you need a couple of things so there’s you know there’s 20 different check boxes let’s say you you want it to be let’s see a Samba it’s called some let’s say you want three out of the twenty so you would say I want an email server I want a file server and I want a Samba server and then you hit enter it will automatically install all of those different processes or different different programs for you a lickety split split very quick it’s very quick it’s very easy and this is great you know in lab environments or internal and companies you know if you just need to throw up a file server really quick you install Ubuntu in 15 minutes you run tasks so let’s sell you say file server and you’re good to go you know in Apache web server a full-blown web server you can have up and running in 30 minutes or less as long as your hardware is worth a damn so that’s what tasks cell-cell command does let’s go over to the computer and I’ll just show you how this works this this really is a phenomenal thing so now we’re sitting back at the

the terminal prompt on the server so now we’re going to do the task self command TAS TAS que SEL now the main thing that you have to remember with this command and the rest of the commands that I’m going to be showing you today is that you have to put su due in front of the command because when we did the man page command you know manual pages are not really security risk you know people are not worried about somebody discovering man pages they are worried about people installing software that should not be installed onto the server so if you’re trying to install software or doing these other administrative tasks you have to put the command su do before whatever command that you’re trying to initiate so su do so Super User do and then space and then task cell T ASX s e L so this is su do Super User do tasks select then all you do is you hit the enter key it asks for the password and now you’re in the task cell a little screen now with this these are all the different packages that you can install very easily onto the server so if you want to be a cloud computing environment you can select one of these cap cloud computing things if you want it to be a DNS server you can just check off the little box right beside the DNS server and this will become a DNS server if you want this to be a lamp server so this is the basically a web server a Linux Apache my sequel PHP server if you want it to be an email server if you want it to be a print server Samba file server Java castor Papa public like I say there’s about about 20 different things you can select now all you have to do is right beside you know whatever kind of server you want to create let’s say like a lamp server you just hit the space bar that checks off that little package and then you can hit enter so when you hit enter what will happen is now the server will install all of the these software packages that are required for whatever you’ve selected so with this lamp server now if you’re trying to create a lamp server manually you have to install Apache then you have to install my sequel then you have to install PHP then you have to still install the connectors between PHP and my sequel and Apache and it’s a few steps it’s about about 10 different things you have to install whereas with this once we hit OK it will automatically install all of those things you know it’ll take a couple of minutes it’ll ask you a few questions but once the process is done then you will have a fully functional lamp server so here you can just hit OK and then now like I say it’s now installing all those packages you can just take my word for it at the end of it everything be installed so so let’s go back out to the to the real world and we’ll talk about the apt-get command and that’s how you install individual software packages so see if the task cell command it’s a dirt simple now we’re going to talk about how you can install other individual programs the thing that you have to remember with with Linux is remember this is an open source world and most of this stuff is free or you pay pay for in weird ways like I say like service agreements or such the nice part about this is in the windows world everything has to go through activation procedures so whether you’re using QuickBooks whether you’re using Adobe or of course whether you using Microsoft everybody’s worried that somebody’s going to pirate or steal a product and they put in these insane activation procedures so that you have to have the CD that you got you have to have the right code and then beyond that once it’s installed with the right code you then have to go off and it hit some activation servers well on Linux most of the stuff we’ll remember as I said before open source does not equal free but a lot of open source software is free so what Linux is able to do is they are able to create things called repositories repositories are places on the internet that just house thousands upon thousands upon thousands of Linux programs so instead of having to have a CD or a disc of some sort you can just go to that repository and install the application from there so like I say in the windows world or the Mac world you have to have a CD you know you lose a CD you’re screwed in the Linux world all the software or a huge portion of the software is out sitting in these repositories and you can just go can go grab them as long as you have an internet connection this is the easiest way to install software on the Linux platform there are other ways to install Linux or applications in Linux and we will talk about them in later classes but again remember this is a simple class this is I’m just just trying to trying to walk you into the Linux world so so going out to those repositories right now is the simplest and easiest two way to do this so basically within

your Linux computer it’s there’s already a configuration file that tells that Linux computer where the repositories are so it says you know abun to comm server five Ubuntu calm server 6 etc when you run what is called the apt-get Command this app Get Command will go out to the repository and it will get whatever program it is that you want to get and it will hopefully install it for you so with the apt-get command the basic command is you put in sudo so Super User do because you’re installing a piece of software onto your computer so that is something that a root user would do then you say apt-get so app get and then after that you do the command in the stall so it’s saying Super User go get this application and install it and then after that you put in whatever application it is so right now we’ll just say and patch you – so if you just wanted a web server without my sequel without PHP without any of them what you can do is you just run this command sudo apt-get install apache2 that would go out to the repository sitting on the internet it would find a patch YouTube and it would install apache2 and it is that easy oh now you have a pet now you have a web server it’s not going to do a whole hell a lot but you have at least a web server now now you say you download a patch you – and you decide oh I don’t really like a patch you – I want to use a different web server well the command to uninstall a patch you to is simply sudo superuser do apt-get remove Apache – so sudo apt-get install apache2 installs a path you to sudo apt-get remove uninstalls apache – so it’ll go in and it will uninstall apache – it is that simple this is how you install most of the software that you’re going to need for your linux server again like I said once you get better more experienced in the Linux world you will start buying proprietary software in the Linux world so you’ll you’ll buy special backups aw we’re special whatever software and some of that stuff may not be in these repositories and you will have to go through different steps in order to install those programs but for 99 percent of the programs that anybody ever installs off of for Linux this app get command will work and so that’s why right now we’re we’re just we’re just staying here with it we’re not going to go off and compiling and all that kind of garbage so if you want to install a piece of software and if you’re trying to figure out you’re like how do I find out what piece of software that I want to install basically you just do a Google search so so if you decide I want to install an email server you go out and you research on Google and it’ll say hey this is the the email server that you should use and so you’ll go sudo apt-get install whatever the name of that server is so there’s not really like I say there’s thousands and thousands and thousands of these programs sitting the repository so figuring out what programs you want to install that can be a bit of a tricky part but basically you know you go out you do a google search you do your research you find out what it is you want to install and then you just plug that in after the install command like I say up it you can do a patch you to PHP my sequel a whole bunch of stuff now once you’ve got the software installed you know as I said before you know everybody likes to laugh at at windows because they always have these these updates you know every week every Tuesday you get another 10 updates and everybody laughs some Microsoft and they say that’s proof that Microsoft is crap well the reality is every single operating system and every piece of software needs to get updated every once in a while same is true with Linux so once you install all the all the software that you want on your Linux server you know you install the file server you install the Samba server you install Apache whatever it is if you want to update that software all you do is you do the upgrade command so you do sudo Super User do apt-get up great what this command will do is it’ll go out to that repository it’ll see if software in the repository is newer than software that you have on the server it’ll bring down that information and then we’ll say do you want to update your software you say yes and then it will automatically just update all the software that you have on your computer so this is is basically all you have to understand at this point for installing

and maintaining your software sudo apt-get install whatever it is installs it sudo apt-get remove no not uninstall not any of that stuff remove whatever the name is uninstalls it and then like I say to update everything you do sudo apt-get upgrade that will will upgrade for you so here we are back at the terminal screen on the server so we’re going to install apache2 since that’s what we keep talking about so the command for this then is sudo su do Super User do apt-get apt-get and then install because that’s what we’re doing and we’re installing a piece of one software I and stll and then we’re going to install apache2 so it’s a PACA v2 now this entire process is very simple as long as you know what program you’re trying to install in order to know what program you’re trying to install you may have to do a google search and do some research to figure out what it is that you’re installing are you installing Apache or you install Apache to light httpd is a different type of web server you have to go out and you have to do a Google search to figure out what software you’re going to be installing and that’s what you plug in after the install command and then all you do is you hit enter so see it is now reading the package list and it installed Apache too so it is literally that simple so we now actually have a web server woohoo it’s it’s that simple now since we have this web server since we have some some software installed we want to make sure that the software is up-to-date you know make sure there’s no patches out there for the software so for that command as I talked about it is sudo su do apt-get apt – Det and then upgrade this will go out and see if there are any updates for the software that is installed on the system then you just hit enter and now it’s reading the packages and so now it says no you know you have the latest and greatest software that you need if there were updates out there it would ask me do you want to update the updates and of course you would say yes now you know we have the server we’ve played around with Apache too we decide we don’t like Apache too we want to use some other web server so we need to uninstall Apache too and again as I’ve said it’s pretty simple so all you do is sudo apt-get remove our e mo ve Apache 2 AP ACA key – so by using the remove command this will now uninstall Apache 2 and then we hit the enter key it goes through it gives you some information do you really want to do this you say yes and hit enter again and now Apache 2 is gone so that is how easy it is to install update and uninstall a piece of software on a Linux computer so with that let’s go back to out to the outside world and we’re going to talk about restarting services so now you understand how to install remove and then update the software onto your server now like I say Linux is best for servers so so I’m expecting that you’re going to be using us for web servers or print servers or virtualization server is etc one of the important things is remember that once you turn one of these servers on they can just go and go and go and go and go and go until the hardware burns out literally once you turn a Linux system on there are very few times you actually need to reboot the thing and I mean when I say very few times I’m talking once a year might be overkill but you know when you go in and you you change configuration files in the software that you have running on your server you may need to restart that individual software or that individual service so let’s say if you’re you have a web server so you have a patch you to installed onto the your Linux server you change some of the configuration files those configuration files don’t get loaded until you restart the Apache 2 service same may be true of PHP same is true virtualization servers so although the computer stays on all the time so the Linux server almost never gets shut off you do have to restart these services every once in a while just to make sure that they’re up to date you know sometimes individual services crash so in the windows world if a service crash is most likely entitled

most likely the entire server will crash in the linux world a single service can crash and you just restart the one service and it doesn’t really affect anything else so so what I’m going to show you now is how to start stop and restart services so we talked about before you know Apache 2 so this is a web server you know if you’re new to Linux probably web servers are going to be the first thing they first things that you’re going to be playing around with so we’ll just go with using Apache 2 is the example for awhile now with this what you need to do is you need to type in the command sudo su do remember super user do this basically means root do you then have a space /e TC /i n I T period D forward slash whatever the service is that you plan to be restarting so it’s Apache – Patti – and then you do space and then all you do after the space as you say start stop or restart so let’s say you change your configuration files in the Apache – you will do sudo space /e TC /i and I T period D forward slash Apache – and then you do restart and that would restart the Apache – service which would bring online whatever configuration changes that you made now let’s say you’re playing with the web server you’re making some changes and you don’t want anybody any people from the outside world coming in while you do the changes so you want to stop the services entirely which basically turns the web server or makes the web server go offline all you would do is sudo space /e TC /i and i t period d /i patch you to stop that stops the web service but it doesn’t stop anything else so basically it means nobody can get to the website you’re hosting but you can still go in and you can change configuration files you can edit things you can modify things you can do everything else on the server except the the actual web server component is not function at this point so this is restarting services I say sudo /u TC /i NIT D forward slash whatever the service name is xxx so you just that’s all you have to do to start stop or restart services let’s go onto the computer and I’ll show you how this works so we’re back at the terminal screen I have reinstalled the Apache – web server so we have a service to start stop and restart so the first thing that we’re going to do is we’re going to stop the service because the service is already running it’s already you know it’s an automatic service so we type in sudo super user do su do space /e TC /i and I T periods period D forward slash apache2 space and then we’ll do stop so we will stop the service we hit enter and it is now stopping the service so now the web server is offline so if this was let’s say this was every man IT dot-com and I ran this command on the server every man I t.com would just stop working nobody could get to the website anymore so if we want to start the service again again we do sudo su do space /e TC /i and i T period D forward slash Apache – paca – and then we do start sta RT and it hit enter and it now started the web service so with every man i t.com if you ran the stop command it would stop the service if we ran the start command it would restart the service and then finally restart you know really simple sudo su do space /e TC /i and I T period D /g – and then restart re s ta RT so you know especially with web servers you do the restart command you know you change a change in Apache configuration file or such and you want to make sure that gets reloaded you just do this Apache to restart command and again what is really really really incredibly nice and you’ll see this when we run this command with the Linux world is you don’t have to restart the entire server you know if you restart an entire server no matter how fast the operating system is it’s going to take a couple minutes before everything’s online if you only have to restart the service the entire everything will be back online in

seconds so so you know if you want to you want to set your little little timer right now I’m going to hit enter and you’ll see how fast it takes you just to simply restart this web server so I hit enter now and there you go the entire web server was stopped and restarted and in what two seconds so so think about that you know if you’re using Windows and you have to restart your web server you know that’s going to take forever it’s going to take you know your computer your server is going to be offline anywhere between four to ten minutes with this admit the website was offline for for a second for two seconds so so that’s all there is to starting stopping and restarting services you know as with all this stuff is it was pretty easy so so let’s go back out to the real world and we’ll talk about the next command okay so now I’ve shown you how to restart services again pretty simple like I say Linux is relatively simple as long as you understand you know what what to put in the the reason everybody thinks that Linux is so bloody complicated is because they have no idea what commands to enter and therefore they think it’s really complicated most of this stuff basic Linux administration is really like I say it’s really pretty simple so so the next thing we need to talk about is the command called top t.o.p if you’re coming from the Winnick the windows world think of the top command as basically your task manager so at the little command prompt you type in top and what happens is you will see how much of your memory is being used how much of your CPU is being used and then all of the processes that are happening so you’ll see you know however many processes you’ll see something called the processor ID or the pid’ p i– p ID like that you’ll see the CPU usage per process the memory usage per process how long the processes has been running etc so basically the top command is the task manager of the Linux world now a task manager you know if a process is just going off and doing its own thing and you need to kill it you can just right-click and do n process in top all you do is you do the command K okay and then the process ID number so if you see process 1578 is just doing something stupid you type in k 1578 and that will kill that particular process so so everything all the processes get their own unique process ID number and so if you like I say if one is just doing something it’s not supposed to be doing you use the command K and then whatever the process ID is within the program top so I’ll show you this in a second basically you do the top command that brings up top that brings up this uh this little task manager type thing and then within there you can you can you can modify some things and then if you need to kill a certain process you just do k-space whatever the process ID number is and that will kill the process if the process is something important for the linux server it will tell you that the process cannot be killed you know if it’s something to do with the kernel or something you know that you don’t have administrative rights for if that’s the case then you may have to do your once a year reboot in order to kill the process so let’s go over to the computer and then I’ll just show you how the top command works again it’s pretty simple it gets the task manager of the Linux world so we’re back at the terminal screen so we’ll do sudo su do and then top t.o.p and now this gives you as I said before this is basically like a task manager for for Linux so if you you look you can see what the up time for the computer is you can see the total number of tasks you can see the CPU usage is uh not very much you can see the memory usage you know how much is used how much is free buffers swap files etc so I mean this basically gives you the same information the task manager would in the windows world you can see that right now up at the top there’s process ID 1489 the user is route theirs gives a couple things you know CPU usage your memory usage the time that the process has been up and that’s that’s top that’s the top command so you know the process has been up for a little bit now so this is pretty simple now if you need to understand how to use the top command better you can use the compel you can type in eight and if you type in H this will now show you all the different commands that you can

use so you know zee-bees LT M’s one l fo all that stuff so these are all the different help the things that you can use within the the top environment so if we go back we hit enter so let’s say we want to kill a process what we’ll do just to make this easy and just to close out this little segment is we’ll kill this top process so this top is a task manager as you can see the process ID is right there at the top it is 1489 so we will type in K it says PID to kill and we will say one four eight nine which equates to top and then we hit enter and then we hit enter again and it is now dead so that’s all you do k kill you put in the process ID you hit enter twice and now the process is gone it is literally that simple so top is simply the task manager of the Linux world if you need to figure out you know what what uh what commands to use if you type in eight that will put you onto the little help screen so with that let’s go back out to the to the real world so I showed you how to use top you know that’s that’s pretty simple you know task manager just in a in a less graphical way I suppose so now we need to talk about basic folder navigation in the Linux world this is slightly different than Windows but the funny thing is it looks close enough to Windows that when things don’t work right you know people have a nasty tendency of wanting to pick up their computer and throw it out the window so here’s the biggest thing in in the Linux world you know you have CD this is just like in DOS or in Windows CD means change directory so if you want to go to a different directory you type in CD now if you are in a folder so you are in a folder already and you want to go to a lower level folder so you’re in this folder and you want to go to the folder etc’ right you would do CD space so nothing e.t.c and that will drop you in to the folder that you’re trying to go into so change directory space et Cie so you’re in this folder and that will drop you into this folder right here here’s the problem let’s say you you you are here and there is a folder called ABC right and this is in a folder and this is in another folder so all the way up here is root right this is where the biggest folder here is root so you have root and then you have a folder under root then it folder under root this is where you’re at right now and then you have a folder under that so you’re right here right here right here and you’re trying to go to ABC if you type in CD ABC you will change directory into this directory this folder called ABC and everything will work fine here’s the problem people in the windows world are used to doing CD backslash a b c to get into this ABC directory so you’re in this folder and you’re trying to get into the ABC directory the problem is in the linux world what linux does is it goes okay you want to be in root you want to change to root folder and then you want a folder ABC and root so you what what happens like I say in Linux is it goes okay you want to be in route ABC and then it goes to route and it can’t find ABC so that’s where you have to be very careful so if you yeah you get what I’m saying it gets a little confusing but the main thing is like I say is if you’re in a folder and you’re trying to go to a folder one level down you do CD space a b c and that will work for you this is one reason why a lot of people a lot of linux administrators always type in just the full path to wherever they’re trying to go no matter where they’re at so you know if I’m trying to go in and change something on the web server I would just do CD slash et Cie slash var slash W W and that would drop me into the dww web server but the main thing is Linux is very finicky about this whole change directory thing if you put a slash here if you put a forward slash it’s going to think that this folder is in the root directory so if you’re in a directory and you’re trying to go to a directory one lower all you do is you just type the command you know CD space ABC then you’ll you’ll be fun the next thing is again remember capitalization matters so if you say C D and then you do a B C all uppercase it’s going to look and this is all lowercase so it’s going to say

directory not found because again capitalization is important in the Linux world an uppercase letter is different than a lowercase letter so it’s going to look for the directory uppercase ABC if the directory that actually exists is lowercase ABC it will come back and say directory not found again all this is pretty simple stuff but maybe we should go on the computer and I’ll just show you this that’s real quick so let’s go over to the computer and I’ll just show you this basic navigation it’s important to understand like I say it can be frustrating as hell if you don’t grasp it so we’re back at the terminal screen so the first thing we’re going to do you know – so – just to show you this demonstration we’re it’s going we’re going to make sure we’re in the root directory so we’ll type CD we will type CD as a change directory space forward slash this will put us back into root and so now we are in the root directory so if we do the list command this this lists all the files and folders in the directory we will see that there’s been and dev and et Cie and lost-and-found and medium so let’s look down and we see that et Cie folder we see see et Cie so we want to go into the et Cie folder all you do is you do see D space e.t.c and this is going to drop us into the et Cie folder so now if you if you look right beside the little blinking cursor it’ll say we’re at /et see if I do the list command again LS this shows all the files and folders so obviously we are in a different folder than we were before so in order to go back to room we’ll do C D space forward slash and this will take us back to root if we if we look at the directory listing at root again LS you know will see this nice small thing now here here’s where I talked before about capitalization being important so let’s say we want to go into et Cie and I showed you the et Cie is real and I showed you that you th see X exists so if I do CD and now I do all uppercase etc’ so it’s the same letters only uppercase letters and then I hit enter see no such file or directory exists why because again Linux cares about the capitalisation uppercase letters are different than lowercase letters that’s that’s very important so so that’s I mean that’s really all there is full for directory navigation and just be careful with the whole backsplash thing remember when you want to go to a new directory or to a directory that’s below you you do CD space and then et Cie or whatever the directory is do not put that that backslash or that forward slash in front of it just put the the directory and that’s what will move you around and that that’s pretty simple so so let’s go back out to the the real world so that was a class on basic linux tasks so these are the basic tasks that you’re going to need to understand in order to get anywhere in the linux world so you know in the future classes we’re going to delve deeper and deeper and deeper into the linux world but if you don’t understand these tasks well you can’t go any further we talked about pseudo super user do basically this means run as administrator if you were used to the windows world pretty simple idea we talked about man pages these are the manual pages about different different programs that you’re going to be running you know ping or the main page itself or app get etc if you need to understand how the program works or you know what arguments you need to put in you can just do man and then say whatever the program is and it should be able to give you something that’ll be useful for you we talked about task cell or task select again this you just type in task cell and it will give you a list of all the different functions your server you may want your server to do so if you want your server to be a web server or an email server or a file server or a Samba server Java Tomcat server or whatever you can just highlight and check that off and then when you hit enter it will automatically install that software for you so you so you don’t have to do a whole hell of lot like I say this can be very very good especially in the test environment or the non production environment because I mean you can get like I say a web server up and running in less than 30 minutes maybe 22 if your hardware is pretty good we talked about the app get command so we talked about where since most open-source software is free or you’re going to be paying for it in roundabout ways they put all the software up in these repositories on the internet you use the app get to make command to go up to those repositories and pull it down to your computer so if you do app get install whatever program it is it will install the program app get remove on installs program and

apt-get upgrade updates all the software that you have on your computer again pretty simple we talked about restarting services so the main thing like I say in the Linux world the the operating system itself very very very very rarely has get rebooted so but sometimes you know you go in and you change configuration files for particular services for servers on the server and you may have to restart those services again all you do is you do sudo space /e TC 4 /i and itd forward slash whatever it is and then you can do start stop or restart that is how you start stop or restart services in the linux world pretty easy pretty simple we talked about top which is basically the task manager of the Linux world you type in top you get to see you know how much your CPU is being used how much your memory is being used what processes are running how much your the CPU or memory they’re using etc within the top you can type in k and then the process ID number and that kill the process as long as it’s not a core process that you don’t have rights to kill that may be a problem but all you do well I say is if you have some runaway program you can do k and then whatever the process ID is and it will kill that process finally we talked about navigation and I just showed you again Linux can be finicky if you’re trying to go to a directory that is inside the directory you were already in you do see the space nothing and then that directory you don’t do the forward slash if you put in the forward slash then Linux thinks that that directory is up in the root directory and all just gets confused and it goes bad I also showed you about capitalization if you try to go to CD lowercase ABC and you type and see the uppercase ABC those are different folders as far as Linux is concerned uppercase and lowercase again matters matters matters matters matters matters matters in the Linux world that’s why when you go navigating through the Linux operating system and you see all the files and folders almost probably every single one is all lowercase the reason is is because they don’t want to confuse people with different capitalization so you know almost all folders and files are always named lowercase just not to make anybody confused and that’s not a bad thing for you to do you know just naming files completely lowercase it isn’t a bad deal as I said before I think all this stuff is pretty simple and this gives you at the foundation for the things that we’re going to go into next you know security settings networking the whole nine yards again Linux is pretty simple you just have to understand these commands if you understand these commands it’ll all work for you and again as I said before we’re showing you all this in the server so on the server operating system but again all these commands can be run from the desktop version of Ubuntu Linux simply by going what is it – to applications accessories and the terminal you open up the terminal prompt and you can run all these commands straight from that terminal prompt and you’ll you’ll basically get the exact same result so uh so so that’s it as you know I’m Eli the computer guy here for everyman IT this was basic Linux tasks I’d go a teaching this class and look forward to seeing at the next one