logo © 1996 Phil Waclawski
Felitaur Site
About Me
ftp files
Help Files
What's New?
Home Page
Other Links
Anatomy &
Fun Links
Win 95/NT
Linux/VI Cheat Sheet for Lampbusters.com
  1. Use an SSH (Secure Shell Client) to connect to lampbusters.com (our web server)
    • Use Putty, an encrypted SSH (secure Shell) client
      1. Click on the "start" button
      2. Go to "Programs"
      3. Go to "Putty"
      4. Go to "Putty" and click on it
      5. In the window that opens...
      6. For host type lampbusters.com (depending on your setup)
    • OR: Go to my internet page and scroll down under "Web page resources" and find the link to download putty. When you go to the putty (TM) site, click on downloads, and choose the top one (putty.exe) and download it. All you have to do is save a shortcut on your desktop to it, or you can run it off a USB drive by:
      • Double click on "my Computer"
      • Double click on the "Removable Drive E:" icon
      • Double Click on the "putty.exe icon"
      • Follow the above directions
  3. login: the username you created with me
  4. password: Type your password here (note, NOTHING shows on screen when you type, also, you only get 1 minute to log on to the machine before it disconnects, and 3 bad tries locks you out for 2 minutes)
  5. I have a menu that I created for my students. Choose the appropriate number for what you want to do (Look at HTML errors, log into mysql, or, usually, "goto shell" )
  6. If you chose "go to shell" a command prompt shows up, [username@fujitsuclass ~]
  7. ******Type cd public_html and hit "enter" (this changes you into your web directory, VERY important, make SURE you do this, use pwd "enter" to make sure what directory you are working in to avoid errors)
  8. Type ls (for "list stuff") You should see your files listed.
  9. To change Passwrd! just type passwd and hit enter at the prompt.
  10. To edit a file, we'll use vi a powerful text editor, but a bit tricky to learn at first. So you type
  11. vi filename.html (obviously, don't call it FILENAME, just put YOUR filename there)
  12. This will open an existing file, or create a new one if it's not there
  13. IMPORTANT vi has two modes, command and edit, and you need to make sure you are in the right mode
  14. if you type "i" for insert, you enter edit mode, and the [esc] key will put you back into command mode
  15. EDIT MODE(by typing i or a)
    • You can use the arrow keys to move around (and page up and down)
    • The backspace key works to delete characters
    • If you copy something, then right click the mouse button, it will paste where the cursor is presently located
  16. COMMAND MODE (by hitting the [esc] key)
    • :w (saves file :w filename to save to a particular name)
    • :wq (save and quit)
    • :q! (quit without saving)
    • dd (deletes a line, 5dd deletes the line you are on, and 4 below it)
    • yy (copies a line, 5yy copies 5 lines)
    • p (pastes a line at the cursor)
    • /searchword (searchs for "searchword")
  17. Copying your template file

    • You can at the command line (bash-3.0$) just do the following:
      cp template.html newfilename.html (Again, use the name you want, not "newfilename")


  18. Basic Instructions

    • After you have connected to lampbusters.com and logged in and done the cd public_html
    • then type vi filename.html
    • (If you want to use your template, go vi template.html and then
      :w newfilename.html and hit :q to exit vi, then vi newfilename.html
    1. Type "i" for insert mode, and start typing
    2. Hit [esc] then :w
    3. Then click the "refresh/reload" button on your web browser to view your changes
    4. Then use the taskbar to switch back to putty
    5. Type "i" for insert mode, start typing
    6. Rinse, repeat, enjoy. ;)
  19. Some Vi Help links located at the bottom of the page
  20. For some of the validation tags you need to copy, check out the Basic XHTML link.
  21. TO SEE YOUR WORK: Your web addres is http://www.lampbusters.com/username/ (where username is YOUR username)and if your filename isn't index.html, you need to type that after the last / (such as http://www.lampbusters.com/username/resume.html)
  22. ADVICE: Have your web page file open in Putty and the same page displayed in your web browers, make changes, then save, then immediately switch to your browser and hit "reload". A very powerful way to learn HTML, as you can see the results on a real web site immediately.
  23. Remember, to use pictures, you must use a ftp program such as Filezilla(helpfile) (file transfer protocol) to move them into the right directory.