start importing wiki articles from github

This commit is contained in:
root
2019-09-15 14:42:17 -04:00
parent ada1e6032c
commit f0cbce70a4
32 changed files with 995 additions and 14 deletions

View File

@@ -0,0 +1,52 @@
---
title: safe scripting the tilde way
author: michaelcoyote
---
Welcome to tilde.club. For many of you this may be your first multi-user host and for even more of you this may be your *first* host. Welcome to all of you.
Whether you are used to Unix, Linux and programming or a complete beginner please consider this an invitation to create and build new things.
It's important when creating however that we respect the shared environment and that we respect the boundaries of others.
As Paul says:
> no drama. be respectful. have fun.
What does that mean with respect to scripting and programming on a shared host?
- DOs
- Respect shared CPU/Disk/Network resources
- Keep things that require a tilde.club login local to the server (don't post publicly) :
- Finger info
- local home directory files such as `~/.plan` and `~/.profile` files
- Note that exceptions could include an opt-in file or special permissions from the user.
- Respect `robots.txt` when writing web crawlers
In short use your common sense and consider how your actions may affect others.
If you are unsure if something is a good idea or not, head to irc or message using the `wall` command and ask others what they think.
If you want a conclusive answer, contact one of the system operators.
##### Thinking privacy
Consider the source of the data.
E.g. We know that finger data might contain personal data such as phone numbers, and other identifying information and is not generally available without a tilde.club login.
Before exposing data such as this to the world, it should check for an opt in file such as the .public file file test before presenting info to the outside world.
#### Shared Resources
- In general
- Consider executing long running processes during overnight hours when fewer users are on the system
- CPU
- Use the `nice` command to keep intensive processes from affecting others
- The `nice -n19 -p$$` placed in a script will make sure it runs at the lowest priority.
- Run a long command at the lowest CPU priority: `nice -n 19 ~/bin/command`
- Change the priority of process 923 (also known as "re-nicing a process") : `renice -17 -p923`
- Disk
- On any commands that will heavily use disk, consider using the `ionice` command so that scripts will not affect interactive users
- By adding the `ionice -c3 -p$$` command to any script, it will only use disk when idle.
- You can also run a command or script: `ionice -c3 -t ~/bin/command`

View File

@@ -0,0 +1,11 @@
---
title: setting up email
---
Your shiny, new tilde.club account comes with an email account you can use only between tilde.club members. `pine` is a command-line email application to use it, as is `mutt`. Good old-fashioned `mail` works too, although it's a little cryptic.
`pine` is menu driven, and the menus are self-explanatory; it's surprisingly easy to learn, and surprisingly powerful when you want to customize it.
From the command line (after logged in via SSH), type: `pine` and `[return]`
Follow instructions and use the menus at the bottom and top. (Note: When you see the ^ in front of the letter it means you need to use CTRL, otherwise just use the letter.)

14
wiki/source/Time-zone.md Normal file
View File

@@ -0,0 +1,14 @@
---
title: time zones
---
The timezone by default on the server is UTC.
If you want to make it so that your shell prints out dates in localtime for you, run `tzselect`
to find the correct timezone name that you'll need to export as the `TZ` environment variable.
for example, if you're in eastern time, add something like this
`export TZ="America/Detroit"`
to your `.bashrc` .

View File

@@ -0,0 +1,24 @@
---
title: usenet news
---
## this is out of date and the netnews server is down
We're working on it. You'll need a news server to read news, and it's up;
it's `news.tilde.club`.
[[slrn]] is a newsreader; see http://slrn.sourceforge.net/ for details.
[[pine]] can read news; this
[http://www.chebucto.ns.ca/Help/News/PineNews.html](tutorial) might help.
You can also read the [FAQ from U Washington](http://www.washington.edu/pine/faq/news.html).
In Pine do 'S' for setup, 'C' for config, then
set 'NNTP Server (for news)' to news.tilde.club
Then go back to the main menu, and pick Folder List,
A for add, ^t for list
`M-x gnus` in [[emacs]] can read news, but you better know [[emacs]] first before you start.
[[lynx]] reads news, a la `lynx news://news.tilde.club/tilde.general`. It can even post news, but you have to design your own headers.

14
wiki/source/chat.md Normal file
View File

@@ -0,0 +1,14 @@
---
title: Chatting
author: vielmetti
---
Back on the command line, you may want to participate in chat. There is some great chat, likely, or you have questions.
Type: `wall` and `[return]` to tell Terminal you are ready to chat
Type your message to the world and `[return]`
`CTRL+D` to post or `CTRL+C` to change your mind and cancel
Have fun!
If you're tired of reading chats in a window, `mesg n` will turn it off, and `mesg y` will
turn it back on again. And if you want to see more people, look for IRC.

22
wiki/source/edit_index.md Normal file
View File

@@ -0,0 +1,22 @@
---
title: Editing your index.html file
author: vielmetti
---
Type: `nano` index.html to open your index.html file and begin editing
![screenshot of the nano editor](https://tilde.club/~annika/static/nano.png)
Edit your file, willy nilly
When done editing, use `CTRL+X` to close the file
You'll be asked if you want to save; say y and [return] to return to the command line
Refresh your tilde page in your browser to see your new website
Note: If at any time you feel you made a mistake in editing, you can exit and n to not save.
There's more info here about the nano editor; if you're familiar with
emacs or vim they are here too.

12
wiki/source/email.md Normal file
View File

@@ -0,0 +1,12 @@
---
title: Setting up email
author: vielmetti
---
Your shiny, new tilde.club account comes with an email account you can use between tilde.club members as well as internet email. `alpine` is a command-line email application to use it, as is `mutt`. Good old-fashioned `mail` works too, although it's a little cryptic.
`alpine` is menu driven, and the menus are self-explanatory; it's surprisingly easy to learn, and surprisingly powerful when you want to customize it.
From the command line (after logged in via SSH), type: `alpine` and `[return]`
Follow instructions and use the menus at the bottom and top. (Note: When you see the ^ in front of the letter it means you need to use CTRL, otherwise just use the letter.)

View File

@@ -1,6 +1,6 @@
---
title: faq
author: paul ford
author: ford
---
_______________________________________

View File

@@ -0,0 +1,17 @@
---
title: finding your index.html
---
There are some basic command line commands you'll want to Google and learn, but for this tutorial you only need a few:
`ls` = list files and folders in current directory
`cd` = change directories
`vim`, `emacs`, `nano` = a text editor
Type: `ls` to see where you are; you should see a directory called "public_html"
Type: `cd public_html` to browse into that folder
Type: `ls` to see where you are; you should see your index.html file

33
wiki/source/netiquette.md Normal file
View File

@@ -0,0 +1,33 @@
---
title: tilde.club netiquette
---
## Two phrases we use a lot
* DON'T HACK THE GIBSON
* No drama. Be respectful. Have fun. We're all trying, and we're all in this together :)
## Details
First things first, explore and have fun! But remember, this is a single linux server trying to support the weight of several hundred nerds. Don't host servers, don't run heavy processes, don't host giant files. In short, be gentle.
More about [scripting netiquette here](http://tilde.club/#WHEREISTHIS)
Now let's talk about drama. There is a Mary J. Blige song called "No More Drama." If Mary J. Blige would think it was drama, it is drama. No flamewars about emacs/vi, no matter how historically accurate they may be. No guilting people, shaming them, or making them feel bad. More benefit of the doubt and less "are you kidding me?"
## ~ford's SACRED VOWS to the community
I will do my best to do the following things:
1) I will make a weekly backup of the `public_html` directories so when
some teen in Estonia decides to hack in and ruin everything we can
bring up a new server and limp back to life.
2) I won't shut things down without a month of warning and once it's
shut down I'll make sure a file with all the `public_html` directories
is uploaded to archive.org.
3) If any community forms at all (DUBIOUS BUT SURPRISE ME) I promise I
won't blow up the community without, like, first pointing everyone to
some free IRC channel or something.

10
wiki/source/screen.md Normal file
View File

@@ -0,0 +1,10 @@
---
title: terminal multiplexers
---
`screen` is a unix utility that lets you manage multiple shells from within a single window. You switch between them with a few keystrokes. When you disconnect it keeps the processes alive, and you can reconnect from another login.
It's pretty handy. [[tmux]] does a similar set of things.
a nice [screen tutorial](http://tilde.club/~jonathan/screen/) from ~jonathan will walk you through it.

153
wiki/source/security.md Normal file
View File

@@ -0,0 +1,153 @@
---
title: Editing Basic UNIX Security the Tilde way
author: michaelcoyote
---
> "Unix is public by default. This means that other people who use the server can see your files. You can change that on a file-by-file basis. You can also change the default behavior for you. It is totally okay to keep your stuff private. Let us show you how."
Unix was built with a fairly open security policy. It's the kind of system you might expect a bunch of Berkley hippies to design. That said, if it bugs you that someone might be able to look the files in your home directory and you don't want to read any more of this document then run these commands:
cd ~
chmod 711 .
Those will keep anyone on the system from looking at your directory while still allowing your `~youruser` site to work. If you want to have more control over who can view what in your directory, then please read on. You can even come back and read this later, we'll be here.
### Users and Groups
What is a user? For starters, you are a user and so is every other person on the system. Sometimes special user accounts are used for running specific processes (such as the web server) or for handling special administrative tasks.
There are several attributes that define a user.
- username
This is your login id and the name of your homedir
- user id (or uid)
This is your unique numerical id number on the system. This is how the system keeps track of you, your processes, and your files.
- group id (or gid)
This is a unique numerical id number for your primary user group on the system. User groups are the traditional way that users would colaberate on large projects.
For now we only need to know about the username.
#### Welcome to tilde.club, your new home (and homedir)
When you registered for the system, you got an email that contained many things. One of those things was a username, and another was a password. When you logged into the server you were presented with what we call a prompt, and it looked a bit like this:
sh-4.1$
That's boring so type the command `ls -l public_html/index.html`
sh-4.1$ ls -l public_html/index.html
rw-rw-r-- 1 youruser youruser 177 Oct 13 04:51 public_html/index.html
You'll notice that your login shows up, but what does this actually show us?
First of all `ls` is a command to list files and directories. We've given it the command line switch `-l` that tells the `ls` command that we want a long listing of the file or directory attributes, and finally we've given it the filename `my_file` so that we can see its file attributes.
What does this long file listing of `my_file` show us?
-rw-rw-r-- 1 youruser youruser 177 Oct 13 04:51 my_file
---------- --- ------- -------- ----- ------------ -------------
| | | | | | |
| | | | | | File Name
| | | | | +--- Modification Time
| | | | +------------- Size (in bytes)
| | | +----------------------- Group owner
| | +-------------------------------- User owner
| +-------------------------------------- Number of links
+---------------------------------------------- File Permissions
This seems like a lot to take in, but for the purpose of talking about files and security, we'll only need three things: the file permissions, the group owner and the user owner.
- Homework
- Run `ls -la` in your home directory and note the users and permissions of the various files
- Run `ls -l /etc/passwd` and `ls -l /var/log/messages` and compare the permissions and ownership to that of your homedir
### Basics about file and directory permissions
-rwxrwxrwx
----------
| | | |
| | | +--- Other Read/Write/Execute permissions
| | +------ Group Read/Write/Execute permissions
| +--------- User Read/Write/Execute permissions
+----------- Directory/Special flag
The first column at first glance looks like a bunch of alphabet soup, however if you look over a few of them, a pattern begins to emerge. Some lines begin with `d` and there are repeating instances of `r`, `w` and `x`. You might notice that the lines beginning with `d` refer to directories and that many files have `rw-` at the start of the column and `r--` or even `---` at the end of the column. These are important and indicate to the computer and to users how that file can be accessed.
#### Types of permissions
There are three major types of permissions (and a hand full of others)
- Read
Read permission is represented as an `r` and will allow a listing of a directory and reading a file.
- Write
Write permission is represented with a `w` and allows a file or directory to be written to or deleted.
- Execute
Execute permission is represented as an `x` and allows a file (such as a script) to be executed and it allows for a directory to be "traversed"
- Other special permissions and notations in `ls -l`
- `-` means that the permission for that place isn't set. If it's at the beginning of the line, it means it's a normal file.
- `d` at the start of a line isn't a permission really. It just denotes a directory.
- `b` or `c` isn't a permission either, it probably means you did an `ls -l` of the `/dev` directory as those indicate block or character devices.
- `s` is a setuid/setgid permission. It's a special setting that allows you to run a script file or program as a user or a group. It can be used on a directory to make sure files are written as a user/group It's rare to see.
#### Three classes of access permissions
- User permissions
This set of access controls define what an owner can do to her own files or directories. These controls are most often useful to set on a script file you want to run or a file you want to protect from deletion or overwriting.
- Group permissions
This set of access controls define what the group can do to a file or directory. This tends not to matter much in your homedir, but it can matter a lot when working with other users on shared projects.
- Others
These access controls are what you use to allow and others who are not listed as an owner or group member to do to a file or directory. For example, if you remove read permissions from others on your ~/public_html/index.html`, the webserver process will be unable to read your web page.
#### Changing file and directory permissions using `chmod`
Examples
- Homework
- `mkdir -p test/01` and then try the following `chmod` commands
chmod u+rwx test
echo "hello world" > test/a_file
ls -l test
chmod ugo-rw test
ls -l test
ls -l test/a_file
#### Basics about the `finger` and `chfn` commands
How to see others in the system using `finger`
Type the command `finger`
Type the command `finger $USER`
How others see you.
Changing the information people see about you using `chfn`
creating a `~/.plan` and `~/.project` file that's readable
#### More advanced topics
Let's look at the `/etc/passwd` file. What is it? It's a file that contains most of the information about users in the system.
- Homework
- `head -10 /etc/passwd`
- `grep $USER /etc/passwd`
- Note the columns in the `/etc/passwd` file. Note the columns and the `:` separator between them.
Back at our command line, lets type the command `id`:
sh-4.1$ id
uid=501(youruser) gid=501(youruser) groups=501(youruser)`
The `id` command is a tool to show us how the system keeps track of us. From this we can see that according to the system, our user ID (or uid) is 501, and our group id is also 501.
- Homework
- Run `id` in your own directory, then run
- Run `id -u root`
- use the `grep` command to find your uid in the `/etc/passwd` file

10
wiki/source/slrn.md Normal file
View File

@@ -0,0 +1,10 @@
---
title: slrn
---
``slrn`` is a news reader for [[Usenet]].
Documentation for slrn can be found at http://slrn.sourceforge.net
Tilde-specific slrn info is on http://tilde.club/~joeld/slrn.html

View File

@@ -1,10 +1,6 @@
---
author: benharri
published: true
title: ssh
description: ssh tutorial and background info
category:
- main
---

11
wiki/source/tin.md Normal file
View File

@@ -0,0 +1,11 @@
---
title: tin
---
tin is a threaded NNTP and spool based UseNet newsreader for a variety of platforms.
http://www.tin.org/
it's under active development, with a last release on October 3, 2014. It is installed on ``tilde.club``, and should be invoked as `tin -r` to read from the remote news spool. Use <tab> to go to the next unread article and `w` to write a new article.
if you have `tin` on your local box and can do [[ssh port forwarding]], you can read news using it. (details forthcoming).