Lesson 7: Questions, Answers, Docs

Homepage Content Slides Video

Warning

This lesson is under construction. Learn from it at your own risk. If you have any feedback, please fill out our General Feedback Survey.

When in doubt

$ <program> --help
$ <program> -h

Most programs allow you to pass a help flag which will print out basic usage. This is useful as a quick reference for how to use the program.

Man Pages

$ man <program>
  • Type / and then enter a keyword to see where that word appears.
  • Press n to go to the next (and p to go to the previous) occurrence of that word.
$ man man

MAN(1)                        Manual pager utils                       MAN(1)

NAME
       man - an interface to the on-line reference manuals

SYNOPSIS
       man  [-C  file]  [-d]  [-D]  [--warnings[=warnings]] [-R encoding] [-L
       locale] [-m system[,...]] [-M path] [-S list] [-e  extension]  [-i|-I]
       [...]

DESCRIPTION
       man is the system's manual pager.  Each page argument given to man  is
       normally  the name of a program, utility or function.  The manual page
       [...]

Anatomy of a Man Page

Most Man Pages include:
  • Name
  • Flags
  • Description
  • Basic Usage
  • Authors
If you’re lucky they will also include:
  • A Good description
  • Advanced Usage.
  • Examples
  • History
  • See Also

Sections of Man

  1. Executable programs or shell commands
  2. System calls (function provided by the kernel)
  3. Library calls (functions provided from within libraries)
  4. Special files (usually found in /dev)
  5. Files formats and conventions eg /etc/passwd
  6. Games
  7. Miscellaneous (including macro packages and conventions), e.g., man(7), groff(7)
  8. System administration commands (usually only for root)
  9. Kernel routines [Non standard]

Note

Some distros use info instead of man. To learn more about the info command, see Further Reading.

Project Docs

Where to look:
  • http://docs.some-random-project.io/
  • http://some-random-project.io/docs/
  • http://organization.com/some-random-project/

Questions and Answers

  • Stack Overflow
  • Forums
  • Mailing Lists
  • Blogs
XKCD 979, Wisdom of the Ancients

How to Talk to People

  • Chatrooms
  • Meetups
  • Face to Face (!?)

IRC

Quick Facts:
  • Internet Relay Chat (IRC)
  • Very old (RFC 1459, May 1993)
  • Works on everything (Terminal, GUI, Web-browser, etc)
  • The people you want to listen to are there
  • Oregon State ran one of the first servers ever!

TODO Getting on IRC

To get on IRC, Use irssi or weechat in screen:

# This step is optional, but persistent IRC is cool
$ ssh <username>@<a remote linux server>

# start screen with the name 'irc'
$ screen -S irc

# start your client in the 0th window of the screen session
$ irssi
# or
$ weechat-curses

# exit irc screen with CTRL+a, CTRL+d
# exit ssh session with CTRL+d or 'exit'
# to get back to irc:
$ ssh <username>@<preferred shell host>
$ screen -dr IRC

Connecting and Setup

In the IRC client run these commands

/connect irc.freenode.net

/nick <myawesomenickname>
/msg nickserv register <password> <email>

/nick <myawesomenickname>
/msg nickserv identify <password>

/join #devopsbootcamp

Commands and Tips

  • /list: Reports all the channels on a server.
  • /topic: Reports current channel topic.
  • /names: Reports nicks of users in channel.
  • /join <channel>: Join a new channel.
  • /whois <nick>: Learn about a person.
  • /msg: Directly message an individual.
  • /help <command>
  • Tab-completion works with nicks

  • You get a hi-light when your name is said.

  • Symbols (@, +) are not part of names, show status in channel.

  • chanserv and nickserv are robots.

    • /msg nickserv help to get nick help.
    • /msg chanserv help to get channel help.

IRC Jargon

Jargon definition
  • ping/pong: “I would like to tell you something”/”I’m here, tell it to me.”
  • tail: “~”
  • hat: “@” Denotes admin status in a channel.
  • nick: Your name.
  • netsplit: When the IRC servers lose connection with eachother.
  • kick/ban/k-line: GTFO

Asking for Help

It’s okay to ask for help. Here are some things to keep in mind:

  1. Ask yourself what should be happening?
  2. Ask yourself what is actually happening?
  3. Google the problem(s).
  4. Skim the manuals of each component.
  5. Identify a friend, mentor, or IRC channel who could help.
  6. When they’re not busy, give them a quick synopsis of points 1 and 2, mentioning what possibilities you’ve ruled out by doing steps 3 and 4.

Contributions = expertise + time

Further Reading

  • About info: info is an alternative to man that some distros use instead.