This is a basic guide to using a shell account on a Linux system, specifically written for the students of Montgomery Blair High School using our linux server binx. Some commands are binx specific, but most apply to any Unix-like system. For more information go to http://mblug.mbhs.edu or email the list at mblug@mbhs.edu. --History of Linux-- Back in the day (1991), a Finnish college student named Linus Torvalds created a reimplementation of UNIX (a computer operating system (OS)) created by Ken Thompson and Dennis Ritchie in 1969 for use at Bell Labs and eventually at universities and government installations) called Linux. Since then its popularity has grown and thus is more widely used. It is now more commonly used as a server OS, but is now becoming a more viable desktop OS. The benefits of Linux include it's speed, stability, and ability to be easily customized. It will run on Intel PCs at home, but has also been ported to the Macintosh and various other architectures. One of the biggest benefits of Linux is the fact that it's source is open and it is available for free. This means that coders can download the source code, install it on their home computers, make modifications to the source code, and send them back to Linus for inclusion in later versions. There are also various companies (Red Hat, SuSE, Mandrake, Debian) who sell nicely packaged versions of Linux, at a minimal cost. --History of binx-- Binx is in its fourth hardware version. Binxiv is a Dual Xeon 3.4GHz Dell PowerEdge server with 2GB of RAM and is hosted off a private T1 internet connection. Currently binx is running Debian testing. Binx and the rest of the Unix network is maintained by Peter Hammond and the student sysops, who can be reached by emailing maxop@mbhs.edu. Binx does many things for many people. It hosts BEN, Silverchips and all the other mbhs.edu websites, it provides a system that students in advanced programming classes can use that is far more stable then the Windows or Mac desktops they could use in class, and binx also provides a fun system to play around with for students interested in learning Linux, but who don't want to jump into it head first by installing it at home. With the other servers at Blair, binx also provides internet access for some students and staff and other web related services. Check out the Blazernet Project for more information (http://blazernet.mbhs.edu). --A few important notes-- In this guide a word with <>s around it means that a valid argument should be substituted for the word. Unless stated otherwise, things in quotes don't mean explicidly use quotes, treat the text inside it as what you enter, ignoring the quotes. You'll get the picture. In Linux no news is good news. When you enter a command and get no feedback or info, just sent to the prompt again, this is good. This almost always means the program completed succesfully. Tab Completion can be used to greatly shorten time spent finding files. Begin to type the file name, then press tab. This will fill in as much data as can be found, either a full file/directory name or part of it. For example, if you have 'Ex101' and 'Ex102' in a directory you could type 'Ex [tab]' and it would fill in 'Ex10' and wait for you to enter more characters. The up arrow key can be pressed to get the previously entered command. Press again to go back another command. There is NO undo. Once you move, delete or edit a file you're stuck with it. I highly recommend you make copies of things that are important before you do any changes. Just adding a .bak to the end of the filename is enough to prevent disaster, ie 'cp '. Switches are used to modify a command. They're generally added into the command with '-' (or sometimes '--' For example, 'grep ' would select all the lines in that contain . I could change this to 'grep -v ' to select all the lines that do NOT contain . Linux is case sensitive; 'File', 'FILE' and 'file' are NOT the same thing. Many programs that are simply 'command ' operate exactly the same if they get data piped into them. For example 'who | less' would operate the same as if the info came from a text file you specified. There are several things that refer to specific directories. A ~ refers to your home directory, while '~' refers to another user's home directory. If you use '.' In a path that refers to the current directory, while '..' refers to one directory above the current one. If a path to a file starts with a '/' it is from the root directory, otherwise it is relative (found in relation to the directory you are currently in). --Redirectors-- | sends output of first program to second. Example: w | sort runs w, and then sends the output to the program sort, which sorts it and puts it on the screen. > sends output of first program to file. Example: w > foo makes a file called foo with the output of w in it. >> can be used to append output to an existing file. < takes input from file and sends to program. Example: mail josborn < foo would mail me the contents of file foo. --Control Characters-- Most programs (pico, pine, links2, etc.) will have instructions at the bottom of the screen. ^X means to hold down control and press X. These are control characters. ^L is useful to clear someone's write message when working in another program. ^Z can put a program in the background. 'fg' will bring it back up. ^C is usually to cancel the program. Example: If you write someone or someone writes you, ^C will get you back to the binx prompt. binx/Linux commands (not all of them!): --MOVING AROUND-- cd changes the directory from the current directory, to the specified directory. Once logged in, you are in your home directory. cd by itself, changes to your home directory. cd .. go up a directory. ls lists files in the current directory. ls -a lists hidden files in the directory. ls -l long listing, shows size and type of file. pwd Print Working Directory, display the full path of the directory you're currently in --FILES-- nano basic text editor. Opens file if file is specified, otherwise opens a new file. cat outputs the specified file less outputs the file, but lets you scroll through it at your leasure. Press ./. (no quotes) to search through the file grep outputs every line in where appears. Commonly used in redirectors, ie 'w | grep chmullig' to get just the entries for user chmullig grep -v outputs every line in where does NOT appear sort sorts each input alphabetically then outputs it. Often used for piped commands, ie .who | sort. to get an alphabetical list of who is logged in head <-n > prints the first 10 or number specified, lines of a text file or the input tail same as head, but the last 10/x lines --PLAYING WELL WITH OTHERS-- pine email client pine -i moves you directly to the inbox. who/w display who is logged in finger get a user's info. Displays schedule and other info. If run without a username displays a list of who is logged in write posts a message to the the user's screen. Note: this can be annoying if the person is working on something. Please don't abuse this. It is possible to clear write messages by holding down control and pressing L (^L). ytalk a chat type program. Either starts a new session and invites user, or connects to user's session. ytalk -x if ytalk does not work the first time, try this option. mesg sets write/recieve capability to on or off. --FUN STUFF-- hello prints the welcome screen fortune prints a fortune cookies fortune magnet prints a magnet fortune cookie (you'll see) figlet translates into large ASCII text either the text entered, or opens up an interactive prompt where you can enter text repetitivly cmatrix -b Follow the white rabbit. chfn change your info that shows up when people finger you .plan and .project These aren't programs, they're files in your home home directory that show up when you're fingered. --ADMINISTRATION-- mv moves file to new file. Also used to rename. cp copies file to copy file. rm deletes file. USE CAREFULLY, there is no undo rm -rf removes an entire directory and all it's files. USE CAREFULLY, there is no undo mkdir makes a new directory dirname. rmdir deletes directory dirname (must be empty). passwd change your password diff find the differences between file1 and file2. Can also use stdin and stdout. --OTHER-- links2 text based web browser. Starts out at the specified url. wget download a http or ftp file to the current directory --HELP YOURSELF-- man brings up a help screen with an explanation of the command and all the options available. --help many commands can print a basic help guide (for arguments, etc) when run with the .--help. switch apropos This will search for a command to do something, based on either part of the command name or it's function. Example: 'apropos browser' would give you the command and a description of 'links2', 'ncftp' and 'pilot' which are used for web, ftp and file browsing respectively. Version History... v1 Justin Osborn (josborn) v1.5 Chris Mulligan (chmullig) v1.6 Chris Mulligan (chmullig) 10/30/03 v1.7 Kevin McGehee (kemcgehe) 6/5/05