This is an old revision of the document!
9front on an SDF VPS
An image1 might appear here. A redirect to the SDF VPS - Plan 9 / 9Front home, includes SDF html and wiki tutorials mentioned in the Table of Contents.
- /contrib/???/9front-notes
@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@@@@@
@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@ @@@ @@@@@@@
@@! @@@ @@! @@! @@@ @@! @@@ @@!@!@@@ @@!
!@! @!@ !@! !@! @!@ !@! @!@ !@!!@!@! !@!
!!@!!@!! @!!!:! @!@!!@! @!@ !@! @!@ !!@! @!!
!!@!!! !!!!!: !!@!@! !@! !!! !@! !!! !!!
!!! !!: !!: :!! !!: !!! !!: !!! !!:
!:! :!: :!: !:! :!: !:! :!: !:! :!:
::::: :: :: :: ::: ::::: :: :: :: ::
: : : : : : : : : : :: : :
About
Getting Involved
Plan 9 has active communities which mostly interact by email. You are encouraged to join the 9fans mailing list where discussion about Plan 9, and related technologies occur.
SDF hosts the plan9-l mailing list for participants in the Plan 9 Boot Camp. Email 'majordomo' and 'subscribe plan9-l' to join.
Of the various VPS that SDF offers1, the SDF Plan 9 Boot Camp VPS is the only VPS provided without subscription, to SDF MetaARPA2 members. The Boot Camp VPS slice includes cluster access to the SDF Plan 9 Community 9p server. With your help, Plan 9 participation at SDF can continue to promote networking, learning and participation. To request an SDF Boot Camp Plan 9 VPS, type 'plan9' at the SDF shell3 ($ plan9
).
1 VPS membership, or participation, required. 2 Type 'meta' at the SDF shell ($ meta
) for details. 3 UNIX Shell Account.
Console Menu and Shell
x | ctl-h is backspace, kind of; ctl-u erases the current line. As seen, with the VPS Plan 9 console prompt ctl-h backspace, the screen output may not be what one would expect1. |
x | To detach the Plan 9 console prompt (%), while retaining the ability to reattach it without rebooting your server, press ctl-] to close the prompt (%). Then, press 'q' to disconnect the VPS Maintenance Shell menu, and ssh connection. You can return again with another ssh to the allocated VPS server, an SDF VPS Maintenance Shell menu review, and a press on the 'c' key to connect to the Plan 9 console prompt (%). |
1 Control keys -- Available at the SDF Boot Camp VPS server console prompt
Getting started
x | If you are reviewing this, and want to 9front Drawterm to the new 9front Boot Camp VPS follow this suggested path. |
x | Install the 9front Drawterm, since it's needed for the 9front Boot Camp VPS. |
x | Write down your Plan 9 Boot Camp password (except for the Plan 9 Drawterm password). |
x | Write down your Plan 9 Boot Camp IP address (YOUR_IP, as seen in the reminder below). |
x | The VPS Maintenance Shell console will ask for the password before confirming a shutdown 's', or a start 'r'. Keep your password nearby. |
x | Request assistance, encouragement, or help. |
Reminder links
Install
After receiving notification of an allocated VPS slice, connect by '$ ssh <SDF member ID>@<VPS slice>.sdf.org
'. The password1 is the same as your SDF member login. At the VPS Maintenance Shell menu, type 'x' for a Clean Install.
% WARNING! YOU WILL LOSE YOUR DATA!
This function allows you to completely destroy your plan9 image
and install a fresh generic distribution.
Do you wish to continue? (yes/no) yes
% Copying a fresh plan9 image [PLEASE WAIT]
% Copying a fresh plan9 image [PLEASE WAIT] [COMPLETE]
(continue)
Basics
When the Plan 9 system boots, it will ask where root is from (the network, or a local disk). Just press the '[Enter]' key to select local (the default), “bootargs is (tcp, tls, il, local!device)[local!/dev/sdC0/fscache]”. Next, there will be prompt to login. Press the '[Enter]' key to login as the Plan 9 default “user[glenda]:”.
bootargs is (tcp, tls, il, local!device)[local!/dev/sdC0/fscache]
user[glenda]:
You will now see the Plan 9 VPS console rc prompt (%), Plan 9's shell.
Plan 9 shell
x | ctl-h is backspace, kind of; ctl-u erases the current line. As seen, with the VPS Plan 9 console prompt ctl-h backspace, the screen output may not be what one would expect. |
x | To detach the Plan 9 console prompt (%), while retaining the ability to reattach it without rebooting your server, press ctl-] to close the prompt (%). Then, press 'q' to disconnect the VPS Maintenance Shell menu, and ssh connection. You can return again with another ssh to the allocated VPS server, an SDF VPS Maintenance Shell menu review, and a press on the 'c' key to connect to the Plan 9 console prompt (%). |
1 A VPS password change option is available from the VPS Maintenance Shell, after login.
Networking
x | Networking: The “Networking” description from the “Plan 9 on an SDF VPS” may not apply to this tutorial. |
x | Review the /usr/glenda/start file, or rc script, from the VPS console prompt (%). |
term% cat /usr/glenda/start
The mentioned /usr/glenda/start
file does not require immediate editing. Very minor edits1 can be made with % ed
, or % sam -d
, from the VPS console prompt (%), or later with % ed
, % sam
, or % acme
, from the Drawterm rio rc prompt (%).
x | This shutdown and restart section applies, and is necessary2 after an % fshalt , before the networking is restarted. |
1 % man dp9ik
2 % fshalt
from an rc prompt (%), then at the “VPS Maintenance Shell” enter 's' - force shutdown, then enter 'r' - reset or start.
9front Drawterm
Drawterm1 is essentially a BLIT terminal emulator which allows you to connect to your 9front system and load the rio windowing system. rio is a direct successor of UNIX 'layers' and Plan 9 '8½'.
$ ./drawterm -h YOUR_IP -u glenda
From the 9front Drawterm screen
1 | Press [Enter] once. |
2 | Type your Drawterm password, then press [Enter]. |
Plan 9 Console | Keyboard activity |
auth[your.IP.exhibt.here]: | ⇐ Press [Enter] once. |
glenda@plan9 dp9ik password: | ⇐ Type your Drawterm password, then press [Enter] |
The cpu: failed to chdir to message is not uncommon. |
From rio:
New | ⇐ release the button here |
Resize | |
Move | |
Delete | |
Hide | |
1 | At the rio grey screen, press the right button of your mouse. A menu (above) should appear. Then, release the button over the “New” option. |
2 | Now, press the right button again near the upper-left corner of Drawterm, and drag the mouse to the lower-right before releasing the button, drawing a rectangle. |
New | |
Resize | |
Move | |
Delete | ⇐ delete a window gracefully |
Hide | |
There is a “Delete” option in addition to the “New” option. This “Delete” option is useful. It will delete a window gracefully. |
New | |
Resize | |
Move | |
Delete | |
Hide | ⇐ hide a window |
There is a “Hide” option in addition to the “New” option. |
1 Drawterm is a X11 application that allows one to connect to a remote Plan 9 server…; a graphical client for Plan 9 CPU servers. DRAWTERM http://drawterm.9front.org
Drawterm and file transfer
A 9front Drawterm note:
Command | 9front Drawterm output |
$ ./drawterm –help | usage: drawterm [-GBO] [-h host] [-u user] [-a authserver] [-s secstore] [-e 'crypt hash'] [-k keypattern] [-p] [-t timeout] [-r root] [-c cmd …] |
Although missing from the “$ ./drawterm –help ” output, the “-r /path/to/local/directory” option will show the “/path/to/local/directory” files in “/mnt/term”. This means that you can transfer files between the computer that you are connecting from and your 9front VPS simply by copying files in /mnt/term and getting them from your computer (or the reverse.) |
Example: $ ./drawterm -h YOUR_IP -u glenda -r /path/to/local/directory |
Closing Drawterm
Introduction to Operating Systems Abstractions Using Plan 9 from Bell Labs (pdf; external archive) |
1.3. Leaving the system; Page 6. |
To leave your terminal you have all you need. Press the terminal power button (don’t look at the window system for it) and switch it off. Because the files are kept in the file server, any file you changed is already kept safe in the file server. Your terminal has nothing to save. You can switch it off at any time. |
local os:
Drawterm | application |
Quit | ⇐ select quit |
A 9front rcpu application
From the plan9front Raspberry Pi rio rc terminal prompt (%):
Edit the /lib/ndb/local file:
x | The echo 'auth=9p.sdf.org authdom=9sdf' » /lib/ndb/local is only applied initially. The results are retained. |
% echo 'auth=9p.sdf.org authdom=9sdf' >> /lib/ndb/local
Check if factotum is running:
term% ps | grep factotum
glenda 130 0:00 0:00 168K Pread factotum
x | Start factotum if it is not running. |
term% auth/factotum
RCPU to 9p.sdf.org
x | A 9p.sdf.org user name (-u USER ) is required. |
% rcpu -h 9p.sdf.org -u USER
password:
!
x | Once connected to 9p.sdf.org: |
cpu% cd $home
x | Start the rio1,2 window system: |
cpu% rio
cpu% stats -lmisce
An incorrect password repair example:
% cat /mnt/factotum/ctl
key proto=dp9ik dom=9sdf user=USER !password?
% echo 'delkey proto=dp9ik dom=9sdf user=USER' > /mnt/factotum/ctl
%
1 More about rio 2 More details about rio
9front VPS update tasks
x | 'sysupdate' is reserved1 for the user glenda (Thu Jan 14 08:07:38 GMT 2021). |
x | The VPS Maintenance Shell console will ask for the password before confirming a shutdown [s], or a start [r]. Keep your password nearby. |
x | Step “II.) Updating your system” (% mk install ) will take time. |
x | Optionally, select “scroll” to toggle the window scroll (on). This will reduce the need to manually scroll during the install. |
- /plan9-l/Have_fun/there_is_a_lot_we_can_do_now/
Tasks I.,II., and III., are preformed from the 9front Drawterm VPS connection,
or 9front Drawterm rio rc prompt (%).
Task IV. is preformed from the 9front VPS Maintenance Shell console rc prompt (%).
a.) Due to the way that namespaces work on 9front, change
to the console prompt to preform the "9fs 9fat" in Task IV.
b.) be careful
I.) Updating Ori's git9:
1. git/clone https://github.com/oridb/git9.git
2. cd git9
3. mk install
II.) Updating your system:
1. type 'sysupdate' - note if changes are brought in.
(you can 'cat /bin/sysupdate' to see how it works)
(also just an 'hg incoming' will tell you what patches are available)
2. cd /
3. . /sys/lib/rootstub (you can 'cat /sys/lib/rootstub' to see)
4. cd /sys/src
5. mk install
III.) Updating your kernel:
1. cd /sys/src/9/pc64
2. mk
IV.) Installing your new kernel:
From the vps?.sdf.org console:
1. type '9fs 9fat'
# be careful:
2. cp /sys/src/9/pc64/9pc64 /n/9fat/9pc64
3. fshalt
4. select menu option 's' and then 'r'
OR, from the Drawterm rio rc prompt:
1. % cd
2. % pwd
/usr/glenda
3. % bind -a '#S' /dev
4. % 9fs 9fat
5. % cp /sys/src/9/pc64/9pc64 /n/9fat/9pc64
6. % echo sync >>/srv/hjfs.cmd
7. % fshalt
8. Select menu option 's' and then 'r' from the vps?.sdf.org console.
V.) Your system should boot completely up-to-date.
clean or nuke:
x | clean - The clean target removes object files and yacc intermediate files but does not touch the library. The nuke target removes the library as well as the files removed by the clean target.2 |
x | nuke - The nuke target removes the library as well as the files removed by the clean target.2 |
If you have done a 'sysupdate' and have issues with mk install failing, try this.
- /plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src
2. mk clean
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install
OR (only if necessary)
- /plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src
2. mk nuke
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install
If you have done a 'sysupdate' and have issues with mk install failing due to a specific directory, try this (a upas example only, select the appropriate directory).
- /plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src/cmd/upas
2. mk clean
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install
OR (only if necessary)
- /plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src/cmd/upas
2. mk nuke
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install
1 Pending further evaluation. 2 Plan 9 Mkfiles
Working in 9front
When using Drawterm1 to connect to the SDF 9front cpu server, your local files will be available at “/mnt/term”: “% lc /mnt/term
”. You can copy files between the SDF 9front VPS and your local os without the use of additional protocols. In other words, when working with Drawterm, your environment is a composite of your local os and the Plan 9 system – technically it is a three node grid, because the Drawterm program acts as an ultra-minimal independent Plan 9 terminal system, connecting your host os to the SDF 9front cpu server.
% lc -l /mnt/term
From a rio window:
cut | |
paste | |
snarf | |
plumb | |
look | |
send | |
scroll | ⇐ toggle window scroll |
x | Press the middle mouse button, while the pointer is over a rio window. Select “scroll” to toggle the window scroll (on/off). |
x | A carefree scroll setting for room plan9 in com (toggle scroll on before % vt -f /lib/font/bit/pelm/unicode.8.font ) |
At the rio rc prompt:
At the Plan 9 rio rc prompt, the DELETE key provides an interrupt. |
At the Plan 9 rio rc prompt, the Ctrl+F or INSERT key provides an auto-completion feature within the rio window system. |
x | At the Plan 9 rio rc prompt, the Ctrl+F reports the number of files in the current directory. |
x | Type a few characters and then a Ctrl+F will match. |
At the Plan 9 rio rc prompt, use the Ctrl+B key to go from anywhere in the rio window back to the command prompt. |
At the Plan 9 rio rc prompt, use the Ctrl+A key to go to the beginning of a line. |
At the Plan 9 rio rc prompt, use the Ctrl+E key to go to the end of the line. |
At the Plan 9 rio rc prompt, use the Ctrl+U key to erase the current line. |
At the Plan 9 rio rc prompt, use the Ctrl+W key to erase the previous word. |
At the Plan 9 rio rc prompt, use the Ctrl+I key to tab. |
At the Plan 9 rio rc prompt, the “” executes the previous command. |
At the Plan 9 rio rc prompt, the “ prints the previously used command. |
At a rio window, ESC changes the border.Then it accepts multiple commands and when ESC is pressed again they are issued together. |
% pwd
/usr/glenda
% cd lib/mothra
% lc
hit.html
% "" c
% cd lib/mothra
Can't cd lib/mothra: 'lib' directory entry not found
% "" l
% lc
hit.html
%
profile:
% cat /usr/$user/lib/profile | grep rio
RIO: | rio -i riostart | Its -i option names a startup script, which typically contains several window commands generated by wloc. |
RIO: | rio -i riostart -s | The -s option initializes windows so that text scrolls; the default is not to scroll. |
RIO: | rio -i riostart -b | The -b option reverses the normal color scheme for windows, painting white text on a black background. |
profile and rules
x | A user profile: /usr/$user/lib/profile |
x | A user profile: /usr/$user/lib/plumbing |
x | Some 9front plumber rules are located in /sys/lib/plumb/basic |
x | Some 9front plumber rules are located in /mnt/plumb/rules |
At the rio rc prompt:
slay:
slay, broke, dontkill - print commands to kill processes
x | The 'webfs' process is used to illustrate the 'slay' command. |
x | A way to clear the browser cache. |
% slay webfs
@{echo kill>/proc/527/ctl} # webfs
@{echo kill>/proc/612/ctl} # webfs
@{echo kill>/proc/683/ctl} # webfs
1 | Press the left mouse button, and sweep, to highlight (in grey) the % slay webfs output text. |
2 | Press the middle mouse button to select 'send'. |
3 | Release the middle mouse button to complete the 'send' to rc (% slay webfs | rc ). |
cut | |
paste | |
snarf | |
plumb | |
look | |
send | ⇐ release the middle mouse button here |
noscroll | |
ns:
x | ns - display name space |
x | ns [ -r ] [ pid ] |
x | ns prints a representation of the file name space of the process with the named pid, or by default itself. |
An ns example.
1 | In one Drawterm rio window, enter these two commands at the rio rc prompt (%). The sam editor will start. |
cpu% touch test.edit
cpu% sam test.edit
2 | In another Drawterm rio window, enter these three commands at the rio rc prompt (%). Use the pid from your “sam test.edit” line. |
cpu% ps -a | grep sam
glenda 1280 0:00 0:00 188K Pread sam test.edit
glenda 1282 0:00 0:00 312K Rendez samterm [main]
glenda 1283 0:00 0:00 312K Pread samterm [mouseproc]
glenda 1284 0:00 0:00 312K Pread samterm [kbdproc]
glenda 1285 0:00 0:00 312K Pread samterm
glenda 1286 0:00 0:00 312K Pread samterm
glenda 1290 0:00 0:00 56K Pread grep sam
cpu% ns 1280 | grep tmp >view.tmp
cpu% cat view.tmp
bind -c /n/other/usr/glenda/tmp /usr/glenda/tmp
bind -c /n/other/usr/glenda/tmp /tmp
1 Taken from Expanding your Grid …CPU AND DRAWTERM CONNECTIONS BETWEEN MULTIPLE MACHINES.
Editors
x | The “Plan 9 on an SDF VPS” applications tutorial (Sam, Ed, and Acme) applies to this tutorial. |
sam:
Sam is a screen editor.
% pwd
/usr/glenda
% cp /usr/glenda/lib/profile /usr/glenda/lib/EDprofile
% sam /usr/glenda/lib/EDprofile
1 | While the cursor is over the sam window, press the right button of your mouse and drag the cursor over the file name. |
2 | Release the right mouse button once the cursor is over the file name. |
3 | The cursor pointer will change to a square. |
4 | Press the right button, while the square cursor is over the lower panel, to load the file in the lower panel |
new | |
zerox | |
resize | |
close | |
write | |
~~sam~~ | |
- /lib/EDprofile | ⇐ release the right mouse button here |
A few words about 'w' writing the file, and how to 'q' quit sam. |
Commands (sam -d) are typed in the upper panel, while edits are typed in the lower panel. |
Press the left mouse button to activate the upper panel, or the lower panel. |
Type a 'w' in the upper panel, then press '[Enter]'. This saves the file. |
Type a 'q' in the upper panel, then press '[Enter]'. This quits sam. |
cut | |
paste | |
snarf | |
plumb | |
look | |
<rio> | ⇐ toggle cut&paste buffer |
send | |
1 | Press the middle mouse button, while the pointer is over a sam window. |
2 | Select “<rio>” to toggle the sam cut&past buffer to rio (on/off). The default cut&paste buffer is sam. |
'sam -d':
% sam -d | Editing will be done with the command language only, as in ed. |
ed:
Ed is a text editor, and similar to 'sam -d'.
acme:
% acme
Newcol Kill Putall Dump Exit |
New Cut Paste Snarf Sort Zerox Delcol |
% acme SDF_User_Contributed_Tutorials.html
Newcol Kill Putall Dump Exit |
New Cut Paste Snarf Sort Zerox Delcol | |
SDF_User_Contributed_Tutorials.html Del Snarf : Look | ⇐ Replace Look with Edit ,s/Booting/Rowing/g |
Newcol Kill Putall Dump Exit |
New Cut Paste Snarf Sort Zerox Delcol |
SDF_User_Contributed_Tutorials.html Del Snarf : Edit ,s/Booting/Rowing/g |
- snippet: SDF_User_Contributed_Tutorials.html
<p>
This is the tutorial for setting-up the 9front<sup>2</sup> operating system in a VPS slice on SDF. The tutorial is aimed at participants in the SDF <a href="/doku.php?id=vps_-_plan_9#about" class="wikilink1" title="vps_-_plan_9" data-wiki-id="vps_-_plan_9">Plan 9 Boot Camp</a><sup>3</sup>, but should be useful to other SDF VPS users. More recently, the <em>Boot Camp</em> participants will begin studying virtualized <em>amd64 9front</em>.
</p>
<p>
<sup>1</sup><a href="https://en.wikipedia.org/wiki/ASCII_art" class="interwiki iw_wp" title="https://en.wikipedia.org/wiki/ASCII_art">ASCII art</a> <sup>2</sup> <a href="http://fqa.9front.org/fqa1.html" class="urlextern" title="http://fqa.9front.org/fqa1.html" rel="ugc nofollow">Plan9front</a> (or <em>9front</em>) is a fork of the <em>Plan 9</em> from <a href="https://9p.io/plan9/index.html" class="urlextern" title="https://9p.io/plan9/index.html" rel="ugc nofollow">Bell Labs operating system</a>; <a href="https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs#Derivatives_and_forks" class="interwiki iw_wp" title="https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs#Derivatives_and_forks">Plan 9 Derivatives and forks</a>. <sup>3</sup> <a href="https://en.wikipedia.org/wiki/Booting" class="interwiki iw_wp" title="https://en.wikipedia.org/wiki/Booting">Booting</a>
</p>
1 Sam (text editor) 2 ed (text editor) 3 Acme (text editor)
Mothra
x | The “Plan 9 on an SDF VPS” Browsing the web tutorial (Abaco) applies to this tutorial. |
mothra - retrieve and display World-Wide Web files
% mothra
% webfs; mothra -k
%
rio rc send:
x | The previously issued 'webfs; mothra' string is used to illustrate the 'send' selection. |
x | Another way to 'send' commands the rio rc prompt (%). |
1 | Press the left mouse button, and sweep, to highlight the webfs; mothra input text. |
2 | Press the middle mouse button to select 'send'. |
3 | Release the middle mouse button to complete the 'send' to rc (% webfs; mothra | rc ). |
cut | |
paste | |
snarf | |
plumb | |
look | |
send | ⇐ release the middle mouse button here |
noscroll | |
mothra save hit:
While using mothra, the 'save hit' and 'hit list' is accessed by pressing the right mouse button. The right mouse button 'save hit' selection will add the current URL to $home/lib/mothra/hit.html
. The right mouse button 'hit list' selection will display the hit list in the mothra browser.
alt display | |
moth mode | |
snarf | |
paste | |
plumb | |
search | |
save hit | ⇐ release the right mouse button here |
hit list | |
exit | |
- snippet: $home/lib/mothra/hit.html
<html><head><title>Hit List</title></head>
<body><h1>Hit list</h1>
<p><a href="http://wiki.sdf.org/doku.php?id=vps_-_plan_9_9front">http://wiki.sdf.org/doku.php?id=vps_-_plan_9_9front</a>
Shutdown and restart
- /reveal/bc/VPS/Shell
VPS Maintenance Shell for plan* (xxx.xxx.xx.xx)
no stats collected.
[c] - Connect to your console
[l] - list your status
[r] - reset or start
[s] - Force Shutdown (not an OS shutdown)
[t] - toggle your Operating System
[i] - Switch your VPS ID (multiple VPS members only)
[x] - Clean install (destroys data)
[p] - Change your vps.sdf.org password
[u] - View current interface statistics
[U] - View all recorded interface statistics
[q] - Disconnect
[30-Oct-20 22:59:17] Command: q
Connection to vps? closed.
$
x | % fshalt from a Drawterm rio rc prompt (%), is okay. Close the local Drawterm application separately. |
From the 9front Drawterm rio rc prompt:
cpu% fshalt
halting.../srv/cwfs.cmd...
done halting
cpu%
x | % fshalt from the 9front VPS console rc prompt (%), then at the “VPS Maintenance Shell” enter 's' - force shutdown, then enter 'r' - reset or start. |
From the 9front VPS Maintenance Shell console prompt:
term% fshalt
halting.../srv/cwfs.cmd...halted at Fri Oct 30 15:58:54 2020.
done halting
term%
1 | Press ctl-] to continue, if viewing where the VPS console rc prompt (%) was once active. Press the '[Enter]' key to access the VPS Maintenance Shell (may apply). |
x | From the VPS Maintenance Shell enter 's' - force shutdown, then enter 'r' - reset or start, or 'q' - disconnect. Enter 'l' to list your status. |
x | From the VPS Maintenance Shell enter 's' - force shutdown before starting the SDF 9front VPS. Ping the SDF Plan 9 VPS IP address (YOUR_IP) to determine if the VPS is running with networking. |
$ ping YOUR_IP
Command reminder
x | Previously mentioned commands from Plan 9 on an SDF VPS. |
A screenshot within Drawterm, or from a rio rc prompt.
% topng </dev/screen >screenshot.png
% png screenshot.png
Command | Example |
TOPNG: | % topng </dev/screen >screenshot.png |
Adding a User
x | 'sysupdate' is reserved for the user glenda (Thu Jan 14 08:07:38 GMT 2021). |
x | Adding a User: The “Adding a User” description from the “Plan 9 on an SDF VPS” does not apply to 9front. |
You may want to add a user to your system once you get the hang of things. There is really no need to create a new user when you are first starting out. It's safer to use the Drawterm rio rc prompt (%) for the following task, should there be a need for the '[Backspace]' key.
To create a new user, you must connect to the file server console by typing: 'con -C /srv/cwfs.cmd
'1. Once at the file server prompt (a blank
), create a new user. Replace USER with what you want your new user to be named: 'newuser USER'. You will need to add that USER to the “sys” group if you want it to be able to change system configuration files. Again, change USER to what your new user name is: 'newuser sys +USER'. Exit the file server console prompt (a blank
) by typing: 'ctrl+\'. You will now be at the ”> > >
“ prompt; type 'q' to quit the ”> > >
“ prompt.
% con -C /srv/cwfs.cmd
newuser USER
newuser sys +USER
newuser adm +USER
newuser upas +USER
Ctrl+\
>>> q
%
The following steps assume that you have edited files while user “glenda”, have run '% fshalt' from the VPS console rc prompt (%) or Drawterm rio rc prompt (%), been able to ”[s] - Force Shutdown“ and ”[r] - reset or start“ the VM from the VPS Maintenance Shell, and have used 9front Drawterm successfully. Enter the new “USER” name after an 'fshalt' and a VPS Maintenance Shell [s] - Force Shutdown and [r] - reset or start.
user[glenda]:
← Enter the new 'USER' name.
Verify your new ”USER“ login with 'pwd
' or 'lc -l
'. Stop if 'pwd
' does not show your new “USER” name.
Initialize the new user environment with '% /sys/lib/newuser
', from the VPS console prompt (%).
term% /sys/lib/newuser
A list of eight directory and file tasks.2
- /plan9-l/Have_fun/add_an_unnecessary_user/
mkdir /n/other/usr/$user
mkdir /n/other/usr/$user/tmp
cp -x /usr/glenda/sdf /usr/$user/sdf
cp -x /usr/glenda/start /usr/$user/start
cp -x /usr/glenda/bin/rc/riostart /usr/$user/bin/rc/riostart
cp /usr/glenda/lib/profile /usr/$user/lib/profile
mkdir /usr/$user/www
cp /usr/glenda/www/* /usr/$user/www/
A list of one pending task.3
- /plan9-l/Have_fun/pending_task/
bind -c /n/other/usr/$user/tmp /usr/$user/tmp
A list of two optional tasks.
- /plan9-l/Have_fun/optional_tasks/
mkdir /usr/$user/lib/mothra
cp /usr/glenda/lib/mothra/hit.html /usr/$user/lib/mothra/hit.html
The mentioned eight tasks are preformed from the VPS console prompt (%).
term% mkdir /n/other/usr/$user
term% mkdir /n/other/usr/$user/tmp
term% cp -x /usr/glenda/sdf /usr/$user/sdf
term% cp -x /usr/glenda/start /usr/$user/start
term% cp -x /usr/glenda/bin/rc/riostart /usr/$user/bin/rc/riostart
term% cp /usr/glenda/lib/profile /usr/$user/lib/profile
term% mkdir /usr/$user/www
term% cp /usr/glenda/www/* /usr/$user/www/
A VPS console prompt (%) % sam -d
edit example, similar to % ed
. Optionally, a new user start file can be created while user glenda is connected with Drawterm, before a new user is created. The ed, sam, and acme editors are usable with a Drawterm rio rc prompt (%).
- /plan9-l/Have_fun/edit_start/
term% lc start
start*
term% cp start start2
term% sam -d start2
-. start2
/=glenda
=glenda
echo 'key proto=dp9ik dom=plan9 user=glenda !password=L0gWlaM' > /mnt/factotum/ctl
s/=glenda/=moth1
/=L0gWlaM
=L0gWlaM
echo 'key proto=dp9ik dom=plan9 user=moth1 !password=L0gWlaM' > /mnt/factotum/ctl
s/=L0gWlaM/=fR0g1m3
/glenda
glenda
ip/httpd/httpd -a $myip -w /usr/glenda/www
s/glenda/moth1
.
ip/httpd/httpd -a $myip -w /usr/moth1/www
w
start2: #273
q
term%
Start Drawterm from the local operating system, after the /usr/$user/start
user name is changed, and the /usr/$user/start
www directory name is changed.
$ ./drawterm -h YOUR_IP -u new USER
1 For the cwfs file server, only ("halting.../srv/cwfs.cmd..."). 2 7.3.1 - Adding users New users are created without a profile, mail directory, tmp directory (needed to edit files with sam) or other confections (sdf, start, riostart, www, index.html). 3 7.3.1 - Adding users The default system /lib/namespace does the following: bind -c /n/other/usr/$user/tmp /usr/$user/tmp
x | Configure a Time zone: The “Configure a Time zone” description from the “Plan 9 on an SDF VPS” does not apply to 9front. |
You might want to configure your system's timezone1. Identify the timezone with '% lc /adm/timezone
'. Assuming that the CET time zone is appropriate, login as the user 'adm'2 'glenda' and 'cp /adm/timezone/CET /adm/timezone/local'. Last, while user “glenda” edit the “TIMESYNCARGS” line in the ”/rc/bin/termrc“ (or ”/rc/bin/cpurc“), using an NTP service. Set it to “TIMESYNCARGS=(-n pool.ntp.org)” and reboot3.
user[glenda]:
% lc /adm/timezone
% cp /adm/timezone/CET /adm/timezone/local
% sed 4q /rc/bin/termrc
#!/bin/rc
# this file is run if service=terminal
#TIMESYNCARGS=(-rLa1000000)
TIMESYNCARGS=(-n pool.ntp.org)
%
% sam /rc/bin/termrc
% fshalt
1 Plan 9 Wiki Installation Instructions, SETTING UP CORRECT TIMEZONE section. 2 '% cat /adm/users | grep adm
' 3 '% fshalt
' from an rc prompt (%), then at the “VPS Maintenance Shell” enter 's' - force shutdown, then enter 'r' - reset or start.
Plan 9 Boot Camp
SDF periodically runs a Plan 9 Boot Camp which is open to anyone with an SDF user1 account. Of the various VPS that SDF offers2, the SDF Plan 9 Boot Camp VPS is the only VPS provided without subscription, to SDF MetaARPA3 members. These Plan 9 Boot Camps are announced about 30 days before they begin and are often set around the International Workshop on Plan 9 conference4. They are usually a seasonal occurrence and run for about 2 months.
Why learn Plan 9 as a group? |
Plan 9 wants a community. |
Yes you can learn a lot on your own but Plan 9 was designed with a network of machines and users in mind. |
Activities of the SDF Plan 9 Boot Camp include:
x | Installation or pre-generated Plan 9 instance under Xen |
x | Self Guided Discoveries in: ed, network configuration |
x | Self Guided Discoveries in: drawterm (from your computer), rio and stats |
x | Self Guided Discoveries in: acme, sam, abaco, mothra and man |
x | Self Guided Discoveries in: mapdemo, catclock, juggle and tetris |
x | Self Guided Discoveries in: 9front and contrib via ftpfs |
x | Self Guided Discoveries in: 9fans mailing list and faces |
During the SDF Plan 9 Boot Camp you are encouraged to make screenshots and videos of your Self Guided Discoveries and share your experiences on plan9-l to inspire others to do the same. Participants in the Plan 9 Boot Camps also get a contrib directory on ftp.sdf.org (in pub/sdf/plan9/contrib). This directory persists and can be used perpetually for Plan 9 related sharing.
1 UNIX Shell Account. 2 VPS membership required. 3 Type ”meta“ at the SDF shell ($ meta
) for details. 4 International Workshop on Plan 9 http://iwp9.org/
Boot Camp Discoveries or Challenges
Discoveries, or challenges, are mentioned on plan9-l or live on twitch.
Recommended:
A self guided challenge:
SDF Fall 2020 Plan9 Boot Camp "Tea Note" Presentation
Some "Tea Note" Presentation commands from the rio rc prompt (%).
Other “Tea Note” Presentation examples from the rio rc prompt (%).
FILE: | % for (i in *) file $i |
9FS: | % 9fs 9fat |
9FS: | % cd /n/9fat (Only from the VPS console rc prompt, if 9front kernel changes are made) |
9FS2: | % 9fs: (Plan 9 % 9fs: ) |
Other "Tea Note" Presentation commands near the SDF prompt ($).
COM: | - toggle backspace, % bksp is now ^H; ctl-h |
Some hints about Plan 9 |
Plan 9's system console is a TTY, not a VT |
In UNIX almost everything is a file, in Plan 9 everything is a file |
Plan 9 is more like UNIX than Linux is like UNIX |
Environment variables are stored and manipulated in /env |
System configuration is in /cfg |
Login configuration is in /rc/bin (termrc or cpurc, also .local files) |
System types: cpu vs. term |
1 Dependent on schedule availability. 2 A snippet from Plan 9 % man srv
: 9fs: – 9fs is an rc(1) script; examine it to see what local conventions apply.
Hello World
SDF Boot Camp Communication resources
These communication resources are dependent on the preference of the “Boot Camp” participants, during a scheduled SDF Plan 9 Boot Camp. Some previous timely resources are $ com
, plan9-l, $ bboard
, mastodon.sdf.org, and wiki.sdf.org. The resources are mentioned in below.
1com partial command help; to begin TALK MODE, press [SPACE].
COMMODE ©1993 |
A: | toggles AFK mode |
e: | emote |
g: | goto a room |
h: | command help |
q: | quit commode |
r: | room history |
R: | extended history |
z: | toggle color mode |
-: | toggle backspace |
SDF Boot Camp 9p resource
Possible "Tea Note" Presentation commands from the 9p rio rc prompt (%).
broke example:
% ps -a | grep Broke
% broke $user
1 plan9front running natively on hardware. 2 NetBSD Xen [] running Plan 9 Boot Camp participants' VMs, during the announced Plan 9 Boot Camp occurrences.
Tutorials
x | 9FRONT FREQUENTLY QUESTIONED ANSWERS http://fqa.9front.org/ |
x | README - “This brief document is intended to help you get started using Plan 9.” (slightly outdated) |
An SDF Plan 9 Boot Camp snippet from @SDF (Sept. 26, 2020) |
Plan 9 VPS tutorial
x | Plan 9 on an SDF VPS tutorial (wiki) |
x | Getting Started with Plan 9 Drawterm |
x | Sam (% sam -d ) |
x | Ed (% ed ) |
x | Acme (% acme ) |
x | Abaco (% abaco ) |
x | Mothra (% mothra -k ) |
x | Useful Plan 9 Commands |
Reference book
Conclusion or close
The wiki formatting used in this tutorial was reviewed with the SDF Plan 9 Boot Camp plan9front mothra browser, and the mothra option '-k': % mothra -k
. The intention was to support those SDF Plan 9 Boot Camp participants who may participate (in the Boot Camp) with a low-speed Internet connection. The outcome of the mentioned formatting decision is pending the approval of future wiki editors. Have fun.