Who else is here

A shell account used to be a social place — the machine had other people on it, and you could tell. Most of that is still here, and it takes about two minutes to learn.

Seeing who is around

who              # who is logged in, on which terminal, since when
w                # the same, plus what each person is running
last | head -20  # recent logins, including your own
last yourname    # your own login history — worth a look now and then
users            # just the names, one line

w is the one to remember. It answers "is anyone else here right now" and "has this box been busy" in one screen.

finger yourname  # login name, home directory, shell, last login

finger reads what the system already knows; it is not a profile system, and there is no finger daemon here, so nobody outside the box can query it.

What other people can and cannot see

This matters on a shared machine, so it is worth being precise.

  • Visible to others: that you are logged in, from when, on which terminal, and your username.
  • Not visible: your processes. This box runs with hidepid, so ps shows you your own processes and nothing else — a password on somebody's command line is not readable by other users. (Staff can see the process table; that is what running the machine involves.)
  • Not visible: your files, unless you make them readable. New files default to being readable by others on many systems — check with ls -l, and use chmod 600 for anything private.
  • Public by definition: everything in ~/public_html.

If you want to be thorough about your home directory:

chmod 711 ~            # others can pass through to public_html, not list
chmod 700 ~/.ssh       # already the case, but check
ls -l ~                # look at what is world-readable

Sending a message to the machine

wall writes a message to everyone's terminal:

echo "restarting my bots, ignore the join spam" | wall

It reaches only people currently logged in with a terminal, and it interrupts whatever they are reading — which is why the convention was always that wall is for things that affect other people, not for chat. Staff use it for "the box is going down in five minutes".

The classic one-to-one tools, write and talk, are not installed. On a box built around IRC that is not much of a loss: the actual conversation happens on IRC, and everyone here already has a client and a bouncer.

Is it me or is it the box

uptime           # load average and how long since the last reboot
htop             # live processes — yours, plus system totals
usage            # your own memory, processes and disk
df -h /          # disk space on the whole machine
free -h          # memory across the machine

Load average is three numbers: the last one, five and fifteen minutes. On a two-core box, sustained load above 2.0 means everything is waiting for CPU. The public status page shows the same figures if you want to check before connecting.

The classics

No shell account is complete without them:

fortune                          # a quotation, since 1979
fortune | cowsay                 # the same, from a cow
figlet ShadowShells              # big letters
figlet -f slant "hello" | wall   # do not actually do this

Also installed, and more useful than they look: cal for a calendar, bc -l for a calculator that does not need a window, watch -n5 'w' to keep an eye on something, and tree to see the shape of a directory.

Etiquette

The short version, which is really just the point of the rules in a friendlier tone:

  • The machine is shared. Before starting something that will run for an hour at full tilt, consider nice -n 10 in front of it.
  • Do not leave a bot flooding a channel. Somebody else's account is the one that gets banned by association.
  • If you find a way to see another user's data, tell staff instead of exploring it. That is the difference between a bug report and an incident.
  • Answer questions from new people. Somebody did it for you.

« All guides