Power Computing at CMU

Table of Contents

1 Command line basics

1.1 ssh

ssh $ANDREWID@unix.andrew.cmu.edu

1.2 shells

This is a shell. You type commands into it, and it does things. The Linux Command Line is a good tutorial about how to use the shell. If you have questions or want personal tutoring, come to Computer Club meetings. Today, we will keep it to the stuff that will make you "more productive".

1.3 basics

ls # list files in current directory
pwd # print current directory
ls dir # list files in directory
cd dir # go to directory
cd .. # go to parent directory
cd . # go to current directory
# .. and . are generic ways to refer to parent/current so you can pass them to anything
# so we can do:
ls . # list files in current directory
ls .. # list files in parent directory
Ctrl-r: Incremental search for old commands - press Ctrl-r again to go further back.
Up arrow: Go to last command
TAB: Complete the name of commands, filename paths, arguments, all kinds of stuff

1.4 tmux

If you setup your work environment inside tmux, it will all be there waiting for you when you come back. You can run long-running process inside it too, so they keep running even when you're logged out.

Run "tmux" to start tmux and enter it, and thereafter run "tmux attach" when you log in. Or use this handy alias:

alias atch=tmux attach -d || tmux
Ctrl-b c (create a window)
Ctrl-b n/p (move to next and previous windows)
Ctrl-b 0-9 (move to window with that number)
Ctrl-b d (detach from tmux so you can log out)

1.5 IRC

IRC makes you more productive!

irssi

You will see a scary screen.

/connect chat.freenode.net
/join ##cclub

There is much assistance available on IRC. But make sure to wait after asking a question… (Or heck just ask questions right now on IRC)

A good guide for irssi is https://quadpoint.org/articles/irssi/

1.6 unix.andrew.cmu.edu

All that is great, except unix.andrew.cmu.edu reboots every 24 hours. This is annoying if you want to run something persistent… like tmux. So join Computer Club! We provide shell servers that don't reboot every 24 hours!

2 Kerberos

Typing in your password to ssh every time is a pain, yes? Luckily there is a solution!

2.1 An explanation of Kerberos

It is an authentication system. Here, read this: http://web.mit.edu/kerberos/dialogue.html

2.2 Get tickets (i.e. authenticate yourself)

kinit $ANDREWID@andrew.cmu.edu # type in your password
klist # see that you are authenticated

2.3 ssh configuration for passwordless login

Put the following text in this file on your local machine: ~/.ssh/config

Host andrew
   Hostname unix.andrew.cmu.edu
   User ANDREWID
   GSSAPIAuthentication yes
   GSSAPIDelegateCredentials yes
ssh andrew # no password!

3 AFS

3.1 Installing AFS locally

3.1.1 Windows and OS X

Download from the internet. Your default cell/domain/whatever should be ANDREW.CMU.EDU

3.1.2 Linux

apt-get install openafs-client

Or similar.

3.1.3 Local use

Get Kerberos tickets with kinit, then:

aklog andrew.cmu.edu
cd /afs/andrew.cmu.edu/usr/$ANDREWID/

3.2 Using AFS

3.2.1 Setting permissions

fs la # list ACL (access control list)
fs sa [directory] [acl] # set ACL

Google it, yo!

4 Contrib

Check out the Contrib homepage for documentation.

4.1 Web hosting with drag and drop

Put files in here: ~/www

And they will show up in here: http://www.contrib.andrew.cmu.edu/~$ANDREWID/

4.2 CGI

Instructions on the Contrib homepage.

5 Computer Club services

Just show up at Open Hacking Hours on the weekends.

5.1 Expert support

5.2 Virtual machines for servers

5.3 Hardware procurement and tools

Author: Spencer Baugh (AndrewID: sbaugh)

Created: 2015-09-02 Wed 23:57

Emacs 24.5.1 (Org mode 8.2.10)

Validate