Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Improving Your Shell Usage (2010 UWCS Intro Talk)

Improving Your Shell Usage (2010 UWCS Intro Talk)

Introduction to using a shell talk given to new UWCS members in 2010. Overhaul of the 2009 version.

Chris Sinjakli

October 20, 2010
Tweet

More Decks by Chris Sinjakli

Other Decks in Programming

Transcript

  1. Navigation Other useful commands: • cp <source> <destination> - Copies

    <source> to <destination> • mv <source> <destination> - Moves <source> to <destination> • mkdir <name> - Creates a directory called <name> • rm <target> - Removes <target> (no “Are you sure?”, be careful)
  2. Command History A faster way to retype commands • Previously

    typed commands are saved • Up/down arrow keys can be used to access them • Not that useful if you want to go far back
  3. Command History Searching through History Press Ctrl+r to search your

    shell history. As you type, it will narrow down hits in your history.
  4. Leaving things running • Running programs stop when you exit

    the shell • Programs can be left running inside the screen application
  5. Leaving things running Creating a session You can create a

    new session by just using the "screen" command.
  6. Leaving things running Resuming a session The -r switch is

    used to reattach a screen session. $ screen -r [your previous session will appear here]
  7. Leaving things running Resuming a session If you're already attached

    to a session from somewhere else, you'll see something like this: $ screen -r There are screens on: 15716.pts-4.viglab-26 (Attached) There is no screen to be resumed.
  8. Leaving things running Resuming a session You can remote detach

    the running session, allowing you to attach it elsewhere. $ screen -d [remote detached] You can combine the two switches 'screen -dr' to remote detach, then reattach here.
  9. Persistent IRC connection • Leave irssi (an IRC client) running

    in screen • No disconnects/reconnects to the server • Chat history • Used by a lot of our members
  10. Persistent IRC connection With screen open: 1. Run irssi $

    irssi 2. Connect to a server (irc.uwcs.co.uk for ours) /connect <Server Address>
  11. Persistent IRC connection Switching channels • Hotkeys for lower number

    channels (Alt + 1-0, Alt + q-o) • /win <number> command for anything above that • Alt + a to go to next window with activity
  12. Web hosting • Included in membership • YourName.uwcs.co.uk by default

    • 1GB of quota (upgradable) • Support for PHP sites (WordPress, Drupal, etc) • Available to societies
  13. Web hosting • Basics – YourName.uwcs.co.uk – Files in ~/public_html/

    – Just Works (most of the time, some things like Drupal need more config on our side) – Need to request a shell account
  14. Web hosting • Your own domain – Register with your

    preferred registrar – Point DNS records to our server – Nudge techteam to configure our web server • What is your domain name? • Which directory is your site in?
  15. Database • MySQL database for each user • Needs requesting

    separately to shell account • Necessary for WordPress, etc • Also available to societies