*** shmohamud has quit (Ping timeout: 480 seconds) | 00:55 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 01:46 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 02:09 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 02:55 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 04:03 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 05:31 | |
*** shmohamud has quit (Remote host closed the connection) | 05:40 | |
*** tboimah has quit (None) | 11:19 | |
*** jelkner has quit (Quit: Leaving) | 12:10 | |
*** svaye has quit (Quit: Leaving) | 12:12 | |
*** scooper has quit (None) | 12:53 | |
ubuntourist | tboimah, Hi. I don't know if you saw my previous mail, but due to the time shift in the U.S. | 13:05 |
---|---|---|
ubuntourist | I am hoping we can move this to one hour from now. | 13:06 |
tboimah | yeah i saw that | 13:06 |
tboimah | okay then it will be 2:00pm my time | 13:06 |
ubuntourist | Yeah. Thanks. I am here today at the old time. So, we might as well continue today, but on Friday | 13:07 |
ubuntourist | I will change to the new time. | 13:07 |
tboimah | okay | 13:07 |
ubuntourist | So... Linux+. A challenging certification, but it looks like a good one. | 13:08 |
ubuntourist | I tried part of the assessment exam at the beginning of the book, and it's not an easy test. | 13:09 |
tboimah | sure | 13:09 |
ubuntourist | In another message, I mentioned you'll both need to be able to build on pevious work. You will need a | 13:10 |
ubuntourist | dependable computer or need to be able to QUICKLY move all of your material to a new computer if the old one | 13:10 |
ubuntourist | breaks. | 13:11 |
ubuntourist | I don't know how much you've looked at the book, but the first step will be to create a | 13:11 |
tboimah | learning enviroment | 13:12 |
ubuntourist | virtual computer. The software that I am most familiar with for doing that is VirtualBox. | 13:12 |
ubuntourist | Right. Learning environment. Of the ones suggested, both the authors and I favor a virtual computer as | 13:13 |
ubuntourist | the learning environment. | 13:13 |
tboimah | same for me | 13:14 |
ubuntourist | The strategy here is: What would you do if you had a computer that had NOTHING on it? | 13:14 |
tboimah | i already download a virtual box | 13:14 |
ubuntourist | Ah, good! | 13:14 |
ubuntourist | So, are you working through the book independently then? | 13:15 |
tboimah | all i need to do is to download an ios to install another os | 13:15 |
tboimah | i start on it today because we was on breake | 13:16 |
tboimah | and i do not have computer at home | 13:16 |
mulbah | Good morning Mr. Cole | 13:16 |
ubuntourist | I need to skim the book more, but it may suggest eventually trying out different distributions. | 13:16 |
ubuntourist | mulbah, hi. I am on "early" for me today. Starting Friday, for the winter months, we move to 2:00 your time. | 13:17 |
ubuntourist | mulbah, we're talking a little about the Linux+ certification, and needing a stable, working computer | 13:18 |
mulbah | okay | 13:18 |
ubuntourist | to have a VirtualBox virtual computer. tboimah, just mentioned he's installed VirtualBox and needs to install an operating system. | 13:18 |
ubuntourist | I have not explored the book as much as I had planned. It may suggest that you eventually try different distributions of Linux. | 13:19 |
ubuntourist | Most of the commads for different distributions will be the same. The one big change is the package manager.. | 13:20 |
ubuntourist | On Debian, Ubuntu, Mint, Pop OS!, and other Linux distributions, it is the familiar dpkg and apt. | 13:21 |
ubuntourist | On RedHat, CentOS, Fedora, SuSE, and others, it is rpm and ... I forget... "d" something... Three letters. | 13:23 |
ubuntourist | And there are other distributions. Gentoo uses something called portage, and Arch uses pacman. | 13:24 |
ubuntourist | All of these (dpkg, apt, rpm, dtn(?), portage, pacman) are different ways to install packages, remove them, update them | 13:25 |
ubuntourist | and keep track of them. | 13:25 |
ubuntourist | There will be other small variations: For example, the choice of fonts, icons, screen layout, etc. | 13:26 |
ubuntourist | Some may put a menu bar at the top of the screen, while others put it at the bottom of the screen. | 13:27 |
ubuntourist | Also, when you install operating system for the first time, different distributions will choose to include different packages | 13:28 |
ubuntourist | automatically. | 13:28 |
ubuntourist | For example, maybe Debian will automatically include tmate, but for RedHat you may need to install it manually. | 13:29 |
ubuntourist | But the differences between the distributions is small. The only major change will be learning the different package managers. | 13:30 |
ubuntourist | For now we'll stick with the Debian / Ubuntu family. | 13:30 |
ubuntourist | ... | 13:31 |
ubuntourist | going backwards: Did either of you finish the "cut" homework? | 13:32 |
tboimah | yeah | 13:32 |
mulbah | yeah | 13:32 |
ubuntourist | So, you both know how to use the "-f" to choose fields lots of different ways. Like fields 1, 2, 3, 7 and skip 4, 5, 6. | 13:34 |
tboimah | sure | 13:35 |
ubuntourist | The tools we've been working with are all used to search, isolate and automate editing of information. | 13:35 |
ubuntourist | Cate to demonstrate (briefly) in tmate? | 13:36 |
tboimah | ssh 7bQEvV7Nj2SuftHw4M4RRthbE@lon1.tmate.io | 13:36 |
ubuntourist | Sorry. "Would you care to demonstrate..." | 13:36 |
ubuntourist | So. Show me fields 2, 3 and 5 in /etc/passwd. | 13:37 |
ubuntourist | (Skip 1, 4 and others.) | 13:38 |
ubuntourist | mulbah, are you on and watching? | 13:38 |
mulbah | yeah | 13:38 |
ubuntourist | tboimah, great. | 13:39 |
tboimah | sure thanks | 13:39 |
ubuntourist | You can also use a hypen also known as a dash when fields are consecutive. | 13:39 |
ubuntourist | If I said 2,3,4, and 7 the best way would be "-f 2-4,7" | 13:40 |
ubuntourist | 2-4 is 2 through 4, instead of typing 2,3,4. | 13:41 |
ubuntourist | OK. What if I said "Get the LAST field" for a file that sometimes has 4 fields on one line and seven on another? | 13:41 |
ubuntourist | (This is the "tricky" question I said I'd explain after you'd mastered the basics of cut.) | 13:42 |
tboimah | yeah | 13:43 |
ubuntourist | mulbah, any ideas? | 13:43 |
mulbah | let me try you will use the regural expression ???? | 13:44 |
ubuntourist | That's not a bad thought... | 13:45 |
ubuntourist | This is why it's always good for me to ask. I would not have chosen that, but it could be done that way. | 13:46 |
ubuntourist | mulbah, good answer.. | 13:46 |
mulbah | Thank Mr. Cole | 13:46 |
ubuntourist | But, its time for a new command. | 13:47 |
ubuntourist | type: | 13:47 |
ubuntourist | rev /etc/passwd | 13:47 |
ubuntourist | Study what is on the screen and tell me what it did with /etc/passwd. | 13:48 |
ubuntourist | mulbah, I would prefer you to answer | 13:48 |
mulbah | okay | 13:49 |
ubuntourist | (If you are struggling with it, I can give you a little more to type that may help.) | 13:50 |
mulbah | I think it arrange the output alphabetically | 13:51 |
ubuntourist | mulbah, not quite. | 13:51 |
ubuntourist | How about typing these two lines: | 13:51 |
tboimah | can i try | 13:51 |
ubuntourist | tboimah, not yet. | 13:51 |
ubuntourist | tail -n 5 /etc/passwd | 13:52 |
ubuntourist | tail -n 5 /etc/passwd | rev | 13:52 |
mulbah | wait I think it give the output backward | 13:52 |
ubuntourist | mulbah, Yes! | 13:52 |
ubuntourist | "rev" = "reverse" | 13:53 |
mulbah | so the command means reverse right | 13:53 |
ubuntourist | yes. | 13:53 |
ubuntourist | so now: | 13:53 |
ubuntourist | Think about this. Don't type it yet. Try to answer without typing it in: | 13:54 |
mulbah | Mr. Cole can you give us 10mins break | 13:54 |
ubuntourist | OK. 10 minute break. | 13:54 |
mulbah | we are having electrical problem we will be back | 13:55 |
mulbah | But we will be back in 10mins | 13:55 |
ubuntourist | ACTION is sipping his caffeinated Coke, jokingly called the "breakfast of champions" 😉 | 14:04 |
ubuntourist | ACTION is wondering if the electrical problem is fixed. | 14:10 |
*** mulbah has quit (Ping timeout: 480 seconds) | 14:12 | |
*** tboimah has quit (Ping timeout: 480 seconds) | 14:12 | |
*** fkoikoi has quit (Ping timeout: 480 seconds) | 14:12 | |
ubuntourist | Poo. | 14:12 |
*** dcammue has quit (Ping timeout: 480 seconds) | 14:12 | |
ubuntourist | It is now 20 minutes... waiting... | 14:14 |
ubuntourist | 30 minutes... still waiting... | 14:24 |
sysadmin_ | sorry we are back | 14:25 |
ubuntourist | OK.... | 14:25 |
mcssguest_ | We are back | 14:26 |
ubuntourist | Think about the following. Don't type it yet. Try to answer without typing it in: | 14:26 |
mcssguest_ | alright | 14:26 |
ubuntourist | You know about cut. You now know about rev. And you know about pipes. Try to think and explain the following: | 14:26 |
ubuntourist | rev /etc/passwd | cur -d ":" -f 1 | rev | 14:27 |
ubuntourist | (go back to tmate I am still on tboimah@mcssstudents.) | 14:27 |
mcssguest_ | the command is cut or cur? | 14:27 |
ubuntourist | mcssguest_, Sorry, my bad. You are correct. it should be "cut" | 14:28 |
ubuntourist | rev /etc/passwd | cut -d ":" -f 1 | rev | 14:28 |
tboimah | ssh tuarE6trzDBEPjjzksUXasZMJ@lon1.tmate.io | 14:29 |
mulbah | okay | 14:29 |
tboimah | please join that link please | 14:29 |
mulbah | the command will give the output backward and use ":" as it delimiter and print out the first fields | 14:31 |
mulbah | and I correct Mr. Cole | 14:33 |
ubuntourist | mulbah, I think so... Tell me what would print for the last line if the original line is: | 14:33 |
ubuntourist | tboimah:x:1012:1014:Thomas Boimah,,,:/home/tboimah:/bin/bash | 14:34 |
mulbah | it will print "bash" | 14:34 |
mulbah | sorry | 14:35 |
mulbah | "/bin/bash" | 14:35 |
ubuntourist | mulbah, correct! | 14:35 |
mulbah | because the delimiter is ":" | 14:35 |
mulbah | Thanks Mr. Cole | 14:36 |
ubuntourist | It flips the line backwards, uses the colon as the delimiter which means it gets "hsab/nib/" as the first field and then flips that backwards to get "/bin/bash" | 14:37 |
ubuntourist | Sometimes, command names make sense, like "rev" means "reverse". | 14:37 |
*** fkoikoi has quit (Quit: Leaving) | 14:37 | |
ubuntourist | But sometimes the developers of Unix and Linux have a silly sense of humor that makes it hard for everyone else. | 14:38 |
ubuntourist | "cat" is for "conCATenate" which means add one file to the end of another file and on Unix and Linux | 14:39 |
ubuntourist | "everything is a file" including your screen. So "cat" ... adds(?) a file to the end of your screen. which means it prints it to the screen. | 14:40 |
ubuntourist | It's a strange name for a command. But an even stranger name that is just silly and kind of stupid: | 14:41 |
ubuntourist | tac | 14:41 |
ubuntourist | "tac" is "cat" spelled backwards... | 14:41 |
ubuntourist | And it does something backwards... | 14:41 |
ubuntourist | If you are both looking at the tmate, | 14:42 |
ubuntourist | try "cat ledmer" then try "tac ledmer" | 14:42 |
ubuntourist | So. Can you see what it has done? | 14:43 |
tboimah | yeah | 14:43 |
ubuntourist | (I mean do you see what "tac" does?) | 14:44 |
tboimah | sure | 14:44 |
ubuntourist | I use that "rev ... | cut ... | rev" a LOT. It is very useful. But I have not found a good use for "tac". | 14:45 |
ubuntourist | two other commands in the family of cat, tac, rev, cut, most and grep: | 14:45 |
ubuntourist | "head" and "tail" | 14:46 |
ubuntourist | Sometimes, you only need to see the first few lines of a file or output from a command. | 14:46 |
ubuntourist | Sometimes you only need to see the last few lines. | 14:46 |
ubuntourist | You can do that with "most" using the "T" for "top" and "B" for "bottom", but sometimes it's easier to use | 14:47 |
ubuntourist | head or tail | 14:47 |
ubuntourist | working with tboimah ledmer file: | 14:48 |
ubuntourist | head ledmer | 14:48 |
ubuntourist | Hold a second. I want to check something. | 14:49 |
ubuntourist | OK... | 14:49 |
ubuntourist | there is a command "nl" which means "number lines". It adds a line number to the start of | 14:50 |
ubuntourist | every line. But you can also do "cat -n" and the file name. They are a little different but try | 14:50 |
ubuntourist | "cat -n ledmer | most" and "nl ledmer | most" | 14:51 |
ubuntourist | I think "cat -n" always numbers all of the lines. "nl" normally will not put a line number on a blank line. | 14:52 |
ubuntourist | "cat -n ledmer | head" and "cat -n ledmer | tail" | 14:53 |
ubuntourist | Still there? | 14:55 |
ubuntourist | ACTION waiting for you to try the last two commands.. | 14:56 |
ubuntourist | So head prints the first 10 lines. | 14:58 |
ubuntourist | tail prints the last 10 lines. | 14:58 |
tboimah | sure | 14:58 |
ubuntourist | If you want more or less you can tell them how many lines to print | 14:58 |
ubuntourist | "head -n 5" and "tail -n 5" will print only five lines. | 14:58 |
tboimah | sur | 14:59 |
tboimah | sure | 14:59 |
ubuntourist | And then there is the weird "head -n -5" and "tail -n -5" | 14:59 |
ubuntourist | If you use a negative number, it means "everything except..." | 14:59 |
ubuntourist | head -n -5 ledmer means "print everything except the last five lines" | 15:00 |
ubuntourist | "tail -n -5 ledmer" means "print everything except the first five lines" | 15:01 |
ubuntourist | So, "head" and "tail" are a little bit like "cut". And you can use them together: | 15:02 |
tboimah | sure | 15:02 |
ubuntourist | If you have a file that is 20 lines long, and you want to print lines 10 to 15: | 15:02 |
ubuntourist | cat -n ledmer | head -n 15 | tail -n 5 | 15:03 |
ubuntourist | Oops. 11 to 15. That's actually what I wanted. | 15:04 |
ubuntourist | (If I wanted 10 t0 15, it would be six lines. So "tail -n 6") | 15:04 |
ubuntourist | I only used the "cat -n" so we could see the line numbers. | 15:05 |
ubuntourist | Without line numbers we could have typed "head -n 15 ledmer | tail -n 5" | 15:05 |
ubuntourist | All of the commands we've been focused on will help you when you are looking for information in | 15:06 |
ubuntourist | configuration files (/etc/*) and system log files (/var/log/*) | 15:06 |
ubuntourist | As a systems administrator, trust me: You will be spending a LOT of time looking at log files and editing configuration files. | 15:07 |
ubuntourist | So knowing about grep, cut, rev, head, tail, cat -n, and most will help you find what you're looking for quickly. | 15:08 |
ubuntourist | And knowing how to use all of them with pipes, and for loops too. | 15:09 |
ubuntourist | OK. That's it for today. | 15:09 |
tboimah | okay thanks very much | 15:09 |
mulbah | Thanks for today Mr. Cole | 15:09 |
ubuntourist | See if you can both have working virtual boxes with an OS installed by friday. | 15:09 |
tboimah | Okay | 15:10 |
mulbah | Alright | 15:10 |
ubuntourist | I'll try to make time to look at the Linux+ book to see where it wants to go from there. | 15:10 |
ubuntourist | Oh, and keep trying to increase your speed with editing, command line shortcuts, and reading man pages. | 15:11 |
ubuntourist | Those will also be invaluable to you -- especially when you do not have access to the internet. | 15:12 |
ubuntourist | Bye for now, | 15:12 |
*** ubuntourist has quit (Quit: Leaving) | 15:12 | |
*** tboimah has quit (Remote host closed the connection) | 15:18 | |
*** mulbah has quit (Remote host closed the connection) | 15:36 | |
*** scooper has quit (Remote host closed the connection) | 20:15 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!