# Tips & Tricks

# RC key bindings

- `PgUp`/`PgDn` - scroll
- `Home`/`End` - go to top/bottom
- `DEL` - terminate program
- `C-f` - auto complete
- `C-a`/`C-e` - go to starte/end of line
- `C-w`/`C-u` - erase word/line

## Mouse

- `L+M` - cut
- `L+R` - paset

# ACME

## Tags

- `win` - rc shell

# Manuals

```
man <name> | page
```

Search man pages:

```
lookman
```

# Networking

```
man ipconfig

ip/ping ibm.com
```

## Get IP/DNS settings

```
cat /net/ndb
```

## Ping

(Del to exit)

```
ip/ping wp.pl
```

## Listen with command

This will listen on TCP port 99 and run `cat` to process data (will echo stuff back).

```
aux/listen1 tcp!*!99 cat
```

## FTP

See `man listen`.

```
aux/listen tcp21
```

## Logs

See for listen log:

```
cat /sys/log/listen
```

# Processes

```
ps -a
```

## Kill

```
Kill <match>
```

Manually:

```
chown 666 /proc/ID/ctl
echo kill > /proc/ID/ctl
```

## Namespace

```
ns
```

### List file descriptors

```
ls /fd
```

### List TCP connections

```
cat /net/tcp/*/^(local remote status)
```

## Drivers

```
cat /dev/drivers
```

## Managing hjfs

Open system console (to avoid spam on the screen):

```
cat /dev/kprint
```

Connect (or use echo instead) to hjfs deamon:

```
con -C /srv/hjfs.cmd
```

CTRL+\\+enter gives `>>` prompt; type `q` to exit `con`.

Commands (see `man hjfs`):

- `df` - disk usage
- `newuser <usename>` - add user to FS
- `newuser <groupname> +<username>` - add user to a group (user?)
- `sync`

List users:

```
cat /adm/users
```

## Logs

Console log:

```
cat /dev/kprint
```

Log files:

```
/sys/log/
```

# Castor9 gemini

- [https://fedi.9til.de/<span class="citation" data-cites="julienxx/105361066071945190">@julienxx/105361066071945190</span>](https://fedi.9til.de/@julienxx/105361066071945190)

Castor9 browser is also available on [http://shithub.us](http://shithub.us) or `9fs 9til.de`

- \#gemini #plan9

# Docs

- [https://9p.io/sys/doc/names.pdf](https://9p.io/sys/doc/names.pdf)

## Stream

- [https://twitch.tv/sdfpubnix](https://twitch.tv/sdfpubnix) (live)
- [https://toobnix.org/](https://toobnix.org/)
- [https://www.worldtimebuddy.com/pst-to-utc-converter](https://www.worldtimebuddy.com/pst-to-utc-converter)

## Challenges

- [https://9p.sdf.org/](https://9p.sdf.org/)
- [https://9p.sdf.org/challenges/index.html](https://9p.sdf.org/challenges/index.html)

## HTML/Gemini

> You are correct, you create the $home/html directory then create your index.html and/or index.gem files there. You can view your user site using the respective:

- [https://9p.sdf.org/who/antics/index.html](https://9p.sdf.org/who/antics/index.html)
- [gemini://9p.sdf.org/who/antics/index.gem](gemini://9p.sdf.org/who/antics/index.gem)

urls.

`curl https://9p.sdf.org/who/index.html -v --insecure`

`curl http://9p.sdf.org/who/hxd/index.html`

They need /usr/web/who/hxd created (mounted?).

See `/bin/mkhomepg`.

# Config files

- `bin/rc/riostart` - script for rio; use `wloc` to see script for current windows
- `/n/9fat/plan9.ini` - boot setting; use `9fs 9fat` to mount first
- `lib/profile` - user specific based boot stuff; starts stuff depening on role (terminal, cpu, cons)
- `/bin/termrc` - boot stuff