[Understudy] Hello! Recap of first day, PuTTY Peter Godofsky Wed Sep 23 18:04:40 EDT 2009 ----------------------------- Hello everyone! If you're on this list because you signed up at activities fair and don't want to be, just email me and I'll take you off the list. Try to put something about that in the subject, like "removal from understudy list" or somesuch. First off, I want to apologize for a slightly disorganized first meeting. I promise you, next meetings will have an agenda that we will follow and more importantly, most meetings will have some time spent in the lab. Next meeting we will be learning the basics of bash (the command line) and how to use the text editor vim. Try not to lose the handout with basic UNIX commands that I gave you. If you didn't pick one up you can find it online at the Understudy website. I'll be giving you more handouts over time and you will probably want them around as references when you do the activities. Here's a link: http://www.tjhsst.edu/admin/understudy.html Now I told you all that I would explain PuTTY and how to use it. Firstly, if you have a Mac OSX or Linux machine, you don't need PuTTY. If you're in one of those groups, email me, Andrew Watson or Zach Brunt and we'll walk you through it. To download PuTTY, click the following link: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe Once it finishes downloading (it shouldn't take long), congratulations! You have now installed PuTTY. It doesn't actually have to install -- you can just run the executable. Do so. If Windows asks you if you trust PuTTY, say yes. You trust PuTTY. A window will open called "PuTTY Configuration". For the host name, type: remote.tjhsst.edu and then go to the option on the left under "Terminal" labeled "Features". Choose "Disable application keypad mode". If you don't, your number pad will do strange, strange things. If you don't want to set these options every time, type a name in the bar under "Saved Sessions" (under the "Session" menu on the left) and click Save. Next time you open PuTTY, double-click the session from the box and it'll automatically use the settings. When you're done setting options, hit "Open". The first time you try to log into remote it will give you a message about keys and trust and stuff. Hit yes. Nothing bad will happen, I promise you. Later on in the year we're going to cover what that message actually means. I'll give you a hint right now and say it has something to do with public-private key encryption. You should be logged into TJ now. You'll be asked for your username and password and there will be a message about monitoring and logging. You should then see your prompt and you will be able to type commands. For now just type logout to log out again. I just want to make sure you all can get remote access. If you want to get ahead of me you can try out some of the commands on that sheet but make sure to read the man page first. I recommend trying the command vimtutor. It's a program that teaches you how to use vim in about an hour. It's a really great way to learn vim. Also remember that if you delete a file, there is no recycle bin or trash can! It's GONE. If you mess up your files it isn't a disaster though--Email me IMMEDIATELY and I can recover them. If anything seems confusing right now, rest assured it WILL all make sense later. Once we're done with the command line and vim and you can navigate your way without graphics, the fun really starts. :) Finally, if you have ANY questions or can't get this to work, feel free to email me, Andrew Watson, or Zach Brunt. Peter Godofsky ============================================= [Understudy] Vim and Bash Peter Godofsky Wed Sep 30 18:17:01 EDT 2009 ----------------------------- Hello everyone! Today's lesson I admit was hard to follow and probably difficult to remember. Bash and Vim are a little unusual compared to most of the stuff we will be doing this year. The difference is they require lots and lots of practice to get really good at them. This is something we will work on all year and gradually, by the end of the year, be proficient with. Bash and vim are a constant learning experience. I've been using both heavily for two years and even I learn something new about them at least once a week. The goal is not to make you masters at bash. The goal is to learn enough to get started. Put another way, what we're trying to do is learn enough bash to learn more. If you don't know anything at all about bash and you're a complete beginner, it's very difficult to figure it out. But once you know a little bit about bash, you start picking stuff up really quickly. Unfortunately, we don't have a lot of time in Understudy so I can never get through as much as I would like. What I'd like all of you to do is to SSH into TJ using the PuTTY instructions I sent you all last time. I'd like you to play with the commands on the handout I gave everyone last week (linked below). I am confident if you spend some time trying each of these commands and reading some of the man pages, you will be well on your way towards learning bash. http://www.tjhsst.edu/admin/handouts/Bash%20and%20Basic%20UNIX%20Commands.doc Bring this handout to understudy every time to use as a quick reference. Don't try to memorize the commands! Use the cheat sheet and eventually you will memorize it from using them so much. Don't worry if you have to look stuff up frequently. Experiment and play around! Try something new, maybe even something silly. If you discover something interesting, share it! Send an email to the mailing list or bring it up next time we meet. You won't be able to try the ones that say "superuser access required", and passwd won't actually work because we don't do passwords the normal way. In a few weeks, you will all get your very own virtual machine that will be yours to play with however you like, breaking it included (but I don't recommend doing it on purpose because then I have to fix it). Once you have a virtual machine, you'll be able to play with all of these commands and more. To recap what we covered today- Bash is a command line interface, also known as a shell. It can be used very simply, but can also be very complex. One of the powerful things about bash is the fact that you can take output and input and redirect it to just about anywhere. You can take the output of one program and shove it into the input of another program. You can take the output and put it into a file, or append to a file. You can take a file and put it into a program as input. You can even use the output of a command as the command-line argument of another command. The command line argument is what comes after the command. So if I typed 'ls /usr/bin' /usr/bin is the argument. You redirect into a file by using [command here] > [file here]. This overwrites any existing file and creates a file if there isn't one. >> will append to an existing file and create a file if there isn't one. [command here] < [file here] will take the contents of the file and use it as the input. | takes the output of a command and inputs it into another command. If I do ls `[command here]` then the output of the command will be used as the argument for ls. Vim is very complex. There are hundreds of secret keystrokes you can use and they all do something unique. But you only need to know a few. Zach's handout is great, it tells you everything you need to know. When I learned vim, I learned it on my own. I use it almost every day, and just to give you an idea of how incomplete my knowledge is, I actually didn't know how to copy less than a whole line until Zach showed me today. His handout has everything you need to know about vim. Keep it around as a quick reference, just like the unix commands. For some additional reading, try Michael Lowman's (TJ class of 2008) handouts from when he taught understudy. This one is extremely helpful. I'd like everyone to read it. All of his handouts are on the understudy website. http://www.tjhsst.edu/admin/handouts/linux.pdf If you have ANY questions, send one of us an email. You can send an email to the list (understudy at lists.tjhsst.edu), or to any of the admins. If you like, stop by the Syslab during lunch. There's always a few of us there. We'll be happy to answer your questions and help you out one-on-one. Peter Godofsky =============================================== [Understudy] Installing Debian Peter Godofsky Wed Oct 7 17:55:34 EDT 2009 ----------------------------- Hello all! Okay, so today we didn't get into the lab (booo) but we did install Linux (yay!). So here's a recap of today's lesson. Installing Debian is pretty straightforward. For most options, just hit the default. Select the correct timezone, country, language, keyboard layout, etc. Failure to do so may result in some probably not unanticipated consequences (such as not being able to understand anything because it's all in Croatian) and everyone else making fun of you. Linux, Windows, Solaris, BSD, Mac OS, etc all have their own filesystems, that is, how they store data on the computer. They are not compatible. There is some small ability for one OS to be able to read another's filesystems, but in general they are fairly unreliable. Each OS you have installed on your computer -- because you can have several -- needs its own partition. A partition is a section of a hard drive that the computer can sort of treat as a separate drive. If you're dual-booting (have two operating systems installed on a machine) you're probably running Windows and some other OS. The great thing about Windows is that you can resize an NTFS partition and it won't lose data. NTFS is the filesystem Windows uses. It has its advantages and disadvantages but we like it because we can resize it as much as we like so long as it still has enough space for all of its data. We then create a partition for ext3 -- this is the filesystem Linux uses. We aren't dual booting, so we won't have to worry. Our disks will have one ext3 partition and nothing else. We also need to create a partition for swap. (I may not have gone over this). Swap is like Pagefile in Windows. If the computer runs out of memory it puts some stuff in swap instead. Swap is much slower than actual memory. You need it anyways. The rule of thumb used to be to have twice as much swap space as actual RAM, but nowadays we have so much RAM that becomes excessive. 256MB should be sufficient for swap. Debian is, for our purposes, smart enough to figure out how much swap it needs when you install it. Additionally, we have to install a bootloader (specifically, GRUB). If you're dual booting, this means you can't delete Linux easily. It overwrites the Windows bootloader. Since we use virtual machines we won't have to worry about that. Your hostname will be figured out automatically because of DHCP. It looks at your MAC address and checks what name you should have. Don't change this setting. When you select package mirror location, go to the top and select add your own. Our mirror is mirror.tjhsst.edu. When you select packages, DO NOT select Desktop. DO NOT. That's very important. When you pick your root password, pick a good one please. It's good practice. And we'll be testing to make sure you do. Package managers are the way Linux systems install programs. It is usually what sets Linux distributions apart. There's a list of packages you can install (programs), and the other packages that they depend on. The package manager automatically installs all the requested package's dependencies, and those dependencies, and so on. You do not want to install programs by hand. This is tricky, and for you guys way too advanced. Next time we meet we will have a server all set up for you guys to create your own virtual machines. They'll be yours to play with freely and you will be able to use them from home. Until next time, practice those UNIX commands and Vim, and read Michael Lowman's handouts on the Linux operating system ( http://www.tjhsst.edu/admin/handouts/linux.pdf) and software choices ( http://www.tjhsst.edu/admin/handouts/choices.pdf). These are all on the Understudy website. Finally, if you have any questions, feel free to email us OR go to the following site: http://webchat.freenode.net/ Enter your TJ username (so we can identify you) for Nickname and ##TJ-understudy for Channels. You can talk to me, some alums, whoever happen to be online at the time with any questions you have at any time. I was going to show this to you today, but we ran out of time. I highly recommend this! (For those of you who are familiar with this, this site is a web frontend to IRC. You can use mIRC, Chatzilla, irssi, pidgin, etc if you prefer.) Thanks to all of you who are patiently sticking with this activity, I know right now things are moving a little slowly but by the next time we meet, you'll all have made it through the very basics and (finally!) be running your own system! Peter Godofsky ===================================== [Understudy] Today's Meeting Zach Brunt Wed Nov 4 18:54:28 EST 2009 ---------------------------- Today we started to build a computer, and almost got the motherboard in. Many of you expressed an interest in learning how the intranet works, and signed up to get an intranet sandbox, but you shouldn't expect these particularly soon. Some new people showed up today, and they have been added to the mailing list. Please contact Peter Godofsky if you wish to be removed. Important take away items from this afternoon: 1. There are a lot of good handouts on the understudy website , and you should all read the one about hardware . 2. Join us in irc for help and fun. In addition to the understudy leaders you know and love, you will find many other admins, current and past. The channel is ##TJ-Understudy, and the server is freenode. Either use your favorite irc client or go to webchat.freenode.net. 3. You will have projects. Try to think about what interests you in the lab. If its a decent idea, chances are you will get a chance to try it. Projects have included making a bunch of old machines work, making a file server, and setting up a web server. -Zach Brunt