User Tools

Site Tools


rc, ed, network configuration

rc: the Plan 9 shell

  • 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.
  • 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 (%).
  • ed and “% sam -d” are available in the Plan 9 Image. They may be used for setting the DNS, or other tasks from the Plan 9 VPS console prompt (%), before Drawterm is accessible. An ed cheat-sheet is available. Additional editors are operational from a Drawterm Rio rc prompt: acme, sam, or % sam -d.
% sam -d Editing will be done with the command language only, as in ed.

Configuring a dynamic prompt

To have a prompt that shows your pwd and user name, add the following lines to your lib/profile. Place them in the 'case cpu' section replacing the cpu% prompt line

prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ')
fn cd {builtin cd $* && prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ')}

These lines update the prompt, and replace the 'cd' command so that the prompt is updated each time you change a directory.


Ed is a text editor, and similar to sam -d. Using the % sam -d examples from Sam, it's possible to use % ed. The mentioned examples are from a Drawterm Rio rc prompt.

  % cd samtest
  % cp /lib/ndb/local local-1ed
  % ed local-1ed
  ip= sys=localhost dom=localhost
  #ip= sys=localhost dom=localhost
  #ip= sys=localhost dom=localhost
  ip=YOUR_IP sys=plan9 dom=plan9 dns=
  % cp /rc/bin/termrc.local termrc.local-1ed
  % ed termrc.local-1ed
  % ed termrc.local-1ed
  ip/ipconfig -g ether /net/ether0 YOUR_IP
  ndb/dns -r
Command Title Quick Reference
EDed Cheat Sheet

network configuration

1 Control keys -- Available at the SDF Boot Camp VPS server console prompt

Editor reference:

Plan 9 Rc Survival Guide
README (slightly outdated) If you think of it as UNIX, you'll often be frustrated because something doesn't exist or works differently.
plan9front_-_ed_network_configuration.txt · Last modified: 2022/07/19 21:33 by hc9